SEESenv/web/html/ch6oop.html
author amit@thunder
Mon, 22 Feb 2010 17:09:17 +0530
changeset 16 2e3d2cadbcb6
parent 15 f2383fee6584
child 24 10074d1357ff
permissions -rw-r--r--
Testing
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
     1
<html>
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
     2
 <head>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
     3
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
     4
  <title>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
     5
   Chapter. oop
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
     6
  </title>
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
     7
  <link rel="stylesheet" href="/review/support/styles.css" type="text/css" />
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
     8
  <meta name="generator" content="DocBook XSL Stylesheets V1.74.3" />
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
     9
  <link rel="shortcut icon" type="image/png" href="/review/support/figs/favicon.png" />
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
    10
  <script type="text/javascript" src="/review/support/jquery-min.js">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
    11
  </script>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
    12
  <script type="text/javascript" src="/review/support/form.js">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
    13
  </script>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
    14
  <script type="text/javascript" src="/review/support/hsbook.js">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
    15
  </script>
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    16
 </head>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    17
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
16
2e3d2cadbcb6 Testing
amit@thunder
parents: 15
diff changeset
    18
  <div class="chapter" id="ch6oop">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    19
   <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    20
   </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    21
   <div class="toc">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    22
    <p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    23
     <b>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    24
      Table of Contents
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    25
     </b>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    26
    </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    27
    <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    28
     <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    29
      <span class="article">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
    30
       <a href="#id2577036">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    31
       </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    32
      </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    33
     </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    34
     <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    35
      <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    36
       <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    37
        <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
    38
         <a href="#id2387161">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    39
          1. Introducing Linux
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    40
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    41
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    42
       </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    43
       <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    44
        <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    45
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    46
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
    47
           <a href="#id2574856">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    48
            1.1. Historical Background
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    49
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    50
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    51
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    52
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    53
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
    54
           <a href="#id2628095">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    55
            1.2. Design and Implications
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    56
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    57
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    58
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    59
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    60
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
    61
           <a href="#id2628360">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    62
            1.3. Reasons for Using Linux
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    63
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    64
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    65
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    66
        </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    67
       </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    68
       <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    69
        <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
    70
         <a href="#id2628487">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    71
          2. Getting Started
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    72
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    73
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    74
       </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    75
       <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    76
        <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    77
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    78
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
    79
           <a href="#id2628495">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    80
            2.1. Logging in, activating the user interface and logging out
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    81
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    82
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    83
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    84
        </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    85
       </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    86
       <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    87
        <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
    88
         <a href="#id2628767">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    89
          3. Basic Commands
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    90
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    91
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    92
       </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    93
       <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    94
        <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    95
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    96
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
    97
           <a href="#id2628775">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    98
            3.1. ls
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
    99
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   100
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   101
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   102
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   103
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   104
           <a href="#id2628932">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   105
            3.2. date
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   106
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   107
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   108
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   109
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   110
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   111
           <a href="#id2628990">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   112
            3.3. cd
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   113
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   114
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   115
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   116
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   117
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   118
           <a href="#id2629085">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   119
            3.4. who
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   120
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   121
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   122
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   123
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   124
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   125
           <a href="#id2629165">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   126
            3.5. mkdir
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   127
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   128
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   129
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   130
        </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   131
       </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   132
       <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   133
        <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   134
         <a href="#id2629326">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   135
          4. Getting Help
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   136
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   137
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   138
       </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   139
       <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   140
        <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   141
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   142
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   143
           <a href="#id2629334">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   144
            4.1. apropos and whatis
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   145
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   146
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   147
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   148
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   149
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   150
           <a href="#id2629427">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   151
            4.2. man
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   152
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   153
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   154
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   155
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   156
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   157
           <a href="#id2629613">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   158
            4.3. info
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   159
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   160
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   161
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   162
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   163
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   164
           <a href="#id2629699">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   165
            4.4. --help
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   166
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   167
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   168
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   169
        </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   170
       </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   171
       <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   172
        <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   173
         <a href="#id2629753">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   174
          5. Basic file handling
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   175
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   176
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   177
       </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   178
       <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   179
        <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   180
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   181
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   182
           <a href="#id2629761">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   183
            5.1. cp
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   184
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   185
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   186
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   187
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   188
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   189
           <a href="#id2630070">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   190
            5.2. mv
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   191
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   192
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   193
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   194
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   195
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   196
           <a href="#id2627868">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   197
            5.3. rm
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   198
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   199
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   200
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   201
        </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   202
       </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   203
       <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   204
        <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   205
         <a href="#id2630515">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   206
          6. Command Line Arguments
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   207
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   208
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   209
       </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   210
       <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   211
        <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   212
         <a href="#id2630608">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   213
          7. Basic Text Processing
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   214
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   215
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   216
       </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   217
       <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   218
        <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   219
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   220
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   221
           <a href="#id2630617">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   222
            7.1. head
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   223
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   224
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   225
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   226
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   227
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   228
           <a href="#id2630704">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   229
            7.2. tail
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   230
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   231
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   232
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   233
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   234
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   235
           <a href="#id2630831">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   236
            7.3. cut
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   237
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   238
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   239
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   240
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   241
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   242
           <a href="#id2630917">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   243
            7.4. paste
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   244
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   245
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   246
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   247
        </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   248
       </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   249
       <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   250
        <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   251
         <a href="#id2631052">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   252
          8. Shell Meta Characters
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   253
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   254
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   255
       </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   256
       <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   257
        <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   258
         <a href="#id2631155">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   259
          9. Looking At Files
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   260
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   261
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   262
       </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   263
       <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   264
        <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   265
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   266
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   267
           <a href="#id2631164">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   268
            9.1. cat
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   269
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   270
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   271
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   272
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   273
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   274
           <a href="#id2631352">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   275
            9.2. more
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   276
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   277
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   278
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   279
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   280
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   281
           <a href="#id2631466">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   282
            9.3. less
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   283
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   284
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   285
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   286
        </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   287
       </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   288
       <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   289
        <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   290
         <a href="#id2631702">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   291
          10. Directory Structure
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   292
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   293
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   294
       </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   295
       <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   296
        <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   297
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   298
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   299
           <a href="#id2631966">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   300
            10.1. man hier
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   301
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   302
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   303
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   304
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   305
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   306
           <a href="#id2631982">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   307
            10.2. ls -l
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   308
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   309
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   310
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   311
        </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   312
       </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   313
       <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   314
        <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   315
         <a href="#id2632004">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   316
          11. Permissions and Ownership
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   317
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   318
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   319
       </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   320
       <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   321
        <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   322
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   323
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   324
           <a href="#id2632013">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   325
            11.1. chmod
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   326
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   327
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   328
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   329
        </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   330
       </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   331
       <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   332
        <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   333
         <a href="#id2632792">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   334
          12. Redirection and Piping
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   335
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   336
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   337
       </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   338
       <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   339
        <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   340
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   341
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   342
           <a href="#id2632828">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   343
            12.1. Redirecting standard input and standard output
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   344
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   345
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   346
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   347
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   348
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   349
           <a href="#id2632896">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   350
            12.2. Piping
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   351
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   352
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   353
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   354
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   355
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   356
           <a href="#id2632956">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   357
            12.3. Redirecting to and from the standard file handles
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   358
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   359
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   360
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   361
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   362
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   363
           <a href="#id2633156">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   364
            12.4. Chained pipelines
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   365
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   366
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   367
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   368
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   369
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   370
           <a href="#id2633188">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   371
            12.5. Redirect to multiple outputs
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   372
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   373
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   374
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   375
        </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   376
       </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   377
       <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   378
        <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   379
         <a href="#id2633218">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   380
          13. More Text Processing
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   381
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   382
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   383
       </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   384
       <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   385
        <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   386
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   387
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   388
           <a href="#id2633227">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   389
            13.1. grep
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   390
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   391
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   392
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   393
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   394
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   395
           <a href="#id2633413">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   396
            13.2. tr
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   397
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   398
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   399
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   400
        </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   401
       </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   402
       <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   403
        <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   404
         <a href="#id2633558">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   405
          14. Elementary Regex
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   406
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   407
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   408
       </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   409
       <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   410
        <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   411
         <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   412
          <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   413
           <a href="#id2633765">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   414
            14.1. Lazy quantification
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   415
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   416
          </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   417
         </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   418
        </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   419
       </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   420
       <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   421
        <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   422
         <a href="#id2633840">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   423
          15. One Liners
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   424
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   425
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   426
       </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   427
      </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   428
     </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   429
    </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   430
   </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   431
   <div class="article">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   432
    <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   433
     <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   434
      <div>
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   435
       <h2 class="title" id="id2577036">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   436
       </h2>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   437
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   438
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   439
     <hr />
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   440
    </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   441
    <div class="toc">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   442
     <p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   443
      <b>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   444
       Table of Contents
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   445
      </b>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   446
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   447
     <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   448
      <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   449
       <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   450
        <a href="#id2387161">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   451
         1. Introducing Linux
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   452
        </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   453
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   454
      </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   455
      <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   456
       <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   457
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   458
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   459
          <a href="#id2574856">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   460
           1.1. Historical Background
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   461
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   462
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   463
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   464
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   465
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   466
          <a href="#id2628095">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   467
           1.2. Design and Implications
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   468
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   469
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   470
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   471
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   472
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   473
          <a href="#id2628360">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   474
           1.3. Reasons for Using Linux
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   475
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   476
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   477
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   478
       </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   479
      </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   480
      <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   481
       <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   482
        <a href="#id2628487">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   483
         2. Getting Started
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   484
        </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   485
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   486
      </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   487
      <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   488
       <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   489
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   490
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   491
          <a href="#id2628495">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   492
           2.1. Logging in, activating the user interface and logging out
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   493
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   494
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   495
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   496
       </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   497
      </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   498
      <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   499
       <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   500
        <a href="#id2628767">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   501
         3. Basic Commands
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   502
        </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   503
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   504
      </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   505
      <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   506
       <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   507
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   508
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   509
          <a href="#id2628775">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   510
           3.1. ls
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   511
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   512
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   513
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   514
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   515
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   516
          <a href="#id2628932">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   517
           3.2. date
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   518
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   519
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   520
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   521
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   522
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   523
          <a href="#id2628990">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   524
           3.3. cd
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   525
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   526
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   527
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   528
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   529
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   530
          <a href="#id2629085">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   531
           3.4. who
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   532
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   533
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   534
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   535
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   536
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   537
          <a href="#id2629165">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   538
           3.5. mkdir
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   539
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   540
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   541
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   542
       </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   543
      </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   544
      <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   545
       <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   546
        <a href="#id2629326">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   547
         4. Getting Help
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   548
        </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   549
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   550
      </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   551
      <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   552
       <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   553
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   554
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   555
          <a href="#id2629334">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   556
           4.1. apropos and whatis
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   557
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   558
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   559
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   560
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   561
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   562
          <a href="#id2629427">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   563
           4.2. man
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   564
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   565
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   566
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   567
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   568
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   569
          <a href="#id2629613">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   570
           4.3. info
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   571
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   572
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   573
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   574
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   575
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   576
          <a href="#id2629699">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   577
           4.4. --help
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   578
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   579
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   580
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   581
       </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   582
      </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   583
      <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   584
       <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   585
        <a href="#id2629753">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   586
         5. Basic file handling
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   587
        </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   588
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   589
      </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   590
      <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   591
       <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   592
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   593
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   594
          <a href="#id2629761">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   595
           5.1. cp
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   596
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   597
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   598
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   599
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   600
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   601
          <a href="#id2630070">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   602
           5.2. mv
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   603
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   604
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   605
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   606
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   607
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   608
          <a href="#id2627868">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   609
           5.3. rm
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   610
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   611
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   612
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   613
       </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   614
      </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   615
      <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   616
       <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   617
        <a href="#id2630515">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   618
         6. Command Line Arguments
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   619
        </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   620
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   621
      </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   622
      <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   623
       <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   624
        <a href="#id2630608">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   625
         7. Basic Text Processing
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   626
        </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   627
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   628
      </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   629
      <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   630
       <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   631
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   632
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   633
          <a href="#id2630617">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   634
           7.1. head
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   635
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   636
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   637
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   638
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   639
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   640
          <a href="#id2630704">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   641
           7.2. tail
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   642
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   643
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   644
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   645
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   646
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   647
          <a href="#id2630831">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   648
           7.3. cut
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   649
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   650
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   651
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   652
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   653
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   654
          <a href="#id2630917">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   655
           7.4. paste
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   656
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   657
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   658
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   659
       </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   660
      </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   661
      <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   662
       <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   663
        <a href="#id2631052">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   664
         8. Shell Meta Characters
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   665
        </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   666
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   667
      </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   668
      <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   669
       <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   670
        <a href="#id2631155">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   671
         9. Looking At Files
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   672
        </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   673
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   674
      </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   675
      <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   676
       <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   677
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   678
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   679
          <a href="#id2631164">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   680
           9.1. cat
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   681
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   682
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   683
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   684
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   685
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   686
          <a href="#id2631352">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   687
           9.2. more
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   688
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   689
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   690
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   691
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   692
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   693
          <a href="#id2631466">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   694
           9.3. less
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   695
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   696
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   697
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   698
       </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   699
      </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   700
      <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   701
       <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   702
        <a href="#id2631702">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   703
         10. Directory Structure
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   704
        </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   705
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   706
      </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   707
      <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   708
       <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   709
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   710
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   711
          <a href="#id2631966">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   712
           10.1. man hier
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   713
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   714
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   715
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   716
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   717
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   718
          <a href="#id2631982">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   719
           10.2. ls -l
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   720
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   721
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   722
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   723
       </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   724
      </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   725
      <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   726
       <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   727
        <a href="#id2632004">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   728
         11. Permissions and Ownership
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   729
        </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   730
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   731
      </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   732
      <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   733
       <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   734
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   735
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   736
          <a href="#id2632013">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   737
           11.1. chmod
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   738
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   739
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   740
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   741
       </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   742
      </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   743
      <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   744
       <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   745
        <a href="#id2632792">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   746
         12. Redirection and Piping
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   747
        </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   748
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   749
      </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   750
      <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   751
       <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   752
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   753
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   754
          <a href="#id2632828">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   755
           12.1. Redirecting standard input and standard output
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   756
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   757
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   758
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   759
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   760
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   761
          <a href="#id2632896">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   762
           12.2. Piping
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   763
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   764
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   765
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   766
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   767
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   768
          <a href="#id2632956">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   769
           12.3. Redirecting to and from the standard file handles
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   770
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   771
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   772
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   773
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   774
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   775
          <a href="#id2633156">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   776
           12.4. Chained pipelines
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   777
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   778
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   779
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   780
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   781
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   782
          <a href="#id2633188">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   783
           12.5. Redirect to multiple outputs
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   784
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   785
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   786
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   787
       </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   788
      </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   789
      <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   790
       <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   791
        <a href="#id2633218">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   792
         13. More Text Processing
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   793
        </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   794
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   795
      </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   796
      <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   797
       <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   798
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   799
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   800
          <a href="#id2633227">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   801
           13.1. grep
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   802
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   803
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   804
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   805
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   806
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   807
          <a href="#id2633413">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   808
           13.2. tr
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   809
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   810
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   811
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   812
       </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   813
      </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   814
      <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   815
       <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   816
        <a href="#id2633558">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   817
         14. Elementary Regex
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   818
        </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   819
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   820
      </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   821
      <dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   822
       <dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   823
        <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   824
         <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   825
          <a href="#id2633765">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   826
           14.1. Lazy quantification
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   827
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   828
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   829
        </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   830
       </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   831
      </dd>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   832
      <dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   833
       <span class="section">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   834
        <a href="#id2633840">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   835
         15. One Liners
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   836
        </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   837
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   838
      </dt>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   839
     </dl>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   840
    </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   841
    <div class="section" title="1.Introducing Linux">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   842
     <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   843
      <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   844
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   845
        <h2 class="title" style="clear: both">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   846
         <a name="id2387161">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   847
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   848
         1.Introducing Linux
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   849
        </h2>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   850
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   851
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   852
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   853
     <p id="ch6oop_1">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   854
      (Attribution : A significant chunk of the content under this section is based on data from Wikipedia and the Linux Documentation Project)
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   855
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   856
     <p id="ch6oop_2">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   857
      Linux (usually pronounced lnks') is a generic term referring to Unix-like computer operating systems based on the Linux kernel, where a kernel is the intermediate layer between the hardware and the applications. The kernel is, on an abstract level, the core of (most) operating systems, that manages the various system resources. The development of the Linux OS is considered the basis for Free and Open Source Software (FOSS) collaboration since typically the underlying source code can be used, modified freely, and redistributed by anyone under the terms of the GNU (a recursive acronym for "GNU's Not Unix!") Global Public License (GPL) and other free software licences. This freedom to access and reuse various components of a system, is one of the primary reasons for the popularity of Linux.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   858
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   859
     <p id="ch6oop_3">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   860
      Linux is installed on a variety of computer hardware, that include mobile phones, embedded devices and supercomputers, but is infamous for its use in servers.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   861
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   862
     <p id="ch6oop_4">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   863
      The name "Linux"  comes from the Linux kernel, originally written in 1991 by Linus Torvalds. The rest of the system usually comprises components such as the Apache HTTP Server, the X Window System, the GNOME and KDE desktop environments, and utilities and libraries from the GNU Project (announced in 1983 by Richard Stallman). Commonly-used applications with desktop Linux systems include the Mozilla Firefox web-browser and the OpenOffice.org office application suite. The GNU contribution is the basis for the Free Software Foundation's preferred name GNU/Linux. The kernel's mascot is a penguin named "Tux". Mozilla Firefox and OpenOffice.org are open-source projects which can be run on most Operating Systems, including proprietary ones.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   864
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   865
     <div class="section" title="1.1.Historical Background">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   866
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   867
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   868
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   869
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   870
          <a name="id2574856">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   871
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   872
          1.1.Historical Background
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   873
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   874
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   875
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   876
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   877
      <div class="section" title="1.1.1.Events leading to the creation">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   878
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   879
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   880
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   881
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   882
           <a name="id2574730">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   883
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   884
           1.1.1.Events leading to the creation
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   885
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   886
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   887
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   888
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   889
       <div class="itemizedlist">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   890
        <ul class="itemizedlist" type="*">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   891
         <li class="listitem" style="list-style-type: *">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   892
          <p id="ch6oop_5">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   893
           The Unix operating system was developed in the 1960s and released for public use in 1970. Its accessibility and portability caused it to be widely adopted, copied and modified by academic institutions and businesses. Its design became influential to authors of other systems. Other free operating systems include the Berkeley Software Distribution (BSD), developed at the University of California at Berkeley, and MINIX which was released by Andrew S. Tanenbaum. The development and adoption of BSD and MINIX were limited due to various reasons, and this lack of a widely-adopted and free kernel triggered Linus Torvalds into starting his project.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   894
          </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   895
         </li>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   896
         <li class="listitem" style="list-style-type: *">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   897
          <p id="ch6oop_6">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   898
           In 1983, Richard Stallman started the GNU project with the goal of creating a free UNIX-like operating system. As part of this work, he wrote the GNU General Public License (GPL). By the early 1990s there was almost enough available software to create a full operating system. However, the GNU kernel, called Hurd, failed to attract enough attention from developers leaving GNU incomplete.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   899
          </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   900
         </li>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   901
        </ul>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   902
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   903
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   904
      <div class="section" title="1.1.2.The Creation of Linux">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   905
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   906
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   907
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   908
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   909
           <a name="id2628050">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   910
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   911
           1.1.2.The Creation of Linux
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   912
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   913
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   914
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   915
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   916
       <p id="ch6oop_7">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   917
        In 1991, Linus Torvalds began a project at the University of Helsinki that later became the Linux kernel. It was initially a terminal (command-line) emulator, which Torvalds used to access the large UNIX servers of the university. He wrote the program targeting just the hardware he was using and independent of an operating system because he wanted to use the functions of his computer with an 80386 processor. Development was done on Minix using the GNU C compiler. This application is still the main choice for compiling Linux today (although the code can be built with other compilers, such as the Intel C Compiler).
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   918
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   919
       <p id="ch6oop_8">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   920
        Torvalds continues to direct the development of the kernel. Stallman heads the Free Software Foundation, which in turn supports the GNU components. Finally, individuals and corporations develop third-party non-GNU components, which constitute a vast body of work and including kernel modules, and user applications and libraries. Linux vendors and communities combine and distribute the kernel, GNU components, and non-GNU components, with additional package management software in the form of Linux distributions.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   921
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   922
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   923
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   924
     <div class="section" title="1.2.Design and Implications">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   925
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   926
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   927
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   928
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   929
          <a name="id2628095">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   930
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   931
          1.2.Design and Implications
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   932
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   933
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   934
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   935
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   936
      <p id="ch6oop_9">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   937
       A Linux-based system is a modular Unix-like operating system, deriving much of its basic design from principles established in Unix earlier. Such a system uses a monolithic kernel, called the Linux kernel, which handles process control, networking, and peripheral and file system access. Device drivers are integrated directly with the kernel. Separate projects that interface with the kernel provide much of the system's higher-level functionality. The GNU userland is an important part of most Linux-based systems, providing the most common implementation of the C library, a popular shell, and many of the common Unix tools which carry out many basic operating system tasks. The graphical user interface (or GUI) used by most Linux systems is based on the "X Window System".
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   938
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   939
      <div class="section" title="1.2.1.User Interface">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   940
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   941
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   942
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   943
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   944
           <a name="id2628120">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   945
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   946
           1.2.1.User Interface
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   947
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   948
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   949
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   950
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   951
       <p id="ch6oop_a">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   952
        Users can control a Linux-based system through a command line interface (or CLI), a graphical user interface (or GUI), or through controls attached to the associated hardware (this is common for embedded systems). For desktop systems, the default mode is usually the GUI. On desktop machines, "KDE", "GNOME" and "Xfce" are the most popular user interfaces,though a variety of additional user interfaces exist. Most popular user interfaces run on top of the "X Window System" (or X), which enables a graphical application running on one machine to be displayed and controlled from another in a network.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   953
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   954
       <p id="ch6oop_b">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   955
        A Linux system also provides a CLI of some sort through a shell, which is the traditional way of interacting with a Unix system. A Linux distribution specialized for servers may use the CLI as its only interface. A headless system (system run without even a monitor) can be controlled by the command line via a remote-control protocol such as SSH or telnet. The CLI is particularly suited for automation of repetitive or delayed tasks, and provides very simple inter-process communication. A graphical terminal emulator program is often used to access the CLI from a Linux desktop.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   956
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   957
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   958
      <div class="section" title="1.2.2.Development">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   959
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   960
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   961
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   962
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   963
           <a name="id2628172">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   964
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   965
           1.2.2.Development
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   966
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   967
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   968
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   969
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   970
       <p id="ch6oop_c">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   971
        The primary difference between Linux and many other popular contemporary operating systems is that the Linux kernel and other components are free and open source software. Linux is not the only such operating system, although it is by far the most widely used. Some free and open source software licenses are based on the principle of "copyleft", a kind of reciprocity: any work derived from a copyleft piece of software must also be copyleft itself. The most common free software license, the GNU GPL, is a form of copyleft, and is used for the Linux kernel and many of the components from the GNU project.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   972
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   973
       <p id="ch6oop_d">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   974
        Linux based distributions are intended by developers for interoperability with other operating systems and established computing standards. Linux systems adhere to POSIX, SUS, ISO and ANSI standards where possible, although to date only one Linux distribution has been POSIX.1 certified, Linux-FT.Free software projects, although developed in a collaborative fashion, are often produced independently of each other. The fact that the software licenses explicitly permit redistribution, however, provides a basis for larger scale projects that collect the software produced by stand-alone projects and make it available all at once in the form of a Linux distribution.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   975
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   976
       <p id="ch6oop_e">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   977
        A Linux distribution, commonly called a "distro", is a project that manages a remote collection of system software and application software packages available for download and installation through a network connection. This allows the user to adapt the operating system to his/her specific needs. Distributions are maintained by individuals, loose-knit teams, volunteer organizations, and commercial entities. A distribution can be installed using a CD that contains distribution-specific software for initial system installation and configuration. A package manager such as Synaptic or YAST allows later package upgrades and installations. A distribution is responsible for the default configuration of the installed Linux kernel, general system security, and more generally integration of the different software packages into a coherent whole.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   978
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   979
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   980
      <div class="section" title="1.2.3.Community">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   981
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   982
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   983
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   984
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
   985
           <a name="id2628227">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   986
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   987
           1.2.3.Community
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   988
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   989
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   990
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   991
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   992
       <p id="ch6oop_f">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   993
        A distribution is largely driven by its developer and user communities. Some vendors develop and fund their distributions on a volunteer basis. Examples include Debian and the Debian-based, Ubuntu. Others maintain a community version of their commercial distributions, as Red Hat does with Fedora.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   994
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   995
       <p id="ch6oop_10">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   996
        In many cities and regions, local associations known as Linux Users Groups (LUGs) seek to promote their preferred distribution and by extension free software. They hold meetings and provide free demonstrations, training, technical support, and operating system installation to new users. Many Internet communities also provide support to Linux users and developers. Most distributions and free software / open source projects have IRC (Internet Relay Chat) chatrooms or newsgroups. Online forums are another means for support. Linux distributions host mailing lists; commonly there will be a specific topic such as usage or development for a given list. All these can be found simply by running an appropriate search on Google.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   997
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   998
       <p id="ch6oop_11">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
   999
        Although Linux distributions are generally available without charge, several large corporations sell, support, and contribute to the development of the components of the system and of free software. These include Dell, IBM, HP, Oracle, Sun Microsystems, Novell, Nokia. A number of corporations, notably Red Hat, have built their entire business around Linux distributions.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1000
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1001
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1002
      <div class="section" title="1.2.4.Can I make a profit out of running a business involving Linux?">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1003
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1004
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1005
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1006
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1007
           <a name="id2628270">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1008
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1009
           1.2.4.Can I make a profit out of running a business involving Linux?
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1010
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1011
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1012
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1013
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1014
       <p id="ch6oop_12">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1015
        The answer is, "Yes!". The free software licenses, on which the various software packages of a distribution built on the Linux kernel are based, explicitly accommodate and encourage commercialization; the relationship between a Linux distribution as a whole and individual vendors may be seen as symbiotic. One common business model of commercial suppliers is charging for support, especially for business users. A number of companies also offer a specialized business version of their distribution, which adds proprietary support packages and tools to administer higher numbers of installations or to simplify administrative tasks. Another business model is to give away the software in order to sell hardware. Examples of corporations that are extensively (and sometimes exclusively) open-source and Linux-powered , with successful revenue generation models involving these, are Google, SUN, Mozilla, etc.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1016
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1017
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1018
      <div class="section" title="1.2.5.Programming on Linux">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1019
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1020
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1021
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1022
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1023
           <a name="id2628316">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1024
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1025
           1.2.5.Programming on Linux
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1026
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1027
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1028
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1029
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1030
       <p id="ch6oop_13">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1031
        Most Linux distributions support dozens of programming languages. The most common collection of utilities for building both Linux applications and operating system programs is found within the GNU toolchain, which includes the GNU Compiler Collection (GCC) and the GNU build system. Amongst others, GCC provides compilers for Ada, C, C++, Java, and Fortran. The Linux kernel itself is written to be compiled with GCC. Proprietary compilers for Linux include the Intel C++ Compiler, Sun Studio, and IBM XL C/C++ Compiler.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1032
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1033
       <p id="ch6oop_14">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1034
        Most distributions also include support for PHP, Perl, Ruby, Python and other dynamic languages. Examples of languages that are less common, but still supported, are C# via the Mono project, sponsored by Novell, and Scheme. A number of Java Virtual Machines and development kits run on Linux, including the original Sun Microsystems JVM (HotSpot), and IBM's J2SE RE, as well as many open-source projects like Kaffe.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1035
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1036
       <p id="ch6oop_15">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1037
        The two main frameworks for developing graphical applications are those of GNOME and KDE. These projects are based on the GTK+ and Qt widget toolkits, respectively, which can also be used independently of the larger framework. Both support a wide variety of languages. There are a number of Integrated Development Environments (IDEs) available including Anjuta, Code::Blocks, Eclipse, KDevelop, Lazarus, MonoDevelop, NetBeans, and Omnis Studio while the long-established editors Vim and Emacs remain popular.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1038
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1039
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1040
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1041
     <div class="section" title="1.3.Reasons for Using Linux">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1042
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1043
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1044
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1045
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1046
          <a name="id2628360">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1047
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1048
          1.3.Reasons for Using Linux
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1049
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1050
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1051
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1052
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1053
      <div class="itemizedlist">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1054
       <ul class="itemizedlist" type="*">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1055
        <li class="listitem" style="list-style-type: *">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1056
         <p id="ch6oop_16">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1057
          Linux is free:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1058
         </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1059
        </li>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1060
       </ul>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1061
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1062
      <p id="ch6oop_17">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1063
       As in "free beer". Linux can be downloaded in its entirety from the Internet completely for free. No registration fees, no costs per user, free updates, and freely available source code in case you want to change the behavior of your system.
1
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1064
Most of all, Linux is free as in "free speech":
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1065
The license commonly used is the GNU Public License (GPL). The license says that anybody who may want to do so, has the right to change Linux and eventually to redistribute a changed version, on the one condition that the code is still available after redistribution. In practice, you are free to grab a kernel image and sell the new code, as long as your customers can still have a copy of that code.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1066
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1067
      <div class="itemizedlist">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1068
       <ul class="itemizedlist" type="*">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1069
        <li class="listitem" style="list-style-type: *">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1070
         <p id="ch6oop_18">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1071
          Linux is portable to any hardware platform:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1072
         </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1073
        </li>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1074
       </ul>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1075
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1076
      <p id="ch6oop_19">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1077
       A vendor, who wants to sell a new type of computer and who does not know what kind of OS his/her new machine will run, can take a Linux kernel and make it work on his/her hardware, because documentation related to this activity is freely available.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1078
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1079
      <div class="itemizedlist">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1080
       <ul class="itemizedlist" type="*">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1081
        <li class="listitem" style="list-style-type: *">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1082
         <p id="ch6oop_1a">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1083
          Linux was made to keep on running:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1084
         </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1085
        </li>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1086
       </ul>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1087
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1088
      <p id="ch6oop_1b">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1089
       As with UNIX, a Linux system expects to run without rebooting all the time. That is why a lot of tasks are being executed at night or scheduled automatically for other times, resulting in higher availability during busier periods and a more balanced use of the hardware. This property allows for Linux to be applicable to environments where people do not have the time or the possibility to control their systems constantly.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1090
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1091
      <div class="itemizedlist">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1092
       <ul class="itemizedlist" type="*">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1093
        <li class="listitem" style="list-style-type: *">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1094
         <p id="ch6oop_1c">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1095
          Linux is secure and versatile:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1096
         </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1097
        </li>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1098
       </ul>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1099
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1100
      <p id="ch6oop_1d">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1101
       The security model used in Linux is based on the UNIX idea of security, which is known to be robust and of proven quality. But Linux is not only safe from attacks from the Internet: it will adapt equally to other situations, utilizing the same high standards for security.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1102
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1103
      <div class="itemizedlist">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1104
       <ul class="itemizedlist" type="*">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1105
        <li class="listitem" style="list-style-type: *">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1106
         <p id="ch6oop_1e">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1107
          Linux is scalable:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1108
         </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1109
        </li>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1110
       </ul>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1111
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1112
      <p id="ch6oop_1f">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1113
       From a Palmtop with 2 MB of memory to a petabyte storage cluster with hundreds of nodes: add or remove the appropriate packages and Linux fits all. One does not need a supercomputer anymore,because you can use Linux to do big things using the building blocks provided with the system. If one wants to do little things, such as making an operating system for an embedded processor or just recycling your old 486, Linux will do that as well.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1114
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1115
      <div class="itemizedlist">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1116
       <ul class="itemizedlist" type="*">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1117
        <li class="listitem" style="list-style-type: *">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1118
         <p id="ch6oop_20">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1119
          The Linux OS and Linux applications have very short debugtimes:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1120
         </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1121
        </li>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1122
       </ul>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1123
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1124
      <p id="ch6oop_21">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1125
       Because Linux has been developed and tested by thousands of people, both errors and people to fix them are found very quickly. It often happens that there are only a couple of hours between discovery and fixing of a bug.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1126
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1127
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1128
    </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1129
    <div class="section" title="2.Getting Started">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1130
     <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1131
      <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1132
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1133
        <h2 class="title" style="clear: both">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1134
         <a name="id2628487">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1135
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1136
         2.Getting Started
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1137
        </h2>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1138
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1139
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1140
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1141
     <div class="section" title="2.1.Logging in, activating the user interface and logging out">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1142
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1143
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1144
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1145
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1146
          <a name="id2628495">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1147
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1148
          2.1.Logging in, activating the user interface and logging out
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1149
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1150
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1151
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1152
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1153
      <p id="ch6oop_22">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1154
       In order to work on a Linux system directly, one needs to provide a user name and password. You always need to authenticate to the system. Most PCbased Linux systems have two basic modes for a system to run in: either quick and clean in text console mode,which includes with mouse, multitasking and multiuser features, or in graphical console mode, which looks better but eats more system resources.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1155
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1156
      <div class="section" title="2.1.1.Graphical Mode">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1157
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1158
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1159
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1160
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1161
           <a name="id2628525">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1162
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1163
           2.1.1.Graphical Mode
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1164
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1165
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1166
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1167
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1168
       <p id="ch6oop_23">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1169
        This is the default nowadays on most desktop computers. You know you will be connecting to the system using graphical mode when you are first asked for your user name, and then to type your password.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1170
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1171
       <p id="ch6oop_24">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1172
        To log in, make sure the mouse pointer is in the login window, provide your user name and password to the system and click
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1173
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1174
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1175
          OK
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1176
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1177
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1178
        or press
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1179
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1180
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1181
          Enter
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1182
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1183
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1184
        .
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1185
It is generally considered a bad idea to connect (graphically) using the root user name, the system adminstrator's account, since the use of graphics includes running a lot of extra programs, in root's case with a lot of extra permissions. To keep all risks as low as possible, use a normal user account to connect graphically. But there are enough risks to keep this in mind as a general advice, for all use of the root account: only log in as root when extra privileges are required.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1186
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1187
       <p id="ch6oop_25">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1188
        After entering your user name/password combination, it can take a little while before the graphical environment is started, depending on the CPU speed of your computer, on the software you use and on your personal settings.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1189
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1190
       <p id="ch6oop_26">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1191
        To continue, you will need to open a
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1192
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1193
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1194
          terminal window
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1195
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1196
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1197
        or
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1198
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1199
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1200
          xterm
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1201
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1202
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1203
        for short (X being the name for the underlying software supporting the graphical environment). This program can be found in the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1204
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1205
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1206
          Applications&gt;Utilities-&gt;System Tools
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1207
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1208
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1209
        or
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1210
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1211
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1212
          Internet menu
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1213
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1214
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1215
        , depending on what window manager you are using. There might be icons that you can use as a shortcut to get an
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1216
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1217
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1218
          xterm
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1219
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1220
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1221
        window as well, and clicking the right mouse button on the desktop background will usually present you with a menu containing a terminal window application.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1222
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1223
       <p id="ch6oop_27">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1224
        While browsing the menus, you will notice that a lot of things can be done without entering commands via the keyboard. For most users, the good old pointnclick method of dealing with the computer will do. But for those who want to enter the "heart" of the system, a tool stronger than a mouse will be required to handle the various tasks. This tool is the shell, and when in graphical mode, we activate our shell by opening a terminal window.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1225
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1226
       <p id="ch6oop_28">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1227
        A terminal window should always show a command prompt when you open one. This terminal shows a standard prompt, which displays the user's login name, and the current working directory, represented by the twiddle (~)
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1228
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1229
       <p id="ch6oop_29">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1230
        Another common form for a prompt is this one:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1231
[
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1232
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1233
       <div class="reference">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1234
        <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1235
         <hr />
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1236
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1237
        user@host
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1238
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1239
       <p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1240
        dir]
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1241
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1242
       <p id="ch6oop_2a">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1243
        In the above example,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1244
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1245
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1246
          user
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1247
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1248
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1249
        will be your login name,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1250
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1251
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1252
          hosts
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1253
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1254
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1255
        the name of the machine you are working on, and
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1256
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1257
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1258
          dir
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1259
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1260
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1261
        an indication of your current location in the file system. Prompts can display all kinds of information, but they are not part of the commands you are giving to your system. To disconnect from the system in graphical mode, you need to close all terminal windows and other applications. After that, hit the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1262
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1263
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1264
          logout
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1265
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1266
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1267
        icon or find
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1268
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1269
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1270
          Log Out
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1271
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1272
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1273
        in the menu. Closing everything is not really necessary, and the system can do this for you, but session management might put all currently open applications back on your screen when you connect again, which takes longer and is not always the desired effect. However, this behavior is configurable.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1274
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1275
       <p id="ch6oop_2b">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1276
        When you see the login screen again, asking to enter user name and password, logout was successful.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1277
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1278
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1279
      <div class="section" title="2.1.2.Text Mode">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1280
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1281
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1282
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1283
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1284
           <a name="id2628680">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1285
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1286
           2.1.2.Text Mode
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1287
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1288
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1289
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1290
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1291
       <p id="ch6oop_2c">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1292
        One is in text mode when the whole screen is black, showing (in most cases white) characters. A text mode login screen typically shows some information about the machine you are working on, the name of the machine and a prompt waiting for you to log in.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1293
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1294
       <p id="ch6oop_2d">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1295
        The login is different from a graphical login, in that you have to hit the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1296
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1297
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1298
          Enter
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1299
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1300
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1301
        key after providing your user name, because there are no buttons on the screen that you can click with the mouse. Then you should type your password, followed by another
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1302
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1303
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1304
          Enter
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1305
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1306
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1307
        . You will not see any indication that you are entering something, not even an asterisk, and you won't see the cursor move. But this is normal on Linux and is done for security
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1308
reasons.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1309
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1310
       <p id="ch6oop_2e">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1311
        When the system has accepted you as a valid user, you may get some more information, called the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1312
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1313
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1314
          message of the day
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1315
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1316
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1317
        , which can be anything. Additionally, it is popular on UNIX systems to display a fortune cookie, which contains some general wise or unwise (this is up to you) thoughts. After that, you will be given a shell, indicated with the same prompt that you would get in graphical mode.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1318
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1319
       <p id="ch6oop_2f">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1320
        Also in text mode: log in as root only to do setup and configuration that absolutely requires administrator privileges, such as adding users, installing software packages, and performing network and other system configuration. Once you are finished, immediately leave the special account and resume your work as a nonprivileged user.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1321
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1322
       <p id="ch6oop_30">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1323
        Logging out is done by entering the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1324
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1325
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1326
          logout
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1327
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1328
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1329
        command, followed by Enter. You are successfully disconnected from the system when you see the login screen again.Don't poweroff the computer after logging out. It is not meant to be shut off without application of the proper procedures for halting the system. Powering it off without going through the halting process might cause severe damage!
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1330
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1331
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1332
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1333
    </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1334
    <div class="section" title="3.Basic Commands">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1335
     <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1336
      <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1337
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1338
        <h2 class="title" style="clear: both">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1339
         <a name="id2628767">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1340
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1341
         3.Basic Commands
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1342
        </h2>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1343
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1344
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1345
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1346
     <div class="section" title="3.1.ls">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1347
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1348
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1349
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1350
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1351
          <a name="id2628775">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1352
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1353
          3.1.ls
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1354
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1355
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1356
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1357
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1358
      <p id="ch6oop_31">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1359
       When invoked without any arguments,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1360
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1361
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1362
         ls
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1363
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1364
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1365
       lists the files in the current working directory. A directory that is not the current working directory can be specified and ls will list the files there. The user also may specify any list of files and directories. In this case, all files and all contents of specified directories will be listed. The name
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1366
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1367
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1368
         ls
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1369
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1370
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1371
       is derived from
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1372
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1373
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1374
         list segments
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1375
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1376
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1377
       which was used in earlier systems.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1378
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1379
      <p id="ch6oop_32">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1380
       Files whose names start with "." are not listed, unless the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1381
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1382
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1383
         -a
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1384
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1385
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1386
       flag is specified or the files are specified explicitly.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1387
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1388
      <p id="ch6oop_33">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1389
       Without options,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1390
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1391
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1392
         ls
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1393
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1394
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1395
       displays files in a bare format. This bare format however makes it difficult to establish the type, permissions, and size of the files. The most common options to reveal this information or change the list of files are:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1396
      </p>
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1397
      <div class="itemizedlist">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1398
       <ul class="itemizedlist" type="*">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1399
        <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1400
         <p id="ch6oop_34">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1401
          <span class="emphasis">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1402
           <em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1403
            -l
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1404
           </em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1405
          </span>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1406
          long format, displaying Unix file types, permissions, number of hard links, owner, group, size, date, and filename
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1407
         </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1408
        </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1409
        <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1410
         <p id="ch6oop_35">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1411
          <span class="emphasis">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1412
           <em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1413
            -F
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1414
           </em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1415
          </span>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1416
          appends a character revealing the nature of a file, for example, * for an executable, or / for a directory. Regular files have no suffix.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1417
         </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1418
        </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1419
        <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1420
         <p id="ch6oop_36">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1421
          <span class="emphasis">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1422
           <em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1423
            -a
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1424
           </em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1425
          </span>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1426
          lists all files in the given directory, including those whose names start with "." (which are hidden files in Unix). By default, these files are excluded from the list.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1427
         </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1428
        </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1429
        <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1430
         <p id="ch6oop_37">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1431
          <span class="emphasis">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1432
           <em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1433
            -R
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1434
           </em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1435
          </span>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1436
          recursively lists subdirectories. The command ls -R / would therefore list all files.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1437
         </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1438
        </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1439
        <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1440
         <p id="ch6oop_38">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1441
          <span class="emphasis">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1442
           <em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1443
            -d
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1444
           </em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1445
          </span>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1446
          shows information about a symbolic link or directory, rather than about the link's target or listing the contents of a directory.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1447
         </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1448
        </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1449
        <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1450
         <p id="ch6oop_39">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1451
          <span class="emphasis">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1452
           <em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1453
            -t
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1454
           </em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1455
          </span>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1456
          sort the list of files by modification time.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1457
         </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1458
        </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1459
        <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1460
         <p id="ch6oop_3a">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1461
          <span class="emphasis">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1462
           <em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1463
            -h
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1464
           </em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1465
          </span>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1466
          print sizes in human readable format. (e.g., 1K, 234M, 2G, etc.)
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1467
         </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1468
        </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1469
       </ul>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1470
      </div>
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1471
      <p id="ch6oop_3b">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1472
       In some environments, providing the option
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1473
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1474
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1475
         --color
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1476
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1477
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1478
       (for GNU ls) or
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1479
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1480
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1481
         -G
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1482
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1483
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1484
       (FreeBSD ls) causes ls to highlight different types of files with different colors, instead of with characters as
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1485
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1486
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1487
         -F
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1488
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1489
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1490
       would. To determine what color to use for a file, GNU
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1491
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1492
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1493
         ls
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1494
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1495
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1496
       checks the Unix file type, the file permissions, and the file extension, while FreeBSD
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1497
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1498
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1499
         ls
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1500
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1501
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1502
       checks only the Unix file type and file permissions.:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1503
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1504
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1505
       $ ls
1
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1506
jeeves.rst psmith.html blandings.html
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1507
$ ls -l
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1508
drwxr--r--   1 plum  editors   4096  jeeves
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1509
-rw-r--r--   1 plum  editors  30405  psmith
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1510
-r-xr-xr-x   1 plum  plum      8460  blandings
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1511
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1512
      <p id="ch6oop_3c">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1513
       Here "$" actually is the beginning of the prompt. This is typical in most Unix-based systems.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1514
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1515
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1516
     <div class="section" title="3.2.date">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1517
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1518
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1519
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1520
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1521
          <a name="id2628932">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1522
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1523
          3.2.date
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1524
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1525
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1526
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1527
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1528
      <p id="ch6oop_3d">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1529
       The Unix date command displays the time and date. The super-user can use it to set the system clock.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1530
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1531
      <p id="ch6oop_3e">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1532
       With no options, the date command displays the current date and time, including the abbreviated day name, abbreviated month name, day of the month, the time separated by colons, the timezone name, and the year. For example:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1533
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1534
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1535
       $date
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1536
Tue Sep  8 12:01:45 IST 2009
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1537
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1538
      <p id="ch6oop_3f">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1539
       On some systems to set the current date and time to September 8, 2004 01:22 you type:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1540
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1541
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1542
       $date --set="20040908 01:22"
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1543
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1544
      <p id="ch6oop_40">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1545
       In order to view the various options for the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1546
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1547
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1548
         date
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1549
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1550
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1551
       command, type:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1552
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1553
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1554
       $man date
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1555
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1556
      <p id="ch6oop_41">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1557
       This will take you to the "Manual" page comprising of all the details on the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1558
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1559
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1560
         date
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1561
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1562
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1563
       command. You can return to the terminal from the "man" page by pressing the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1564
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1565
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1566
         Esc
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1567
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1568
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1569
       key in the keyboard and typing ":q" in that order.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1570
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1571
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1572
     <div class="section" title="3.3.cd">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1573
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1574
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1575
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1576
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1577
          <a name="id2628990">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1578
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1579
          3.3.cd
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1580
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1581
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1582
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1583
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1584
      <p id="ch6oop_42">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1585
       This stands for "change directory". When one wants to go up to the parent directory, bypassing the tree of directories one has entered,  cd .. can be used.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1586
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1587
      <p id="ch6oop_43">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1588
       One dot '.' represents the current directory while two dots '..' represent the parent directory.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1589
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1590
      <p id="ch6oop_44">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1591
       cd - will return you to the previous directory (a bit like an undo).
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1592
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1593
      <p id="ch6oop_45">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1594
       You can also use cd absolute path or cd relative path (see below):
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1595
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1596
      <p id="ch6oop_46">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1597
       Absolute paths:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1598
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1599
      <p id="ch6oop_47">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1600
       An  absolute path is easily recognised from the leading forward slash, /. The / means that you start at the top level directory and continue down.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1601
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1602
      <p id="ch6oop_48">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1603
       For example to get to /boot/grub you would type:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1604
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1605
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1606
       $cd /boot/grub
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1607
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1608
      <p id="ch6oop_49">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1609
       This is an absolute path because you start at the top of the hierarchy and go downwards from there (it doesn't matter where in the filesystem you were when you typed the command).
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1610
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1611
      <p id="ch6oop_4a">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1612
       Relative paths:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1613
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1614
      <p id="ch6oop_4b">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1615
       A  relative path doesn't have a preceding slash. Use a relative path when you start from a directory below the top level directory structure. This is dependent on where you are in the filesystem.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1616
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1617
      <p id="ch6oop_4c">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1618
       For example if you are in root's home directory and want to get to /root/music, you type:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1619
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1620
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1621
       $ cd music
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1622
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1623
      <p id="ch6oop_4d">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1624
       Please note that there is no / using the above cd command. Using a / would cause this to be an absolute path, working from the top of the hierarchy downward.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1625
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1626
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1627
     <div class="section" title="3.4.who">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1628
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1629
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1630
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1631
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1632
          <a name="id2629085">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1633
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1634
          3.4.who
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1635
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1636
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1637
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1638
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1639
      <p id="ch6oop_4e">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1640
       The standard Unix command
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1641
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1642
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1643
         who
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1644
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1645
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1646
       displays a list of users who are currently logged into a computer.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1647
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1648
      <p id="ch6oop_4f">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1649
       The
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1650
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1651
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1652
         who
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1653
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1654
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1655
       command is related to the command
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1656
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1657
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1658
         w
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1659
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1660
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1661
       , which provides the same information but also displays additional data and statistics.:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1662
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1663
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1664
       $who
1
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1665
beeblebrox tty7         2009-09-08 10:50 (:0)
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1666
beeblebrox pts/0        2009-09-08 11:25 (:0.0)
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1667
dumbledore pts/1        2009-09-08 18:11 (potter.xyz.in)
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1668
beeblebrox pts/2        2009-09-08 18:53 (:0.0)
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1669
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1670
      <p id="ch6oop_50">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1671
       The command can be invoked with the arguments
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1672
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1673
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1674
         am i
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1675
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1676
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1677
       or
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1678
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1679
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1680
         am I
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1681
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1682
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1683
       (so it is invoked as
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1684
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1685
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1686
         who am i
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1687
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1688
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1689
       or * who am I*), showing information about the current terminal only (see the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1690
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1691
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1692
         -m
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1693
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1694
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1695
       option below, of which this invocation is equivalent).
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1696
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1697
      <p id="ch6oop_51">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1698
       In order to find out the various options that can be appended to the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1699
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1700
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1701
         who
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1702
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1703
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1704
       command, check the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1705
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1706
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1707
         man
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1708
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1709
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1710
       page by typing out the following in the terminal:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1711
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1712
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1713
       $man who
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1714
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1715
      <p id="ch6oop_52">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1716
       This will take you to the "Manual" page containing details about the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1717
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1718
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1719
         who
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1720
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1721
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1722
       command
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1723
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1724
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1725
     <div class="section" title="3.5.mkdir">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1726
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1727
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1728
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1729
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1730
          <a name="id2629165">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1731
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1732
          3.5.mkdir
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1733
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1734
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1735
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1736
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1737
      <p id="ch6oop_53">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1738
       This command is used to make a new directory. Normal usage is as straightforward as follows:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1739
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1740
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1741
       $mkdir name_of_directory
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1742
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1743
      <p id="ch6oop_54">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1744
       Where
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1745
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1746
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1747
         name_of_directory
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1748
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1749
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1750
       is the name of the directory one wants to create. When typed as above (ie. normal usage), the new directory would be created within the current directory. On Unix, multiple directories can be specified, and
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1751
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1752
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1753
         mkdir
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1754
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1755
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1756
       will try to create all of them.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1757
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1758
      <div class="section" title="3.5.1.Options">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1759
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1760
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1761
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1762
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1763
           <a name="id2629196">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1764
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1765
           3.5.1.Options
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1766
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1767
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1768
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1769
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1770
       <p id="ch6oop_55">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1771
        On Unix-like operating systems,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1772
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1773
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1774
          mkdir
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1775
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1776
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1777
        takes options. Three of the most common options are:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1778
       </p>
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1779
       <div class="itemizedlist">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1780
        <ul class="itemizedlist" type="*">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1781
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1782
          <p id="ch6oop_56">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1783
           <span class="emphasis">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1784
            <em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1785
             -p
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1786
            </em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1787
           </span>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1788
           : will also create all directories leading up to the given directory that do not exist already. If the given directory already exists, ignore the error.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1789
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1790
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1791
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1792
          <p id="ch6oop_57">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1793
           <span class="emphasis">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1794
            <em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1795
             -v
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1796
            </em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1797
           </span>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1798
           : display each directory that mkdir creates. Most often used with -p.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1799
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1800
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1801
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1802
          <p id="ch6oop_58">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1803
           <span class="emphasis">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1804
            <em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1805
             -m
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1806
            </em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1807
           </span>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1808
           : specify the octal permissions of directories created by mkdir.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1809
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1810
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1811
        </ul>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1812
       </div>
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1813
       <p id="ch6oop_59">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1814
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1815
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1816
          -p
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1817
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1818
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1819
        is most often used when using mkdir to build up complex directory hierarchies, in case a necessary directory is missing or already there. -m is commonly used to lock down temporary directories used by shell scripts.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1820
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1821
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1822
      <div class="section" title="3.5.2.Examples">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1823
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1824
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1825
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1826
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1827
           <a name="id2629252">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1828
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1829
           3.5.2.Examples
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1830
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1831
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1832
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1833
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1834
       <p id="ch6oop_5a">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1835
        An example of
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1836
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1837
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1838
          -p
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1839
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1840
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1841
        in action is:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1842
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1843
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1844
        $mkdir -p /tmp/a/b/c
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1845
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1846
       <p id="ch6oop_5b">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1847
        If
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1848
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1849
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1850
          /tmp/a
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1851
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1852
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1853
        exists but
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1854
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1855
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1856
          /tmp/a/b
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1857
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1858
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1859
        does not, mkdir will create
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1860
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1861
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1862
          /tmp/a/b
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1863
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1864
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1865
        before creating
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1866
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1867
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1868
          /tmp/a/b/c
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1869
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1870
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1871
        .
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1872
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1873
       <p id="ch6oop_5c">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1874
        And an even more powerful command, creating a full tree at once (this however is a Shell extension, nothing mkdir does itself):
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1875
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1876
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1877
        $mkdir -p tmpdir/{trunk/sources/{includes,docs},branches,tags}
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1878
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1879
       <p id="ch6oop_5d">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1880
        This will create:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1881
       </p>
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1882
       tmpdir  - branches
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1883
       <div class="itemizedlist">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1884
        <ul class="itemizedlist" type="*">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1885
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1886
          <p id="ch6oop_5e">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1887
           tag
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1888
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1889
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1890
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1891
          trunk - sources - includes
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1892
          <div class="itemizedlist">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1893
           <ul class="itemizedlist" type="*">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1894
            <li class="listitem" style="list-style-type: *">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1895
             <p id="ch6oop_5f">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1896
              docs
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1897
             </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1898
            </li>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1899
           </ul>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1900
          </div>
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1901
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1902
        </ul>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1903
       </div>
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1904
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1905
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1906
    </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1907
    <div class="section" title="4.Getting Help">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1908
     <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1909
      <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1910
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1911
        <h2 class="title" style="clear: both">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1912
         <a name="id2629326">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1913
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1914
         4.Getting Help
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1915
        </h2>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1916
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1917
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1918
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1919
     <div class="section" title="4.1.apropos and whatis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1920
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1921
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1922
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1923
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  1924
          <a name="id2629334">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1925
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1926
          4.1.apropos and whatis
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1927
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1928
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1929
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1930
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1931
      <p id="ch6oop_60">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1932
       This is a command to search the manual pages files in Unix and Unix-like operating systems.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1933
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1934
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1935
       $ apropos grep
1
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1936
egrep       egrep (1)       Search a file for a pattern using full regular expressions
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1937
fgrep       fgrep (1)       Search a file for a fixed-character string
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1938
fmlgrep     fmlgrep (1)     Search a file for a pattern
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1939
grep        grep (1)        Search a file for a pattern
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1940
gzgrep      gzgrep (1)      Search a possibly compressed file for a regular expression
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1941
nisgrep     nismatch (1)    Utilities for searching NIS+ tables
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1942
pgrep       pgrep (1)       Find or signal a process by name or other attribute
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1943
zgrep       zgrep (1)       Search a possibly compressed file for a regular expression
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1944
...
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1945
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1946
      <p id="ch6oop_61">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1947
       In this example, the user uses
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1948
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1949
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1950
         apropos
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1951
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1952
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1953
       to search for the string "grep", and apropos returns the indicated
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1954
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1955
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1956
         man
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1957
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1958
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1959
       pages that include the term "grep".
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1960
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1961
      <p id="ch6oop_62">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1962
       A short index of explanations for commands is available using the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1963
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1964
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1965
         whatis
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1966
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1967
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1968
       command, like in the examples below:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1969
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1970
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1971
       $whatis ls
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1972
ls (1)           - list directory contents
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1973
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1974
      <p id="ch6oop_63">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1975
       This displays short information about a command, and the first section in the collection of man pages that contains an appropriate page.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1976
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1977
      <p id="ch6oop_64">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1978
       If you don't know where to get started and which man page to read,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1979
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1980
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1981
         apropos
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1982
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1983
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1984
       gives more information. Say that you do not know how to start a browser, then you could enter the following command:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1985
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1986
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1987
       $apropos browser
1
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1988
gmusicbrowser (1)    - Jukebox for large collections of audio files
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1989
infobrowser (1)      - read Info documents
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1990
libsmbclient (7)     - An extension library for browsers and that               can be used...
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1991
opera (1)            - a standards-compliant graphical Web browser
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1992
sensible-browser (1) - sensible editing, paging, and web browsing
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1993
smbtree (1)          - A text based smb network browser
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1994
tvtk_doc (1)         - A GUI based TVTK documentation search browser.
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1995
viewres (1)          - graphical class browser for Xt
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1996
w3m (1)              - a text based Web browser and pager
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  1997
www-browser (1)      - a text based Web browser and pager
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1998
...
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  1999
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2000
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2001
     <div class="section" title="4.2.man">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2002
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2003
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2004
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2005
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2006
          <a name="id2629427">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2007
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2008
          4.2.man
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2009
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2010
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2011
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2012
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2013
      <p id="ch6oop_65">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2014
       Man pages (short for "manual pages") are the extensive documentation that comes preinstalled with almost all substantial Unix and Unix-like operating systems. The Unix command used to display them is
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2015
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2016
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2017
         man
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2018
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2019
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2020
       . Each page is a self-contained document.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2021
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2022
      <p id="ch6oop_66">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2023
       To read a manual page for a Unix command, one can use:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2024
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2025
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2026
       $ man &lt;command_name&gt;
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2027
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2028
      <p id="ch6oop_67">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2029
       at a shell prompt; for example, "man ftp". In order to simplify navigation through the output,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2030
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2031
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2032
         man
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2033
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2034
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2035
       generally uses the less terminal pager.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2036
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2037
      <p id="ch6oop_68">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2038
       Pages are traditionally referred to using the notation "name(section)"; for example, ftp(1). The same page name may appear in more than one section of the manual, this can occur when the names of system calls, user commands, or macro packages coincide. Two examples are
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2039
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2040
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2041
         man(1)
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2042
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2043
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2044
       and
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2045
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2046
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2047
         man(7)
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2048
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2049
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2050
       , or
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2051
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2052
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2053
         exit(2)
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2054
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2055
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2056
       and
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2057
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2058
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2059
         exit(3)
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2060
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2061
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2062
       . The syntax for accessing the non-default manual section varies between different man implementations. On Linux and
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2063
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2064
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2065
         BSD, for example, the syntax for reading *printf(3)
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2066
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2067
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2068
       is:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2069
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2070
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2071
       $man 3 printf
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2072
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2073
      <p id="ch6oop_69">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2074
       Another example:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2075
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2076
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2077
       $man man
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2078
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2079
      <p id="ch6oop_6a">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2080
       The previous example will take you to the "Manual" page entry about manual pages!
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2081
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2082
      <div class="section" title="4.2.1.Layout">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2083
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2084
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2085
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2086
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2087
           <a name="id2629507">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2088
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2089
           4.2.1.Layout
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2090
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2091
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2092
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2093
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2094
       <p id="ch6oop_6b">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2095
        All man pages follow a common layout that is optimized for presentation on a simple ASCII text display, possibly without any form of highlighting or font control. Sections present may include:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2096
       </p>
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2097
       NAME
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2098
       <p id="ch6oop_6c">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2099
        The name of the command or function, followed by a one-line description of what it does.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2100
       </p>
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2101
       SYNOPSIS
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2102
       <p id="ch6oop_6d">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2103
        In the case of a command, you get a formal description of how to run it and what command line options it takes. For program functions, a list of the parameters the function takes and which header file contains its definition. For experienced users, this may be all the documentation they need.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2104
       </p>
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2105
       DESCRIPTION
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2106
       <p id="ch6oop_6e">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2107
        A textual description of the functioning of the command or function.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2108
       </p>
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2109
       EXAMPLES
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2110
       <p id="ch6oop_6f">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2111
        Some examples of common usage.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2112
       </p>
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2113
       SEE ALSO
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2114
       <p id="ch6oop_70">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2115
        A list of related commands or functions.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2116
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2117
       <p id="ch6oop_71">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2118
        Other sections may be present, but these are not well standardized across man pages. Common examples include: OPTIONS, EXIT STATUS, ENVIRONMENT, KNOWN BUGS, FILES, AUTHOR, REPORTING BUGS, HISTORY and COPYRIGHT.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2119
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2120
       <p id="ch6oop_72">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2121
        These days virtually every Unix command line application comes with its man page, and many Unix users perceive a lack of man pages as a sign of low quality; indeed, some projects, such as Debian, go out of their way to write man pages for programs lacking one. Few alternatives to
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2122
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2123
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2124
          man
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2125
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2126
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2127
        have enjoyed much popularity, with the possible exception of the GNU project's "info" system, an early and simple hypertext system.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2128
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2129
       <p id="ch6oop_73">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2130
        However, the format of a single page for each application, the lack of classification within the sections and the relatively unsophisticated formatting facilities have motivated the development of alternative documentation systems, such as the previously mentioned "info" system.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2131
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2132
       <p id="ch6oop_74">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2133
        Most Unix GUI applications (particularly those built using the GNOME and KDE development environments) now provide end-user documentation in HTML and include embedded HTML viewers such as yelp for reading the help within the application.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2134
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2135
       <p id="ch6oop_75">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2136
        Usually the man pages are written in English. Translations into other languages can be also available on the system.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2137
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2138
       <p id="ch6oop_76">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2139
        The default format of the man pages is troff, with either the macro package man (appearance oriented) or on some systems mdoc (semantic oriented). This makes it possible to typeset a man page to PostScript, PDF and various other formats for viewing or printing.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2140
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2141
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2142
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2143
     <div class="section" title="4.3.info">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2144
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2145
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2146
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2147
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2148
          <a name="id2629613">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2149
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2150
          4.3.info
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2151
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2152
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2153
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2154
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2155
      <p id="ch6oop_77">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2156
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2157
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2158
         info
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2159
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2160
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2161
       is a software utility which forms a hypertextual, multipage documentation and help viewer working on a command line interface, useful when there is no GUI available.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2162
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2163
      <p id="ch6oop_78">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2164
       The syntax is
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2165
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2166
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2167
       $ info &lt;command_name&gt;
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2168
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2169
      <p id="ch6oop_79">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2170
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2171
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2172
         info
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2173
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2174
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2175
       processes info files, which are Texinfo formatted files, and presents the documentation as a tree, with simple commands to traverse the tree and to follow cross references. For instance
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2176
      </p>
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2177
      <div class="itemizedlist">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2178
       <ul class="itemizedlist" type="*">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2179
        <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2180
         <p id="ch6oop_7a">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2181
          <span class="emphasis">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2182
           <em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2183
            n
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2184
           </em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2185
          </span>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2186
          goes to the next page.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2187
         </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2188
        </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2189
        <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2190
         <p id="ch6oop_7b">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2191
          <span class="emphasis">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2192
           <em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2193
            p
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2194
           </em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2195
          </span>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2196
          goes to the previous page.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2197
         </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2198
        </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2199
        <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2200
         <p id="ch6oop_7c">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2201
          <span class="emphasis">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2202
           <em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2203
            u
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2204
           </em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2205
          </span>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2206
          goes to the upper page.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2207
         </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2208
        </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2209
        <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2210
         <p id="ch6oop_7d">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2211
          <span class="emphasis">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2212
           <em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2213
            l
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2214
           </em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2215
          </span>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2216
          goes to the last(visited) node
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2217
         </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2218
        </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2219
        <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2220
         <p id="ch6oop_7e">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2221
          To follow a cross reference, the cursor can be moved over a link (a word preceded by a *) and enter pressed.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2222
         </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2223
        </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2224
       </ul>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2225
      </div>
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2226
      <p id="ch6oop_7f">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2227
       info was initially written for use with GNU/Linux and then ported to other Unix-like operating systems.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2228
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2229
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2230
     <div class="section" title="4.4.--help">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2231
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2232
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2233
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2234
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2235
          <a name="id2629699">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2236
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2237
          4.4.--help
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2238
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2239
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2240
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2241
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2242
      <p id="ch6oop_80">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2243
       Most GNU commands support the --help, which gives a short explanation about how to use the command and a list of available options. Below is the output of this option with the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2244
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2245
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2246
         cat
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2247
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2248
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2249
       command:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2250
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2251
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2252
       $ userprompt@host: cat --help
1
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2253
Usage: cat [OPTION] [FILE]...
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2254
Concatenate FILE(s), or standard input, to standard output.
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2255
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2256
  -A, --show-all           equivalent to -vET
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2257
  -b, --number-nonblank    number nonempty output lines
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2258
  -e                       equivalent to -vE
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2259
  -E, --show-ends          display $ at end of each line
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2260
  -n, --number             number all output lines
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2261
  -s, --squeeze-blank      suppress repeated empty output lines
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2262
  -t                       equivalent to -vT
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2263
  -T, --show-tabs          display TAB characters as ^I
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2264
  -u                       (ignored)
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2265
  -v, --show-nonprinting   use ^ and M- notation, except for LFD and              TAB
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2266
  --help     display this help and exit
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2267
  --version  output version information and exit
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2268
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2269
With no FILE, or when FILE is -, read standard input.
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2270
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2271
Examples:
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2272
  cat f - g  Output f's contents, then standard input, then g's           contents.
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2273
  cat        Copy standard input to standard output.
0
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
  2274
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2275
Report bugs to &lt;bug-coreutils@gnu.org&gt;.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2276
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2277
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2278
    </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2279
    <div class="section" title="5.Basic file handling">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2280
     <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2281
      <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2282
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2283
        <h2 class="title" style="clear: both">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2284
         <a name="id2629753">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2285
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2286
         5.Basic file handling
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2287
        </h2>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2288
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2289
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2290
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2291
     <div class="section" title="5.1.cp">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2292
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2293
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2294
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2295
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2296
          <a name="id2629761">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2297
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2298
          5.1.cp
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2299
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2300
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2301
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2302
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2303
      <p id="ch6oop_81">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2304
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2305
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2306
         cp
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2307
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2308
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2309
       is the command entered in a Unix shell to copy a file from one place to another, possibly on a different filesystem. The original file remains unchanged, and the new file may have the same or a different name.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2310
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2311
      <div class="section" title="5.1.1.Usage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2312
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2313
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2314
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2315
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2316
           <a name="id2629779">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2317
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2318
           5.1.1.Usage
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2319
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2320
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2321
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2322
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2323
       <p id="ch6oop_82">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2324
        To copy a file to another file:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2325
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2326
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2327
        $ cp [ -f ] [ -H ] [ -i ] [ -p ][ -- ] SourceFile TargetFile
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2328
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2329
       <p id="ch6oop_83">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2330
        To copy a file to a directory:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2331
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2332
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2333
        $ cp [ -f ] [ -H ] [ -i ] [ -p ] [ -r | -R ] [ -- ] SourceFile ...              TargetDirectory
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2334
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2335
       <p id="ch6oop_84">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2336
        To copy a directory to a directory:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2337
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2338
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2339
        $ cp [ -f ] [ -H ] [ -i ] [ -p ] [ -- ] { -r | -R }
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2340
SourceDirectory ... TargetDirectory
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2341
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2342
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2343
      <div class="section" title="5.1.2.Flags">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2344
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2345
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2346
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2347
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2348
           <a name="id2629813">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2349
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2350
           5.1.2.Flags
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2351
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2352
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2353
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2354
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2355
       <p id="ch6oop_85">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2356
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2357
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2358
          -f
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2359
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2360
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2361
        (force)  specifies removal of the target file if it cannot be opened for write operations. The removal precedes any copying performed by the cp command.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2362
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2363
       <p id="ch6oop_86">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2364
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2365
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2366
          -P
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2367
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2368
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2369
        makes the cp command copy symbolic links. The default is to follow symbolic links, that is, to copy files to which symbolic links point.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2370
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2371
       <p id="ch6oop_87">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2372
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2373
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2374
          -i
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2375
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2376
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2377
        (interactive)  prompts you with the name of a file to be overwritten. This occurs if the TargetDirectory or TargetFile parameter contains a file with the same name as a file specified in the SourceFile or SourceDirectory parameter. If you enter y or the locale's equivalent of y, the cp command continues. Any other answer prevents the cp command from overwriting the file.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2378
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2379
       <p id="ch6oop_88">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2380
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2381
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2382
          -p
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2383
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2384
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2385
        (preserve)  duplicates the following characteristics of each SourceFile/SourceDirectory in the corresponding TargetFile and/or TargetDirectory:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2386
       </p>
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2387
       <div class="itemizedlist">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2388
        <ul class="itemizedlist" type="*">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2389
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2390
          <p id="ch6oop_89">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2391
           The time of the last data modification and the time of the last access.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2392
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2393
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2394
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2395
          <p id="ch6oop_8a">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2396
           The user ID and group ID (only if it has permissions to do this)
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2397
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2398
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2399
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2400
          <p id="ch6oop_8b">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2401
           The file permission bits and the SUID and SGID bits.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2402
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2403
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2404
        </ul>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2405
       </div>
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2406
       <p id="ch6oop_8c">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2407
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2408
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2409
          -R
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2410
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2411
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2412
        (recursive)  copy directories (recursively copying all the contents)
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2413
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2414
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2415
      <div class="section" title="5.1.3.Examples">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2416
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2417
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2418
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2419
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2420
           <a name="id2629909">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2421
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2422
           5.1.3.Examples
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2423
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2424
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2425
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2426
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2427
       <p id="ch6oop_8d">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2428
        To make a copy of a file in the current directory, enter:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2429
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2430
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2431
        $ cp prog.c prog.bak
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2432
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2433
       <p id="ch6oop_8e">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2434
        This copies prog.c to prog.bak. If the prog.bak file does not already exist, the cp command creates it. If it does exist, the cp command replaces it with a copy of the prog.c file.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2435
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2436
       <p id="ch6oop_8f">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2437
        To copy a file in your current directory into another directory, enter:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2438
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2439
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2440
        $ cp zaphod /home/books/hhgg
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2441
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2442
       <p id="ch6oop_90">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2443
        This copies the jones file to /home/books/hhgg/zaphod.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2444
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2445
       <p id="ch6oop_91">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2446
        To copy a file to a new file and preserve the modification date, time, and access control list associated with the source file, enter:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2447
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2448
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2449
        $ cp -p martin_luther_king martin_luther_king.jr
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2450
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2451
       <p id="ch6oop_92">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2452
        This copies the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2453
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2454
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2455
          martin_luther_king
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2456
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2457
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2458
        file to the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2459
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2460
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2461
          martin_luther_king.jr
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2462
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2463
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2464
        file. Instead of creating the file with the current date and time stamp, the system gives the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2465
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2466
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2467
          martin_luther_king.jr
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2468
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2469
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2470
        file the same date and time as the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2471
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2472
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2473
          martin_luther_king
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2474
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2475
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2476
        file. The
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2477
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2478
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2479
          martin_luther_king.jr
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2480
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2481
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2482
        file also inherits the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2483
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2484
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2485
          martin_luther_king
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2486
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2487
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2488
        file's access control protection.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2489
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2490
       <p id="ch6oop_93">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2491
        To copy all the files in a directory to a new directory, enter:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2492
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2493
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2494
        $ cp /home/galactica/clients/* /home/hhgg/customers
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2495
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2496
       <p id="ch6oop_94">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2497
        This copies only the files in the clients directory to the customers directory.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2498
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2499
       <p id="ch6oop_95">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2500
        To copy a directory, including all its files and subdirectories, to another directory, enter:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2501
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2502
       <p id="ch6oop_96">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2503
        $ cp -R /home/hhgg/clients /home/hhgg/customers
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2504
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2505
       <p id="ch6oop_97">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2506
        This copies the clients directory, including all its files, subdirectories, and the files in those subdirectories, to the customers/clients directory.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2507
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2508
       <p id="ch6oop_98">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2509
        To copy a specific set of files of any extension to another directory, enter:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2510
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2511
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2512
        $ cp zaphod arthur ford /home/hhgg/clients
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2513
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2514
       <p id="ch6oop_99">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2515
        This copies the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2516
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2517
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2518
          zaphod
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2519
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2520
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2521
        ,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2522
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2523
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2524
          arthur
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2525
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2526
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2527
        , and
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2528
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2529
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2530
          ford
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2531
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2532
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2533
        files in your current working directory to the /home/hhgg/clients directory.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2534
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2535
       <p id="ch6oop_9a">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2536
        To use pattern-matching characters to copy files, enter:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2537
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2538
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2539
        $ cp programs/*.py .
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2540
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2541
       <p id="ch6oop_9b">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2542
        This copies the files in the programs directory that end with
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2543
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2544
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2545
          .py
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2546
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2547
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2548
        to the current directory, signified by the single "." (dot). You must type a space between the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2549
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2550
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2551
          py
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2552
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2553
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2554
        and the final dot.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2555
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2556
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2557
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2558
     <div class="section" title="5.2.mv">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2559
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2560
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2561
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2562
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2563
          <a name="id2630070">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2564
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2565
          5.2.mv
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2566
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2567
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2568
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2569
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2570
      <p id="ch6oop_9c">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2571
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2572
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2573
         mv
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2574
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2575
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2576
       (short for move) is a Unix command that moves one or more files or directories from one place to another. The original file is deleted, and the new file may have the same or a different name. If possible (i.e. when the original and new files are on the same file system),
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2577
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2578
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2579
         mv
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2580
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2581
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2582
       will rename the file instead. Write permission is required on all directories being modified.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2583
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2584
      <div class="section" title="5.2.1.Conflicting existing file">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2585
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2586
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2587
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2588
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2589
           <a name="id2630094">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2590
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2591
           5.2.1.Conflicting existing file
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2592
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2593
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2594
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2595
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2596
       <p id="ch6oop_9d">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2597
        In all cases, when a file is moved to have the name of an existing file (in the same directory), the existing file is deleted. If the existing file is not writable but is in a directory that is writable, then the mv command asks for confirmation if possible (i.e. if run from a terminal) before proceeding, unless the -f (force) option is used.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2598
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2599
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2600
      <div class="section" title="5.2.2.Differences with copy and delete">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2601
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2602
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2603
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2604
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2605
           <a name="id2630113">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2606
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2607
           5.2.2.Differences with copy and delete
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2608
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2609
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2610
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2611
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2612
       <p id="ch6oop_9e">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2613
        Note that, usually, when moving files within the same volume, moving (and/or renaming) is not the same as simply copying and then deleting the original. When moving a file, the link is simply removed from the old parent directory and added to the new parent directory. However, the file itself is untouched (i.e. it has the same inodes and resides at the same place on the disk). For example, you cannot copy a file you cannot read, but you can move (and/or rename) it (provided you have write permission to its old and new parent directories). Also, suppose there is a non-empty directory you do not have write permission to. You cannot delete this directory (since you cannot delete its contents); but you can move (and/or rename) it. Also, since moving between filenames on a single volume does not involve copying, it is faster and does not place strain of lots of reads and writes on the disk. Moving files across different volumes, however, does necessitate copying and deleting.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2614
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2615
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2616
      <div class="section" title="5.2.3.Examples">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2617
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2618
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2619
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2620
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2621
           <a name="id2630143">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2622
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2623
           5.2.3.Examples
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2624
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2625
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2626
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2627
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2628
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2629
        $ mv myfile mynewfilename    renames a file
1
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2630
$ mv myfile otherfilename    renames a file and deletes the existing            file "myfile"
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2631
$ mv myfile /myfile          moves 'myfile' from the current            directory to the root directory
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2632
$ mv myfile dir/myfile       moves 'myfile' to 'dir/myfile' relative            to the current directory
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2633
$ mv myfile dir              same as the previous command (the          filename is implied to be the same)
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2634
$ mv myfile dir/myfile2      moves 'myfile' to dir and renames it to            'myfile2'
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2635
$ mv foo bar baz dir         moves multiple files to directory dir
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  2636
$ mv --help                  shows a very concise help about the                syntax of the command
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2637
$ man mv                     prints an extensive user manual for                'mv' in the terminal
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2638
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2639
       <p id="ch6oop_9f">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2640
        In all cases, the file or files being moved or renamed can be a directory.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2641
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2642
       <p id="ch6oop_a0">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2643
        Note that when the command is called with two arguments (as
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2644
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2645
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2646
          mv name1 name2
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2647
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2648
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2649
        or
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2650
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2651
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2652
          mv name1 /dir/name2
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2653
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2654
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2655
        ), it can have three different effects, depending on whether
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2656
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2657
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2658
          name2
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2659
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2660
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2661
        does not exist, is an existing file, or is an existing directory. If the user intends to refer to an existing directory,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2662
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2663
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2664
          /.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2665
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2666
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2667
        (or in some Unix versions
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2668
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2669
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2670
          /
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2671
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2672
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2673
        is sufficient) may be appended to the name to force the system to check this. To move a file to a new directory, the directory must be created first.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2674
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2675
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2676
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2677
     <div class="section" title="5.3.rm">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2678
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2679
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2680
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2681
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2682
          <a name="id2627868">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2683
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2684
          5.3.rm
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2685
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2686
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2687
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2688
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2689
      <p id="ch6oop_a1">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2690
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2691
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2692
         rm
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2693
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2694
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2695
       (short for "remove") is one of several basic Unix command lines that operates on files. It is used to delete files from a filesystem. The data is not actually destroyed. Only the index listing where the file is stored is destroyed, and the storage is made available for reuse. There are undelete utilities that will attempt to reconstruct the index and can bring the file back if the parts were not reused.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2696
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2697
      <p id="ch6oop_a2">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2698
       Here's example to remove a file named "foo" from a directory, here shown with the -i option:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2699
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2700
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2701
       $ rm -i foo
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2702
remove foo? y
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2703
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2704
      <div class="section" title="5.3.1.Options">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2705
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2706
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2707
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2708
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2709
           <a name="id2627898">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2710
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2711
           5.3.1.Options
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2712
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2713
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2714
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2715
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2716
       <p id="ch6oop_a3">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2717
        Common options that rm accepts include:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2718
       </p>
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2719
       <div class="itemizedlist">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2720
        <ul class="itemizedlist" type="*">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2721
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2722
          <p id="ch6oop_a4">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2723
           <span class="emphasis">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2724
            <em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2725
             -r
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2726
            </em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2727
           </span>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2728
           , which removes directories, removing the contents recursively beforehand (so as not to leave files without a directory to reside in) ("recursive")
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2729
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2730
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2731
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2732
          <p id="ch6oop_a5">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2733
           <span class="emphasis">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2734
            <em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2735
             -i
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2736
            </em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2737
           </span>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2738
           , which asks for every deletion to be confirmed ("interactive")
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2739
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2740
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2741
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2742
          <p id="ch6oop_a6">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2743
           <span class="emphasis">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2744
            <em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2745
             -f
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2746
            </em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2747
           </span>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2748
           , which ignores non-existent files and overrides any confirmation prompts ("force")
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2749
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2750
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2751
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2752
          <p id="ch6oop_a7">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2753
           <span class="emphasis">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2754
            <em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2755
             -v
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2756
            </em>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2757
           </span>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2758
           , which shows what is being removed as it happens ("verbose")
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2759
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2760
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2761
        </ul>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2762
       </div>
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2763
       <p id="ch6oop_a8">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2764
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2765
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2766
          rm
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2767
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2768
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2769
        is often aliased to "rm -i" so as to avoid accidental deletion of files. If a user still wishes to delete a large number of files without confirmation, they can manually cancel out the -i argument by adding the -f option (as the option specified later on the expanded command line "rm -i -f" takes precedence).
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2770
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2771
       <p id="ch6oop_a9">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2772
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2773
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2774
          rm -rf
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2775
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2776
        </span>
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2777
        (variously, rm -rf /, rm -rf *, and others) is frequently used in jokes and anecdotes about Unix disasters. The rm -rf variant of the command, if run by a superuser on the root directory, would cause the contents of every writable mounted filesystem on the computer to be deleted.
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2778
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2779
       <p id="ch6oop_aa">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2780
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2781
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2782
          rm
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2783
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2784
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2785
        is often used in conjunction with xargs to supply a list of files to delete:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2786
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2787
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2788
        xargs rm &lt; filelist
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2789
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2790
       <p id="ch6oop_ab">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2791
        When
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2792
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2793
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2794
          rm
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2795
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2796
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2797
        is used on a symbolic link, it deletes the link, but does not affect the target of the link.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2798
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2799
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2800
      <div class="section" title="5.3.2.Permissions">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2801
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2802
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2803
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2804
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2805
           <a name="id2630465">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2806
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2807
           5.3.2.Permissions
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2808
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2809
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2810
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2811
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2812
       <p id="ch6oop_ac">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2813
        Usually, on most filesystems, deleting a file requires write permission on the parent directory (and execute permission, in order to enter the directory in the first place). (Note that, confusingly for beginners, permissions on the file itself are irrelevant. However, GNU rm asks for confirmation if a write-protected file is to be deleted, unless the -f option is used.)
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2814
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2815
       <p id="ch6oop_ad">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2816
        To delete a directory (with rm -r), one must delete all of its contents recursively. This requires that one must have read and write and execute permission to that directory (if it's not empty) and all non-empty subdirectories recursively (if there are any). The read permissions are needed to list the contents of the directory in order to delete them. This sometimes leads to an odd situation where a non-empty directory cannot be deleted because one doesn't have write permission to it and so cannot delete its contents; but if the same directory were empty, one would be able to delete it.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2817
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2818
       <p id="ch6oop_ae">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2819
        If a file resides in a directory with the sticky bit set, then deleting the file requires one to be the owner of the file.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2820
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2821
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2822
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2823
    </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2824
    <div class="section" title="6.Command Line Arguments">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2825
     <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2826
      <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2827
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2828
        <h2 class="title" style="clear: both">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2829
         <a name="id2630515">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2830
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2831
         6.Command Line Arguments
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2832
        </h2>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2833
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2834
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2835
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2836
     <p id="ch6oop_af">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2837
      In computer command line interfaces, a command line argument is an argument sent to a program being called. In general, a program can take any number of command line arguments, which may be necessary for the program to run, or may even be ignored, depending on the function of that program.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2838
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2839
     <p id="ch6oop_b0">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2840
      For example, in Unix and Unix-like environments, an example of a command-line argument is:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2841
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2842
     <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2843
      rm file.s
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2844
     </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2845
     <p id="ch6oop_b1">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2846
      "file.s" is a command line argument which tells the program rm to remove the file "file.s".
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2847
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2848
     <p id="ch6oop_b2">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2849
      Programming languages such as C, C++ and Java allow a program to interpret the command line arguments by handling them as string parameters in the main function.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2850
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2851
     <p id="ch6oop_b3">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2852
      A command line option or simply
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2853
      <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2854
       <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2855
        option
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2856
       </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2857
      </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2858
      (also known as a command line parameter, flag, or a switch) is an indication by a user that a computer program should change its default output.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2859
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2860
     <p id="ch6oop_b4">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2861
      Long options are introduced via "--", and are typically whole words. For example,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2862
      <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2863
       <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2864
        ls --long --classify --all
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2865
       </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2866
      </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2867
      . Arguments to long options are provided with "=", as
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2868
      <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2869
       <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2870
        ls --block-size=1024
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2871
       </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2872
      </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2873
      . Some Unix programs use long options with single dashes, for example MPlayer as in
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2874
      <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2875
       <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2876
        mplayer -nosound
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2877
       </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2878
      </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2879
      .
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2880
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2881
     <p id="ch6oop_b5">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2882
      Linux also uses "--" to terminate option lists. For example, an attempt to delete a file called
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2883
      <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2884
       <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2885
        -file1
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2886
       </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2887
      </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2888
      by using
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2889
      <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2890
       <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2891
        rm -file1
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2892
       </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2893
      </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2894
      may produce an error, since rm may interpret
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2895
      <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2896
       <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2897
        -file1
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2898
       </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2899
      </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2900
      as a command line switch. Using
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2901
      <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2902
       <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2903
        rm -- -file1
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2904
       </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2905
      </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2906
      removes ambiguity.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2907
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2908
    </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2909
    <div class="section" title="7.Basic Text Processing">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2910
     <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2911
      <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2912
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2913
        <h2 class="title" style="clear: both">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2914
         <a name="id2630608">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2915
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2916
         7.Basic Text Processing
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2917
        </h2>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2918
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2919
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2920
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2921
     <div class="section" title="7.1.head">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2922
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2923
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2924
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2925
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2926
          <a name="id2630617">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2927
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2928
          7.1.head
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2929
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2930
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2931
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2932
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2933
      <p id="ch6oop_b6">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2934
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2935
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2936
         head
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2937
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2938
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2939
       is a program on Unix and Unix-like systems used to display the first few lines of a text file or piped data. The command syntax is:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2940
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2941
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2942
       $ head [options] &lt;file_name&gt;
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2943
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2944
      <p id="ch6oop_b7">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2945
       By default,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2946
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2947
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2948
         head
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2949
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2950
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2951
       will print the first 10 lines of its input to the standard output. The number of lines printed may be changed with a command line option. The following example shows the first 20 lines of filename:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2952
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2953
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2954
       $ head -n 20 filename
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2955
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2956
      <p id="ch6oop_b8">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2957
       This displays the first 5 lines of all files starting with
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2958
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2959
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2960
         foo
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2961
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2962
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2963
       :
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2964
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2965
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2966
       $ head -n 5 foo*
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2967
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2968
      <p id="ch6oop_b9">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2969
       Some versions omit the n and just let you say -5.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2970
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2971
      <div class="section" title="7.1.1.Flags">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2972
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2973
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2974
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2975
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  2976
           <a name="id2630668">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2977
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2978
           7.1.1.Flags
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2979
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2980
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2981
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2982
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2983
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2984
        -c &lt;x number of bytes&gt; Copy first x number of bytes.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2985
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2986
       <p id="ch6oop_ba">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2987
        Other options:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2988
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2989
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2990
          sed
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2991
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2992
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2993
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2994
       <p id="ch6oop_bb">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2995
        Many early versions of Unix did not have this command, and so documentation and books had
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2996
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2997
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2998
          sed
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  2999
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3000
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3001
        do this job:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3002
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3003
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3004
        sed 5q foo
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3005
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3006
       <p id="ch6oop_bc">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3007
        This says to print every line (implicit), and quit after the fifth.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3008
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3009
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3010
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3011
     <div class="section" title="7.2.tail">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3012
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3013
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3014
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3015
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3016
          <a name="id2630704">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3017
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3018
          7.2.tail
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3019
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3020
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3021
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3022
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3023
      <p id="ch6oop_bd">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3024
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3025
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3026
         tail
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3027
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3028
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3029
       is a program on Unix and Unix-like systems used to display the last few lines of a text file or piped data.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3030
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3031
      <p id="ch6oop_be">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3032
       The command-syntax is:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3033
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3034
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3035
       $ tail [options] &lt;file_name&gt;
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3036
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3037
      <p id="ch6oop_bf">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3038
       By default,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3039
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3040
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3041
         tail
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3042
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3043
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3044
       will print the last 10 lines of its input to the standard output. With command line options the number of lines printed and the printing units (lines, blocks or bytes) may be changed. The following example shows the last 20 lines of filename:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3045
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3046
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3047
       $ tail -n 20 filename
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3048
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3049
      <p id="ch6oop_c0">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3050
       This example shows the last 15 bytes of all files starting with
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3051
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3052
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3053
         foo
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3054
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3055
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3056
       :
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3057
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3058
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3059
       $ tail -c 15 foo*
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3060
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3061
      <p id="ch6oop_c1">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3062
       This example shows all lines of filename from the second line onwards:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3063
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3064
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3065
       $ tail -n +2 filename
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3066
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3067
      <p id="ch6oop_c2">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3068
       Using an older syntax (still used in Sun Solaris as the -n option is not supported), the last 20 lines and the last 50 bytes of filename can be shown with the following command:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3069
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3070
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3071
       $ tail -20 filename
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3072
$ tail -50c filename
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3073
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3074
      <p id="ch6oop_c3">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3075
       However this syntax is now obsolete and does not conform with the POSIX 1003.1-2001 standard. Even if still supported in current versions, when used with other options (like -f, see below), these switches could not work at all.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3076
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3077
      <div class="section" title="7.2.1.File monitoring">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3078
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3079
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3080
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3081
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3082
           <a name="id2630782">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3083
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3084
           7.2.1.File monitoring
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3085
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3086
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3087
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3088
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3089
       <p id="ch6oop_c4">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3090
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3091
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3092
          tail
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3093
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3094
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3095
        has a special command line option
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3096
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3097
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3098
          -f
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3099
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3100
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3101
        (follow) that allows a file to be monitored. Instead of displaying the last few lines and exiting, tail displays the lines and then monitors the file. As new lines are added to the file by another process, tail updates the display. This is particularly useful for monitoring log files. The following command will display the last 10 lines of messages and append new lines to the display as new lines are added to messages:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3102
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3103
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3104
        $ tail -f /var/adm/messages
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3105
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3106
       <p id="ch6oop_c5">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3107
        To interrupt tail while it is monitoring, break-in with
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3108
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3109
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3110
          Ctrl+C
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3111
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3112
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3113
        . This command can be run "in the background" with &amp;, see job control.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3114
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3115
       <p id="ch6oop_c6">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3116
        If you have a command's result to monitor, you can use the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3117
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3118
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3119
          watch
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3120
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3121
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3122
        command.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3123
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3124
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3125
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3126
     <div class="section" title="7.3.cut">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3127
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3128
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3129
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3130
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3131
          <a name="id2630831">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3132
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3133
          7.3.cut
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3134
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3135
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3136
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3137
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3138
      <p id="ch6oop_c7">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3139
       In computing,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3140
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3141
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3142
         cut
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3143
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3144
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3145
       is a Unix command line utility which is used to extract sections from each line of input  usually from a file.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3146
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3147
      <p id="ch6oop_c8">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3148
       Extraction of line segments can typically be done by
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3149
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3150
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3151
         bytes (-b), characters (-c)
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3152
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3153
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3154
       , or
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3155
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3156
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3157
         fields (-f)
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3158
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3159
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3160
       separated by a
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3161
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3162
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3163
         delimiter (-d  the tab character by default)
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3164
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3165
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3166
       . A range must be provided in each case which consists of one of N, N-M, N- (N to the end of the line), or -M (beginning of the line to M), where N and M are counted from 1 (there is no zeroth value). Since version 6, an error is thrown if you include a zeroth value. Prior to this the value was ignored and assumed to be 1.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3167
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3168
      <p id="ch6oop_c9">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3169
       Assuming a file named file containing the lines:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3170
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3171
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3172
       foo:bar:baz:qux:quux
1
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  3173
one:two:three:four:five:six:seven
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3174
alpha:beta:gamma:delta:epsilon:zeta:eta:teta:iota:kappa:lambda:mu
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3175
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3176
      <p id="ch6oop_ca">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3177
       To output the fourth through tenth characters of each line:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3178
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3179
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3180
       $ cut -c 4-10 file
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3181
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3182
      <p id="ch6oop_cb">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3183
       This gives the output:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3184
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3185
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3186
       :bar:ba
1
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  3187
:two:th
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3188
ha:beta
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3189
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3190
      <p id="ch6oop_cc">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3191
       To output the fifth field through the end of the line of each line using the colon character as the field delimiter:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3192
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3193
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3194
       $ cut -d : -f 5- file
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3195
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3196
      <p id="ch6oop_cd">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3197
       This gives the output:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3198
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3199
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3200
       quux
1
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  3201
five:six:seven
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3202
epsilon:zeta:eta:teta:iota:kappa:lambda:mu
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3203
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3204
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3205
     <div class="section" title="7.4.paste">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3206
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3207
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3208
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3209
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3210
          <a name="id2630917">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3211
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3212
          7.4.paste
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3213
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3214
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3215
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3216
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3217
      <p id="ch6oop_ce">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3218
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3219
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3220
         paste
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3221
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3222
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3223
       is a Unix command line utility which is used to join files horizontally (parallel merging) by outputting lines consisting of the sequentially corresponding lines of each file specified, separated by tabs, to the standard output. It is effectively the horizontal equivalent to the utility
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3224
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3225
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3226
         cat
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3227
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3228
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3229
       command which operates on the vertical plane of two or more files.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3230
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3231
      <p id="ch6oop_cf">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3232
       To paste several columns of data together into the file
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3233
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3234
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3235
         www
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3236
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3237
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3238
       from files
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3239
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3240
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3241
         who
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3242
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3243
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3244
       ,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3245
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3246
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3247
         where
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3248
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3249
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3250
       , and
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3251
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3252
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3253
         when
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3254
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3255
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3256
       :
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3257
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3258
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3259
       $ paste who where when &gt; www
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3260
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3261
      <p id="ch6oop_d0">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3262
       If the files contain:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3263
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3264
      <table summary="paste" border="1">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3265
       <colgroup>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3266
        <col width="11">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3267
        </col>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3268
        <col width="12">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3269
        </col>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3270
        <col width="12">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3271
        </col>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3272
       </colgroup>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3273
      </table>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3274
      <p id="ch6oop_dd">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3275
       This creates the file named
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3276
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3277
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3278
         www
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3279
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3280
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3281
       containing:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3282
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3283
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3284
       Batman            GothamCity       January 3
1
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  3285
Trillian          Andromeda        February 4
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3286
Jeeves            London           March 19
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3287
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3288
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3289
    </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3290
    <div class="section" title="8.Shell Meta Characters">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3291
     <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3292
      <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3293
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3294
        <h2 class="title" style="clear: both">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3295
         <a name="id2631052">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3296
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3297
         8.Shell Meta Characters
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3298
        </h2>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3299
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3300
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3301
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3302
     <p id="ch6oop_de">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3303
      Unix recognizes certain special characters, called "meta characters," as command directives. The shell meta characters are recognized anywhere they appear in the command line, even if they are not surrounded by blank space. For that reason, it is safest to only use the characters A-Z, a-z, 0-9, and the period, dash, and underscore characters when naming files and directories on Unix. If your file or directory has a shell meta character in the name, you will find it difficult to use the name in a shell command.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3304
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3305
     <p id="ch6oop_df">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3306
      The shell meta characters include:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3307
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3308
     <p id="ch6oop_e0">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3309
      / &lt; &gt; ! $ % ^ &amp; * | { } [ ] " ' ` ~ ;
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3310
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3311
     <p id="ch6oop_e1">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3312
      Different shells may differ in the meta characters recognized.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3313
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3314
     <p id="ch6oop_e2">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3315
      As an example,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3316
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3317
     <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3318
      $ ls file.*
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3319
     </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3320
     <p id="ch6oop_e3">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3321
      run on a directory containing the files file, file.c, file.lst, and myfile would list the files file.c and file.lst. However,:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3322
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3323
     <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3324
      $ ls file.?
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3325
     </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3326
     <p id="ch6oop_e4">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3327
      run on the same directory would only list file.c because the ? only matches one character, no more, no less. This can save you a great deal of typing time. For example, if there is a file called california_cornish_hens_with_wild_rice and no other files whose names begin with 'c', you could view the file without typing the whole name by typing this:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3328
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3329
     <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3330
      $ more c*
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3331
     </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3332
     <p id="ch6oop_e5">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3333
      because the c* matches that long file name.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3334
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3335
     <p id="ch6oop_e6">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3336
      Filenames containing metacharacters can pose many problems and should never be intentionally created. If you do find that you've created a file with metacharacters, and you would like to remove it, you have three options. You may use wildcards to match metacharacter, use the  to directly enter the filename, or put the command in double quotes (except in the case of double quotes within the file name, these must be captured with one of the first two methods). For example, deleting a file named "``*`|more"` can be accomplished with:
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3337
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3338
     <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3339
      $ rm ??more
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3340
     </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3341
     <p id="ch6oop_e7">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3342
      or:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3343
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3344
     <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3345
      $ rm $\backslash$*$\backslash$|more
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3346
     </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3347
     <p id="ch6oop_e8">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3348
      or:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3349
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3350
     <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3351
      $ rm ''*|more''
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3352
     </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3353
    </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3354
    <div class="section" title="9.Looking At Files">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3355
     <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3356
      <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3357
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3358
        <h2 class="title" style="clear: both">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3359
         <a name="id2631155">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3360
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3361
         9.Looking At Files
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3362
        </h2>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3363
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3364
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3365
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3366
     <div class="section" title="9.1.cat">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3367
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3368
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3369
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3370
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3371
          <a name="id2631164">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3372
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3373
          9.1.cat
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3374
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3375
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3376
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3377
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3378
      <p id="ch6oop_e9">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3379
       The
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3380
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3381
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3382
         cat
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3383
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3384
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3385
       command is a standard Unix program used to concatenate and display files. The name is from "catenate", a synonym of
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3386
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3387
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3388
         concatenate
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3389
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3390
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3391
       .
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3392
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3393
      <p id="ch6oop_ea">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3394
       The Single Unix Specification specifies the behavior that the contents of each of the files given in sequence as arguments will be written to the standard output in the same sequence, and mandates one option, -u, where each byte is printed as it is read.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3395
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3396
      <p id="ch6oop_eb">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3397
       If the filename is specified as -, then
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3398
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3399
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3400
         cat
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3401
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3402
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3403
       will read from standard input at that point in the sequence. If no files are specified,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3404
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3405
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3406
         cat
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3407
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3408
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3409
       will read from standard input entered.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3410
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3411
      <div class="section" title="9.1.1.Jargon File Definition">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3412
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3413
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3414
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3415
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3416
           <a name="id2631207">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3417
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3418
           9.1.1.Jargon File Definition
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3419
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3420
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3421
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3422
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3423
       <p id="ch6oop_ec">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3424
        The Jargon File version 4.4.7 lists this as the definition of
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3425
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3426
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3427
          cat
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3428
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3429
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3430
        :
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3431
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3432
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3433
        1. To spew an entire file to the screen or some other output sink without
1
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  3434
     pause (syn. blast).
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  3435
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  3436
2. By extension, to dump large amounts of data at an unprepared target or
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  3437
     with no intention of browsing it carefully. Usage: considered silly.
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  3438
     Rare outside Unix sites. See also dd, BLT.
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  3439
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  3440
     Among Unix fans, *cat(1)* is considered an excellent example of
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  3441
     user-interface design, because it delivers the file contents without
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  3442
     such verbosity as spacing or headers between the files, and because
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  3443
     it does not require the files to consist of lines of text, but works
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  3444
     with any sort of data.
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  3445
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  3446
     Among Unix critics, *cat(1)* is considered the canonical example of
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  3447
     bad user-interface design, because of its woefully unobvious name.
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  3448
     It is far more often used to blast a single file to standard output
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  3449
     than to concatenate two or more files. The name cat for the former
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  3450
     operation is just as unintuitive as, say, LISP's cdr.
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  3451
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3452
     Of such oppositions are holy wars made...
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3453
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3454
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3455
      <div class="section" title="9.1.2.Useless Use of 'cat'">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3456
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3457
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3458
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3459
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3460
           <a name="id2631246">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3461
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3462
           9.1.2.Useless Use of 'cat'
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3463
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3464
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3465
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3466
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3467
       <p id="ch6oop_ed">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3468
        UUOC (from comp.unix.shell on Usenet) stands for Useless Use of cat. As it is observed on
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3469
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3470
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3471
          comp.unix.shell
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3472
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3473
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3474
        , The purpose of cat is to concatenate (or 'catenate') files. If it's only one file, concatenating it with nothing at all is a waste of time, and costs you a process.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3475
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3476
       <p id="ch6oop_ee">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3477
        Nevertheless one sees people doing:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3478
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3479
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3480
        $ cat file | some_command and its args ...
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3481
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3482
       <p id="ch6oop_ef">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3483
        instead of the equivalent and cheaper:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3484
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3485
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3486
        &lt;file some_command and its args ...
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3487
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3488
       <p id="ch6oop_f0">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3489
        or (equivalently and more classically):
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3490
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3491
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3492
        some_command and its args ... &lt;file
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3493
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3494
       <p id="ch6oop_f1">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3495
        Since 1995, occasional awards for UUOC have been given out. The activity of fixing instances of UUOC is sometimes called 'demoggification'.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3496
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3497
       <p id="ch6oop_f2">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3498
        Amongst many, it is still considered safer to use
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3499
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3500
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3501
          cat
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3502
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3503
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3504
        for such cases given that the &lt; and &gt; keys are next to each other in many popular keyboard mappings. While the risk might be low, the impact of using &gt; instead of &lt; can be high and prohibitive.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3505
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3506
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3507
      <div class="section" title="9.1.3.zcat">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3508
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3509
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3510
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3511
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3512
           <a name="id2631316">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3513
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3514
           9.1.3.zcat
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3515
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3516
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3517
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3518
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3519
       <p id="ch6oop_f3">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3520
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3521
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3522
          zcat
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3523
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3524
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3525
        is a Unix program similar to
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3526
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3527
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3528
          cat
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3529
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3530
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3531
        , that decompresses individual files and concatenates them to standard output. Traditionally
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3532
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3533
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3534
          zcat
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3535
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3536
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3537
        operated on files compressed by compress but today it is usually able to operate on
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3538
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3539
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3540
          gzip
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3541
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3542
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3543
        or even
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3544
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3545
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3546
          bzip2
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3547
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3548
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3549
        archives. On such systems, it is equivalent to
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3550
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3551
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3552
          gunzip -c
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3553
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3554
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3555
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3556
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3557
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3558
     <div class="section" title="9.2.more">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3559
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3560
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3561
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3562
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3563
          <a name="id2631352">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3564
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3565
          9.2.more
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3566
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3567
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3568
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3569
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3570
      <p id="ch6oop_f4">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3571
       In computing,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3572
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3573
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3574
         more
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3575
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3576
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3577
       is a command to view (but not modify) the contents of a text file one screen at a time (terminal pager). It is available on Unix and Unix-like systems, DOS, OS/2 and Microsoft Windows. Programs of this sort are called pagers.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3578
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3579
      <div class="section" title="9.2.1.Usage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3580
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3581
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3582
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3583
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3584
           <a name="id2631372">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3585
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3586
           9.2.1.Usage
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3587
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3588
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3589
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3590
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3591
       <p id="ch6oop_f5">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3592
        The command-syntax is:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3593
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3594
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3595
        $ more [options] [file_name]
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3596
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3597
       <p id="ch6oop_f6">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3598
        If no file name is provided,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3599
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3600
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3601
          more
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3602
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3603
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3604
        looks for input from stdin.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3605
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3606
       <p id="ch6oop_f7">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3607
        Once
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3608
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3609
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3610
          more
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3611
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3612
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3613
        has obtained input, it displays as much as can fit on the current screen and waits for user input to advance, with the exception that a form feed (^L) will also cause
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3614
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3615
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3616
          more
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3617
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3618
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3619
        to wait at that line, regardless of the amount of text on the screen. In the lower-left corner of the screen is displayed the text "--More--" and a percentage, representing the percent of the file that
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3620
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3621
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3622
          more
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3623
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3624
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3625
        has paged through. (This percentage includes the text displayed on the current screen.) When
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3626
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3627
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3628
          more
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3629
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3630
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3631
        reaches the end of a file (100%) it exits. The most common methods of navigating through a file are
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3632
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3633
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3634
          Enter
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3635
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3636
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3637
        , which advances the output by one line, and
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3638
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3639
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3640
          Space
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3641
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3642
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3643
        , which advances the output by one screen.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3644
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3645
       <p id="ch6oop_f8">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3646
        There are also other commands that can be used while navigating through the document; consult
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3647
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3648
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3649
          more
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3650
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3651
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3652
        's
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3653
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3654
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3655
          man
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3656
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3657
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3658
        page for more details.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3659
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3660
       <p id="ch6oop_f9">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3661
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3662
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3663
          Options
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3664
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3665
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3666
        are typically entered before the file name, but can also be entered in the environment variable
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3667
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3668
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3669
          $MORE
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3670
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3671
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3672
        . Options entered in the actual command line will override those entered in the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3673
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3674
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3675
          $MORE
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3676
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3677
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3678
        environment variable. Available options may vary between Unix systems.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3679
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3680
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3681
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3682
     <div class="section" title="9.3.less">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3683
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3684
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3685
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3686
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3687
          <a name="id2631466">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3688
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3689
          9.3.less
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3690
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3691
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3692
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3693
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3694
      <p id="ch6oop_fa">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3695
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3696
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3697
         less
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3698
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3699
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3700
       is a terminal pager program on Unix, Windows and Unix-like systems used to view (but not change) the contents of a text file one screen at a time. It is similar to
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3701
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3702
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3703
         more
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3704
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3705
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3706
       , but has the extended capability of allowing both forward and backward navigation through the file. Unlike most Unix text editors/viewers,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3707
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3708
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3709
         less
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3710
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3711
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3712
       does not need to read the entire file before starting, resulting in faster load times with large files.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3713
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3714
      <div class="section" title="9.3.1.Usage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3715
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3716
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3717
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3718
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3719
           <a name="id2631495">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3720
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3721
           9.3.1.Usage
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3722
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3723
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3724
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3725
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3726
       <p id="ch6oop_fb">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3727
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3728
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3729
          less
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3730
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3731
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3732
        can be invoked with options to change its behaviour, for example, the number of lines to display on the screen. A few options vary depending on the operating system. While
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3733
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3734
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3735
          less
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3736
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3737
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3738
        is displaying the file, various commands can be used to navigate through the file. These commands are based on those used by both
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3739
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3740
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3741
          more
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3742
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3743
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3744
        and
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3745
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3746
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3747
          vi
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3748
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3749
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3750
        . It is also possible to search for character patterns in the file.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3751
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3752
       <p id="ch6oop_fc">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3753
        By default,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3754
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3755
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3756
          less
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3757
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3758
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3759
        displays the contents of the file to the standard output (one screen at a time). If the file name argument is omitted, it displays the contents from standard input (usually the output of another command through a pipe). If the output is redirected to anything other than a terminal, for example a pipe to another command, less behaves like cat.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3760
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3761
       <p id="ch6oop_fd">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3762
        The command-syntax is:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3763
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3764
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3765
        $ less [options] file_name
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3766
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3767
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3768
      <div class="section" title="9.3.2.Frequently Used Options">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3769
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3770
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3771
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3772
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3773
           <a name="id2631549">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3774
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3775
           9.3.2.Frequently Used Options
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3776
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3777
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3778
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3779
       </div>
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3780
       <div class="itemizedlist">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3781
        <ul class="itemizedlist" type="*">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3782
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3783
          <p id="ch6oop_fe">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3784
           -g: Highlights just the current match of any searched string.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3785
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3786
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3787
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3788
          <p id="ch6oop_ff">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3789
           -I: Case-insensitive searches.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3790
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3791
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3792
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3793
          <p id="ch6oop_100">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3794
           -M: Shows more detailed prompt, including file position.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3795
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3796
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3797
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3798
          <p id="ch6oop_101">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3799
           -N: Shows line numbers (useful for source code viewing).
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3800
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3801
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3802
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3803
          <p id="ch6oop_102">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3804
           -S: Disables line wrap ("chop long lines"). Long lines can be seen by side scrolling.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3805
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3806
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3807
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3808
          <p id="ch6oop_103">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3809
           -?: Shows help.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3810
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3811
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3812
        </ul>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3813
       </div>
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3814
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3815
      <div class="section" title="9.3.3.Frequently Used Commands">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3816
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3817
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3818
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3819
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3820
           <a name="id2631599">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3821
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3822
           9.3.3.Frequently Used Commands
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3823
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3824
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3825
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3826
       </div>
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3827
       <div class="itemizedlist">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3828
        <ul class="itemizedlist" type="*">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3829
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3830
          <p id="ch6oop_104">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3831
           [Arrows]/[Page Up]/[Page Down]/[Home]/[End]: Navigation.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3832
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3833
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3834
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3835
          <p id="ch6oop_105">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3836
           [Space bar]: Next page.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3837
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3838
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3839
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3840
          <p id="ch6oop_106">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3841
           b: Previous page.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3842
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3843
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3844
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3845
          <p id="ch6oop_107">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3846
           ng: Jump to line number n. Default is the start of the file.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3847
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3848
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3849
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3850
          <p id="ch6oop_108">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3851
           nG: Jump to line number n. Default is the end of the file.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3852
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3853
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3854
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3855
          <p id="ch6oop_109">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3856
           /pattern: Search for pattern. Regular expressions can be used.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3857
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3858
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3859
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3860
          <p id="ch6oop_10a">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3861
           '^ or g: Go to start of file.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3862
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3863
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3864
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3865
          <p id="ch6oop_10b">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3866
           '$ or G: Go to end of file.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3867
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3868
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3869
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3870
          <p id="ch6oop_10c">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3871
           s: Save current content (got from another program like grep) in a file.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3872
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3873
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3874
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3875
          <p id="ch6oop_10d">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3876
           =: File information.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3877
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3878
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3879
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3880
          <p id="ch6oop_10e">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3881
           h: Help.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3882
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3883
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3884
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3885
          <p id="ch6oop_10f">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3886
           q: Quit.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3887
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3888
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3889
        </ul>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3890
       </div>
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3891
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3892
      <div class="section" title="9.3.4.Examples">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3893
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3894
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3895
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3896
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3897
           <a name="id2631686">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3898
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3899
           9.3.4.Examples
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3900
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3901
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3902
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3903
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3904
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3905
        $ less -M readme.txt                     #Read "readme.txt."
1
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  3906
$ less +F /var/log/mail.log              #Follow mode for log
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  3907
$ file * | less                          #Easier file analysis.
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3908
$ grep -i void *.c | less -I -p void     #Case insensitive search                                                         for "void" in all .c files
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3909
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3910
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3911
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3912
    </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3913
    <div class="section" title="10.Directory Structure">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3914
     <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3915
      <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3916
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3917
        <h2 class="title" style="clear: both">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3918
         <a name="id2631702">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3919
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3920
         10.Directory Structure
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3921
        </h2>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3922
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3923
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3924
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3925
     <p id="ch6oop_110">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3926
      In the File Hierarchy Standard (FHS) all files and directories appear under the root directory "/", even if they are stored on different physical devices. Note however that some of these directories may or may not be present on a Unix system depending on whether certain subsystems, such as the X Window System, are installed.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3927
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3928
     <p id="ch6oop_111">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3929
      The majority of these directories exist in all UNIX operating systems and are generally used in much the same way; however, the descriptions here are those used specifically for the FHS, and are not considered authoritative for platforms other than Linux.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3930
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3931
     <table summary="Directory Structure" border="1">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3932
      <colgroup>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3933
       <col width="15">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3934
       </col>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3935
       <col width="48">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3936
       </col>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3937
      </colgroup>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3938
     </table>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3939
     <div class="section" title="10.1.man hier">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3940
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3941
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3942
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3943
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3944
          <a name="id2631966">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3945
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3946
          10.1.man hier
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3947
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3948
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3949
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3950
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3951
      <p id="ch6oop_136">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3952
       This is the manual page on the UNIX filesystem. The syntax for this is:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3953
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3954
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3955
       $ man hier
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3956
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3957
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3958
     <div class="section" title="10.2.ls -l">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3959
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3960
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3961
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3962
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3963
          <a name="id2631982">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3964
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3965
          10.2.ls -l
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3966
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3967
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3968
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3969
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3970
      <p id="ch6oop_137">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3971
       Shows you huge amounts of information (permissions, owners, size, and when last modified) for folders and files. The syntax is
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3972
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3973
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3974
       $ ls -l
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3975
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3976
      <p id="ch6oop_138">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3977
       This can be done after entering the required directory.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3978
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3979
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3980
    </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3981
    <div class="section" title="11.Permissions and Ownership">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3982
     <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3983
      <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3984
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3985
        <h2 class="title" style="clear: both">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3986
         <a name="id2632004">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3987
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3988
         11.Permissions and Ownership
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3989
        </h2>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3990
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3991
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3992
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3993
     <div class="section" title="11.1.chmod">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3994
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3995
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3996
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3997
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  3998
          <a name="id2632013">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  3999
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4000
          11.1.chmod
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4001
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4002
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4003
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4004
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4005
      <p id="ch6oop_139">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4006
       The
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4007
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4008
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4009
         chmod
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4010
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4011
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4012
       command (abbreviated from 'change mode') is a shell command and C language function in Unix and Unix-like environments. When executed, it can change file system modes of files and directories. The modes include permissions and special modes.A chmod command first appeared in AT&amp;T Unix version 1, and is still used today on Unix-like machines.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4013
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4014
      <div class="section" title="11.1.1.Usage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4015
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4016
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4017
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4018
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4019
           <a name="id2632039">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4020
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4021
           11.1.1.Usage
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4022
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4023
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4024
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4025
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4026
       <p id="ch6oop_13a">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4027
        The
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4028
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4029
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4030
          chmod
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4031
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4032
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4033
        command options are specified like this:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4034
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4035
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4036
        $ chmod [options] mode[,mode] file1 [file2 ...]
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4037
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4038
       <p id="ch6oop_13b">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4039
        To view what the permissions currently are, type:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4040
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4041
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4042
        $ ls -l file
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4043
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4044
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4045
      <div class="section" title="11.1.2.Command line options">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4046
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4047
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4048
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4049
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4050
           <a name="id2632066">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4051
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4052
           11.1.2.Command line options
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4053
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4054
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4055
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4056
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4057
       <p id="ch6oop_13c">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4058
        The
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4059
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4060
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4061
          chmod
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4062
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4063
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4064
        command has a number of command line options that affect its behavior. The most common options are:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4065
       </p>
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4066
       <div class="itemizedlist">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4067
        <ul class="itemizedlist" type="*">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4068
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4069
          <p id="ch6oop_13d">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4070
           -R: Changes the modes of directories and files recursively
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4071
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4072
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4073
         <li class="listitem" style="list-style-type: *">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4074
          <p id="ch6oop_13e">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4075
           -v: Verbose mode; lists all files as they are being processed
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4076
          </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4077
         </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4078
        </ul>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4079
       </div>
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4080
       <div class="section" title="11.1.2.1.Symbolic modes">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4081
        <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4082
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4083
          <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4084
           <h5 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4085
            <a name="id2632102">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4086
            </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4087
            11.1.2.1.Symbolic modes
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4088
           </h5>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4089
          </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4090
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4091
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4092
        <p id="ch6oop_13f">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4093
         To the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4094
         <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4095
          <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4096
           chmod
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4097
          </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4098
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4099
         utility, all permissions and special modes are represented by its mode parameter. One way to adjust the mode of files or directories is to specify a symbolic mode. The symbolic mode is composed of three components, which are combined to form a single string of text:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4100
        </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4101
        <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4102
         $ chmod [references][operator][modes] file1 ...
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4103
        </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4104
        <p id="ch6oop_140">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4105
         The references (or classes) are used to distinguish the users to whom the permissions apply. If no references are specified it defaults to all but modifies only the permissions allowed by the umask. The references are represented by one or more of the following letters:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4106
        </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4107
        <table summary="Symbolic modes" border="1">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4108
         <colgroup>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4109
          <col width="14">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4110
          </col>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4111
          <col width="8">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4112
          </col>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4113
          <col width="45">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4114
          </col>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4115
         </colgroup>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4116
        </table>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4117
        <p id="ch6oop_150">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4118
         The
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4119
         <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4120
          <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4121
           chmod
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4122
          </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4123
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4124
         program uses an operator to specify how the modes of a file should be adjusted. The following operators are accepted:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4125
        </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4126
        <table summary="Symbolic modes" border="1">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4127
         <colgroup>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4128
          <col width="14">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4129
          </col>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4130
          <col width="54">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4131
          </col>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4132
         </colgroup>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4133
        </table>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4134
        <p id="ch6oop_157">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4135
         The modes indicate which permissions are to be granted or taken away from the specified classes. There are three basic modes which correspond to the basic permissions:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4136
        </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4137
        <table summary="Symbolic modes" border="1">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4138
         <colgroup>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4139
          <col width="5">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4140
          </col>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4141
          <col width="14">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4142
          </col>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4143
          <col width="48">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4144
          </col>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4145
         </colgroup>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4146
        </table>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4147
        <p id="ch6oop_16d">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4148
         The combination of these three components produces a string that is understood by the chmod command. Multiple changes can be specified by separating multiple symbolic modes with commas.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4149
        </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4150
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4151
       <div class="section" title="11.1.2.2.Symbolic examples">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4152
        <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4153
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4154
          <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4155
           <h5 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4156
            <a name="id2632664">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4157
            </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4158
            11.1.2.2.Symbolic examples
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4159
           </h5>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4160
          </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4161
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4162
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4163
        <p id="ch6oop_16e">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4164
         Add the 'read' and 'write' permissions to the 'user' and 'group' classes of a directory:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4165
        </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4166
        <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4167
         $ chmod ug+rw mydir
1
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  4168
$ ls -ld mydir
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4169
drw-rw----   2 starwars  yoda  96 Dec 8 12:53 mydir
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4170
        </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4171
        <p id="ch6oop_16f">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4172
         For a file, remove
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4173
         <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4174
          <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4175
           write
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4176
          </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4177
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4178
         permissions for all classes:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4179
        </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4180
        <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4181
         $ chmod a-w myfile
1
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  4182
$ ls -l myfile
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4183
-r-xr-xr-x   2 starwars  yoda 96 Dec 8 12:53 myfile
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4184
        </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4185
        <p id="ch6oop_170">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4186
         Set the permissions for the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4187
         <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4188
          <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4189
           u*ser and the *g*roup to read and execute only (no write permission) on *mydir
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4190
          </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4191
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4192
         .
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4193
        </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4194
        <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4195
         $ chmod ug=rx mydir
1
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  4196
$ ls -ld mydir
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4197
dr-xr-x---   2 starwars  yoda 96 Dec 8 12:53 mydir
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4198
        </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4199
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4200
       <div class="section" title="11.1.2.3.Octal numbers">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4201
        <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4202
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4203
          <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4204
           <h5 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4205
            <a name="id2632707">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4206
            </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4207
            11.1.2.3.Octal numbers
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4208
           </h5>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4209
          </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4210
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4211
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4212
        <p id="ch6oop_171">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4213
         The
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4214
         <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4215
          <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4216
           chmod
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4217
          </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4218
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4219
         command also accepts three and four-digit octal numbers representing modes. Using a three-digit octal number to set the modes of a file named myfile :
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4220
        </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4221
        <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4222
         $ chmod 664 myfile
1
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  4223
$ ls -l myfile
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4224
-rw-rw-r--  1   57 Jul  3 10:13  myfile
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4225
        </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4226
        <p id="ch6oop_172">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4227
         Since the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4228
         <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4229
          <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4230
           setuid
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4231
          </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4232
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4233
         ,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4234
         <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4235
          <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4236
           setgid
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4237
          </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4238
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4239
         and
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4240
         <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4241
          <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4242
           sticky
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4243
          </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4244
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4245
         bits are not set, this is equivalent to:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4246
        </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4247
        <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4248
         $ chmod 0664 myfile
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4249
        </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4250
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4251
       <div class="section" title="11.1.2.4.Special modes">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4252
        <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4253
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4254
          <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4255
           <h5 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4256
            <a name="id2632746">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4257
            </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4258
            11.1.2.4.Special modes
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4259
           </h5>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4260
          </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4261
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4262
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4263
        <p id="ch6oop_173">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4264
         The
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4265
         <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4266
          <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4267
           chmod
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4268
          </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4269
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4270
         command is also capable of changing the additional permissions or special modes of a file or directory. The symbolic modes use
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4271
         <span class="strong">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4272
          <strong>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4273
           s
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4274
          </strong>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4275
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4276
         to represent the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4277
         <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4278
          <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4279
           setuid
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4280
          </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4281
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4282
         and
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4283
         <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4284
          <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4285
           setgid
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4286
          </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4287
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4288
         modes, and
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4289
         <span class="strong">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4290
          <strong>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4291
           t
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4292
          </strong>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4293
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4294
         to represent the sticky mode. The modes are only applied to the appropriate classes, regardless of whether or not other classes are specified.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4295
        </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4296
        <p id="ch6oop_174">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4297
         Most operating systems support the specification of special modes using octal modes, but some do not. On these systems, only the symbolic modes can be used.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4298
        </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4299
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4300
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4301
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4302
    </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4303
    <div class="section" title="12.Redirection and Piping">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4304
     <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4305
      <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4306
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4307
        <h2 class="title" style="clear: both">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4308
         <a name="id2632792">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4309
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4310
         12.Redirection and Piping
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4311
        </h2>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4312
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4313
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4314
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4315
     <p id="ch6oop_175">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4316
      In computing,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4317
      <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4318
       <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4319
        redirection
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4320
       </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4321
      </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4322
      is a function common to most command-line interpreters, including the various Unix shells that can redirect standard streams to user-specified locations.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4323
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4324
     <p id="ch6oop_176">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4325
      Programs do redirection with the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4326
      <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4327
       <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4328
        dup2(2)
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4329
       </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4330
      </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4331
      system call, or its less-flexible but higher-level stdio analogues,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4332
      <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4333
       <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4334
        freopen(3)
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4335
       </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4336
      </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4337
      and
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4338
      <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4339
       <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4340
        popen(3)
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4341
       </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4342
      </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4343
      .
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4344
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4345
     <div class="section" title="12.1.Redirecting standard input and standard output">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4346
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4347
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4348
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4349
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4350
          <a name="id2632828">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4351
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4352
          12.1.Redirecting standard input and standard output
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4353
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4354
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4355
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4356
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4357
      <p id="ch6oop_177">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4358
       Redirection is usually implemented by placing certain characters between commands. Typically, the syntax of these characters is as follows:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4359
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4360
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4361
       $ command1 &gt; file1
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4362
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4363
      <p id="ch6oop_178">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4364
       executes
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4365
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4366
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4367
         command1
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4368
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4369
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4370
       , placing the output in file1. Note that this will truncate any existing data in
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4371
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4372
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4373
         file1
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4374
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4375
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4376
       . To append output to the end of the file, use the &gt;&gt; operator.:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4377
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4378
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4379
       $ command1 &lt; file1
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4380
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4381
      <p id="ch6oop_179">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4382
       executes
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4383
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4384
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4385
         command1
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4386
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4387
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4388
       , using
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4389
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4390
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4391
         file1
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4392
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4393
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4394
       as the source of input (as opposed to the keyboard).:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4395
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4396
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4397
       $ command1 &lt; infile &gt; outfile
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4398
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4399
      <p id="ch6oop_17a">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4400
       combines the two capabilities:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4401
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4402
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4403
         command1
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4404
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4405
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4406
       reads from
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4407
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4408
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4409
         infile
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4410
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4411
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4412
       and writes to
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4413
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4414
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4415
         outfile
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4416
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4417
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4418
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4419
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4420
     <div class="section" title="12.2.Piping">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4421
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4422
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4423
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4424
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4425
          <a name="id2632896">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4426
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4427
          12.2.Piping
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4428
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4429
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4430
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4431
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4432
      <p id="ch6oop_17b">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4433
       Programs can be run together such that one program reads the output from another with no need for an explicit intermediate file:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4434
A pipeline of three programs run on a text terminal:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4435
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4436
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4437
       $ command1 | command2
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4438
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4439
      <p id="ch6oop_17c">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4440
       executes
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4441
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4442
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4443
         command1
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4444
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4445
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4446
       , using its output as the input for
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4447
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4448
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4449
         command2
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4450
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4451
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4452
       (commonly called piping, since the "|" character is known as a "pipe").
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4453
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4454
      <p id="ch6oop_17d">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4455
       This is equivalent to using two redirects and a temporary file:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4456
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4457
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4458
       $ command1 &gt; tempfile
1
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  4459
$ command2 &lt; tempfile
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4460
$ rm tempfile
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4461
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4462
      <p id="ch6oop_17e">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4463
       A good example for command piping is combining
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4464
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4465
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4466
         echo
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4467
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4468
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4469
       with another command to achieve something interactive in a non-interactive shell, e.g.:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4470
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4471
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4472
       $ echo -e "user\npass" | ftp localhost
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4473
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4474
      <p id="ch6oop_17f">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4475
       This runs the ftp client with input user, press return, then pass.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4476
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4477
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4478
     <div class="section" title="12.3.Redirecting to and from the standard file handles">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4479
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4480
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4481
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4482
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4483
          <a name="id2632956">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4484
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4485
          12.3.Redirecting to and from the standard file handles
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4486
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4487
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4488
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4489
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4490
      <p id="ch6oop_180">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4491
       In Unix shells derived from the original Bourne shell, the first two actions can be further modified by placing a number (the file descriptor) immediately before the character; this will affect which stream is used for the redirection. The Unix standard I/O streams are:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4492
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4493
      <table summary="Redirecting to and from the standard file handles" border="1">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4494
       <colgroup>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4495
        <col width="12">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4496
        </col>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4497
        <col width="13">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4498
        </col>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4499
        <col width="24">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4500
        </col>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4501
       </colgroup>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4502
      </table>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4503
      <p id="ch6oop_18d">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4504
       For example:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4505
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4506
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4507
       $ command1 2&gt; file1
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4508
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4509
      <p id="ch6oop_18e">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4510
       executes
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4511
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4512
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4513
         command1
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4514
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4515
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4516
       , directing the standard error stream to
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4517
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4518
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4519
         file1
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4520
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4521
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4522
       .
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4523
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4524
      <p id="ch6oop_18f">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4525
       In shells derived from
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4526
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4527
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4528
         csh
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4529
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4530
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4531
       (the C shell), the syntax instead appends the &amp; character to the redirect characters, thus achieving a similar result.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4532
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4533
      <p id="ch6oop_190">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4534
       Another useful capability is to redirect one standard file handle to another. The most popular variation is to merge standard error into standard output so error messages can be processed together with (or alternately to) the usual output. Example:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4535
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4536
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4537
       $ find / -name .profile &gt; results 2&gt;&amp;1
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4538
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4539
      <p id="ch6oop_191">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4540
       will try to find all files named
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4541
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4542
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4543
         .profile
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4544
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4545
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4546
       . Executed without redirection, it will output hits to
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4547
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4548
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4549
         stdout
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4550
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4551
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4552
       and errors (e.g. for lack of privilege to traverse protected directories) to
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4553
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4554
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4555
         stderr
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4556
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4557
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4558
       . If standard output is directed to file results, error messages appear on the console. To see both hits and error messages in file results, merge
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4559
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4560
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4561
         stderr
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4562
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4563
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4564
       (handle 2) into
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4565
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4566
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4567
         stdout
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4568
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4569
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4570
       (handle 1) using 2&gt;&amp;1 .
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4571
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4572
      <p id="ch6oop_192">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4573
       It's possible use 2&gt;&amp;1 before "&gt;" but it doesn't work. In fact, when the interpreter reads 2&gt;&amp;1, it doesn't know yet where standard output is redirected and then standard error isn't merged.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4574
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4575
      <p id="ch6oop_193">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4576
       If the merged output is to be piped into another program, the file merge sequence 2&gt;&amp;1 must precede the pipe symbol, thus:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4577
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4578
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4579
       $ find / -name .profile 2&gt;&amp;1 | less
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4580
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4581
      <p id="ch6oop_194">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4582
       A simplified form of the command:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4583
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4584
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4585
       $ command &gt; file 2&gt;&amp;1
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4586
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4587
      <p id="ch6oop_195">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4588
       is:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4589
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4590
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4591
       $ command &amp;&gt;file
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4592
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4593
      <p id="ch6oop_196">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4594
       or:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4595
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4596
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4597
       $command &gt;&amp;file
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4598
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4599
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4600
     <div class="section" title="12.4.Chained pipelines">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4601
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4602
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4603
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4604
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4605
          <a name="id2633156">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4606
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4607
          12.4.Chained pipelines
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4608
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4609
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4610
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4611
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4612
      <p id="ch6oop_197">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4613
       The redirection and piping tokens can be chained together to create complex commands. For example:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4614
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4615
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4616
       $ ls | grep '\.sh' | sort &gt; shlist
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4617
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4618
      <p id="ch6oop_198">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4619
       lists the contents of the current directory, where this output is filtered to only contain lines which contain
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4620
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4621
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4622
         .sh
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4623
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4624
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4625
       , sort this resultant output lexicographically, and place the final output in
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4626
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4627
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4628
         shlist
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4629
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4630
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4631
       . This type of construction is used very commonly in shell scripts and batch files.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4632
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4633
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4634
     <div class="section" title="12.5.Redirect to multiple outputs">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4635
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4636
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4637
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4638
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4639
          <a name="id2633188">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4640
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4641
          12.5.Redirect to multiple outputs
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4642
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4643
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4644
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4645
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4646
      <p id="ch6oop_199">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4647
       The standard command
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4648
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4649
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4650
         tee
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4651
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4652
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4653
       can redirect output from a command to several destinations.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4654
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4655
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4656
       $ ls -lrt | tee xyz
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4657
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4658
      <p id="ch6oop_19a">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4659
       This directs the file list output to both standard output as well as to the file
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4660
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4661
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4662
         xyz
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4663
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4664
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4665
       .
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4666
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4667
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4668
    </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4669
    <div class="section" title="13.More Text Processing">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4670
     <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4671
      <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4672
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4673
        <h2 class="title" style="clear: both">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4674
         <a name="id2633218">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4675
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4676
         13.More Text Processing
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4677
        </h2>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4678
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4679
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4680
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4681
     <div class="section" title="13.1.grep">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4682
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4683
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4684
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4685
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4686
          <a name="id2633227">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4687
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4688
          13.1.grep
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4689
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4690
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4691
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4692
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4693
      <p id="ch6oop_19b">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4694
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4695
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4696
         grep
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4697
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4698
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4699
       is a command line text search utility originally written for Unix. The name is taken from the first letters in
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4700
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4701
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4702
         global / regular expression / print
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4703
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4704
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4705
       , a series of instructions for the
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4706
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4707
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4708
         ed
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4709
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4710
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4711
       text editor. The
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4712
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4713
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4714
         grep
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4715
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4716
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4717
       command searches files or standard input globally for lines matching a given regular expression, and prints them to the program's standard output.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4718
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4719
      <div class="section" title="13.1.1.Usage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4720
       <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4721
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4722
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4723
          <h4 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4724
           <a name="id2633257">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4725
           </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4726
           13.1.1.Usage
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4727
          </h4>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4728
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4729
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4730
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4731
       <p id="ch6oop_19c">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4732
        This is an example of a common
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4733
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4734
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4735
          grep
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4736
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4737
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4738
        usage:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4739
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4740
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4741
        $ grep apple fruitlist.txt
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4742
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4743
       <p id="ch6oop_19d">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4744
        In this case,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4745
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4746
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4747
          grep
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4748
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4749
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4750
        prints all lines containing 'apple' from the file
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4751
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4752
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4753
          fruitlist.txt
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4754
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4755
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4756
        , regardless of word boundaries; therefore lines containing 'pineapple' or 'apples' are also printed. The
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4757
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4758
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4759
          grep
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4760
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4761
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4762
        command is case sensitive by default, so this example's output does not include lines containing 'Apple' (with a capital A) unless they also contain 'apple'.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4763
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4764
       <p id="ch6oop_19e">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4765
        Like most Unix commands,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4766
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4767
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4768
          grep
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4769
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4770
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4771
        accepts command line arguments to change this and many other behaviors. For example:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4772
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4773
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4774
        $ grep -i apple fruitlist.txt
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4775
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4776
       <p id="ch6oop_19f">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4777
        This prints all lines containing 'apple' regardless of capitalization. The '-i' argument tells
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4778
        <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4779
         <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4780
          grep
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4781
         </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4782
        </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4783
        to be case insensitive, or to ignore case.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4784
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4785
       <p id="ch6oop_1a0">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4786
        To print all lines containing 'apple' as a word ('pineapple' and 'apples' will not match):
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4787
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4788
       <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4789
        $ grep -w apple fruitlist.txt
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4790
       </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4791
       <p id="ch6oop_1a1">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4792
        Regular expressions can be used to match more complicated queries.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4793
       </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4794
       <div class="section" title="13.1.1.1.Variations">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4795
        <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4796
         <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4797
          <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4798
           <h5 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4799
            <a name="id2633334">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4800
            </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4801
            13.1.1.1.Variations
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4802
           </h5>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4803
          </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4804
         </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4805
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4806
        <p id="ch6oop_1a2">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4807
         There are countless implementations and derivatives of
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4808
         <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4809
          <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4810
           grep
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4811
          </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4812
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4813
         available for many operating systems. Early variants of
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4814
         <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4815
          <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4816
           grep
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4817
          </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4818
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4819
         included
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4820
         <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4821
          <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4822
           egrep
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4823
          </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4824
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4825
         and
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4826
         <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4827
          <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4828
           fgrep
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4829
          </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4830
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4831
         . The former applies an extended regular expression syntax that was added to Unix after Ken Thompson's original regular expression implementation. The latter searches for any of a list of 'fixed' strings using the Aho-Corasick algorithm. These variants are embodied in most modern
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4832
         <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4833
          <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4834
           grep
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4835
          </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4836
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4837
         implementations as command-line switches (and standardized as -E and -F in POSIX). In such combined implementations,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4838
         <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4839
          <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4840
           grep
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4841
          </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4842
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4843
         may also behave differently depending on the name by which it is invoked, allowing
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4844
         <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4845
          <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4846
           fgrep
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4847
          </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4848
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4849
         ,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4850
         <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4851
          <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4852
           egrep
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4853
          </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4854
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4855
         , and
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4856
         <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4857
          <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4858
           grep
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4859
          </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4860
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4861
         to be links to the same program.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4862
        </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4863
        <p id="ch6oop_1a3">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4864
         <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4865
          <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4866
           pcregrep
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4867
          </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4868
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4869
         is an implementation of
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4870
         <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4871
          <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4872
           grep
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4873
          </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4874
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4875
         that uses Perl regular expression syntax.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4876
        </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4877
        <p id="ch6oop_1a4">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4878
         Other commands contain the word 'grep' to indicate that they search (usually for regular expression matches). The
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4879
         <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4880
          <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4881
           pgrep
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4882
          </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4883
         </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4884
         utility, for instance, displays the processes whose names match a given regular expression.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4885
        </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4886
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4887
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4888
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4889
     <div class="section" title="13.2.tr">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4890
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4891
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4892
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4893
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  4894
          <a name="id2633413">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4895
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4896
          13.2.tr
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4897
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4898
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4899
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4900
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4901
      <p id="ch6oop_1a5">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4902
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4903
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4904
         tr
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4905
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4906
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4907
       (abbreviated from
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4908
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4909
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4910
         translate
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4911
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4912
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4913
       or
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4914
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4915
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4916
         transliterate
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4917
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4918
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4919
       ) is a command in Unix-like operating systems.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4920
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4921
      <p id="ch6oop_1a6">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4922
       When executed, the program reads from the standard input and writes to the standard output. It takes as parameters two sets of characters, and replaces occurrences of the characters in the first set with the corresponding elements from the other set. For example,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4923
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4924
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4925
       $ tr 'abcd' 'jkmn'
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4926
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4927
      <p id="ch6oop_1a7">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4928
       maps 'a' to 'j', 'b' to 'k', 'c' to 'm', and 'd' to 'n'.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4929
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4930
      <p id="ch6oop_1a8">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4931
       Sets of characters may be abbreviated by using character ranges. The previous example could be written:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4932
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4933
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4934
       $ tr 'a-d' 'jkmn'
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4935
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4936
      <p id="ch6oop_1a9">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4937
       In POSIX compliant versions of
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4938
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4939
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4940
         tr
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4941
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4942
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4943
       the set represented by a character range depends on the locale's collating order, so it is safer to avoid character ranges in scripts that might be executed in a locale different from that in which they were written. Ranges can often be replaced with POSIX character sets such as [:alpha:].
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4944
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4945
      <p id="ch6oop_1aa">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4946
       The
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4947
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4948
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4949
         -c
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4950
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4951
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4952
       flag complements the first set of characters.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4953
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4954
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4955
       $ tr -cd '[:alnum:]'
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4956
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4957
      <p id="ch6oop_1ab">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4958
       therefore removes all non-alphanumeric characters.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4959
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4960
      <p id="ch6oop_1ac">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4961
       The
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4962
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4963
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4964
         -s
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4965
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4966
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4967
       flag causes tr to compress sequences of identical adjacent characters in its output to a single token. For example,
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4968
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4969
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4970
       $ tr -s '\n' '\n'
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4971
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4972
      <p id="ch6oop_1ad">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4973
       replaces sequences of one or more newline characters with a single newline.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4974
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4975
      <p id="ch6oop_1ae">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4976
       The
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4977
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4978
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4979
         -d
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4980
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4981
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4982
       flag causes tr to delete all tokens of the specified set of characters from its input. In this case, only a single character set argument is used. The following command removes carriage return characters, thereby converting a file in DOS/Windows format to one in Unix format.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4983
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4984
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4985
       $ tr -d '\r'
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4986
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4987
      <p id="ch6oop_1af">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4988
       Most versions of
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4989
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4990
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4991
         tr
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4992
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4993
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4994
       , including GNU
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4995
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4996
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4997
         tr
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4998
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  4999
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5000
       and classic Unix
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5001
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5002
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5003
         tr
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5004
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5005
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5006
       , operate on single byte characters and are not Unicode compliant. An exception is the Heirloom Toolchest implementation, which provides basic Unicode support.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5007
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5008
      <p id="ch6oop_1b0">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5009
       Ruby and Perl also have an internal
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5010
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5011
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5012
         tr
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5013
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5014
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5015
       operator, which operates analogously. Tcl's
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5016
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5017
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5018
         string map
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5019
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5020
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5021
       command is more general in that it maps strings to strings while
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5022
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5023
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5024
         tr
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5025
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5026
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5027
       maps characters to characters.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5028
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5029
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5030
    </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5031
    <div class="section" title="14.Elementary Regex">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5032
     <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5033
      <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5034
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5035
        <h2 class="title" style="clear: both">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5036
         <a name="id2633558">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5037
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5038
         14.Elementary Regex
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5039
        </h2>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5040
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5041
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5042
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5043
     <p id="ch6oop_1b1">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5044
      In computing, regular expressions provide a concise and flexible means for identifying strings of text of interest, such as particular characters, words, or patterns of characters. A regular expression (often shortened to regex or regexp) is written in a formal language that can be interpreted by a regular expression processor, a program that either serves as a parser generator or examines text and identifies parts that match the provided specification.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5045
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5046
     <p id="ch6oop_1b2">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5047
      Regular expressions are used by many text editors, utilities, and programming languages to search and manipulate text based on patterns. For example, Perl, Ruby and Tcl have a powerful regular expression engine built directly into their syntax. Several utilities provided by Unix distributionsincluding the editor
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5048
      <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5049
       <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5050
        ed
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5051
       </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5052
      </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5053
      and the filter
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5054
      <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5055
       <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5056
        grep
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5057
       </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5058
      </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5059
      were the first to popularize the concept of regular expressions.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5060
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5061
     <p id="ch6oop_1b3">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5062
      Traditional Unix regular expression syntax followed common conventions but often differed from tool to tool. The IEEE POSIX
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5063
      <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5064
       <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5065
        Basic Regular Expressions
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5066
       </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5067
      </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5068
      (BRE) standard (released alongside an alternative flavor called Extended Regular Expressions or ERE) was designed mostly for backward compatibility with the traditional (Simple Regular Expression) syntax but provided a common standard which has since been adopted as the default syntax of many Unix regular expression tools, though there is often some variation or additional features. Many such tools also provide support for ERE syntax with command line arguments.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5069
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5070
     <p id="ch6oop_1b4">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5071
      In the BRE syntax, most characters are treated as literals  they match only themselves (i.e., a matches "a"). The exceptions, listed below, are called metacharacters or metasequences.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5072
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5073
     <table summary="Elementary Regex" border="1">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5074
      <colgroup>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5075
       <col width="13">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5076
       </col>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5077
       <col width="60">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5078
       </col>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5079
      </colgroup>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5080
     </table>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5081
     <div class="section" title="14.1.Lazy quantification">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5082
      <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5083
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5084
        <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5085
         <h3 class="title">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5086
          <a name="id2633765">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5087
          </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5088
          14.1.Lazy quantification
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5089
         </h3>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5090
        </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5091
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5092
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5093
      <p id="ch6oop_1c9">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5094
       The standard quantifiers in regular expressions are greedy, meaning they match as much as they can, only giving back as necessary to match the remainder of the regex. For example, someone new to regexes wishing to find the first instance of an item between &lt; and &gt; symbols in this example:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5095
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5096
      <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5097
       Another whale explosion occurred on &lt;January 26&gt;, &lt;2004&gt;.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5098
      </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5099
      <p id="ch6oop_1ca">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5100
       ...would likely come up with the pattern &lt;.*&gt;, or similar. However, this pattern will actually return "&lt;January 26&gt;, &lt;2004&gt;" instead of the "&lt;January 26&gt;" which might be expected, because the * quantifier is greedy  it will consume as many characters as possible from the input, and "January 26&gt;, &lt;2004" has more characters than "January 26".
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5101
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5102
      <p id="ch6oop_1cb">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5103
       Though this problem can be avoided in a number of ways (e.g., by specifying the text that is not to be matched: &lt;[^&gt;]*&gt;), modern regular expression tools allow a quantifier to be specified as
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5104
       <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5105
        <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5106
         lazy
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5107
        </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5108
       </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5109
       (also known as non-greedy, reluctant, minimal, or ungreedy) by putting a question mark after the quantifier (e.g., &lt;.*?&gt;), or by using a modifier which reverses the greediness of quantifiers (though changing the meaning of the standard quantifiers can be confusing). By using a lazy quantifier, the expression tries the minimal match first. Though in the previous example lazy matching is used to select one of many matching results, in some cases it can also be used to improve performance when greedy matching would require more backtracking.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5110
      </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5111
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5112
    </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5113
    <div class="section" title="15.One Liners">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5114
     <div class="titlepage">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5115
      <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5116
       <div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5117
        <h2 class="title" style="clear: both">
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5118
         <a name="id2633840">
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5119
         </a>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5120
         15.One Liners
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5121
        </h2>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5122
       </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5123
      </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5124
     </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5125
     <p id="ch6oop_1cc">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5126
      A
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5127
      <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5128
       <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5129
        one-liner
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5130
       </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5131
      </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5132
      is textual input to the command-line of an operating system shell that performs some function in just one line of input.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5133
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5134
     <p id="ch6oop_1cd">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5135
      The one liner can be
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5136
     </p>
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5137
     <div class="orderedlist">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5138
      <ol class="orderedlist" type="1">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5139
       <li class="listitem">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5140
        <p id="ch6oop_1ce">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5141
         An expression written in the language of the shell.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5142
        </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5143
       </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5144
       <li class="listitem">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5145
        <p id="ch6oop_1cf">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5146
         The invocation of an interpreter together with program source for the interpreter to run.
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5147
        </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5148
       </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5149
       <li class="listitem">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5150
        <p id="ch6oop_1d0">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5151
         The invocation of a compiler together with source to compile and
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5152
instructions for executing the compiled program.
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5153
        </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5154
       </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5155
      </ol>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5156
     </div>
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5157
     <p id="ch6oop_1d1">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5158
      Certain dynamic scripting languages such as AWK, sed, and perl have traditionally been adept at expressing one-liners. Specialist shell interpreters such as these Unix shells or the Windows PowerShell, allow for the construction of powerful one-liners.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5159
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5160
     <p id="ch6oop_1d2">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5161
      The use of the phrase one-liner has been widened to also include program-source for any language that does something useful in one line.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5162
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5163
     <p id="ch6oop_1d3">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5164
      The word
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5165
      <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5166
       <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5167
        One-liner
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5168
       </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5169
      </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5170
      has two references in the index of the book
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5171
      <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5172
       <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5173
        The AWK Programming Language
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5174
       </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5175
      </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5176
      (the book is often referred to by the abbreviation TAPL). It explains the programming language AWK, which is part of the Unix operating system. The authors explain the birth of the One-liner paradigm with their daily work on early Unix machines:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5177
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5178
     <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5179
      The 1977 version had only a few built-in variables and predefined functions. It was designed for writing short programs [...] Our model was that an invocation would be one or two lines long, typed in and used immediately. Defaults were chosen to match this style [...] We, being the authors, knew how the language was supposed to be used, and so we only wrote one-liners.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5180
     </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5181
     <p id="ch6oop_1d4">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5182
      Notice that this original definition of a One-liner implies immediate execution of the program without any compilation. So, in a strict sense, only source code for interpreted languages qualifies as a One-liner. But this strict understanding of a One-liner was broadened in 1985 when the IOCCC introduced the category of Best One Liner for C, which is a compiled language.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5183
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5184
     <p id="ch6oop_1d5">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5185
      The TAPL book contains 20 examples of One-liners (A Handful of Useful awk One-Liners) at the end of the book's first chapter.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5186
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5187
     <p id="ch6oop_1d6">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5188
      Here are the first few of them:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5189
     </p>
15
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5190
     <div class="orderedlist">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5191
      <ol class="orderedlist" type="1">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5192
       <li class="listitem">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5193
        <p id="ch6oop_1d7">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5194
         Print the total number of input lines:
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5195
        </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5196
        <p id="ch6oop_1d8">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5197
         END { print NR }
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5198
        </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5199
       </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5200
       <li class="listitem">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5201
        <p id="ch6oop_1d9">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5202
         Print the tenth input line:
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5203
        </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5204
        <p id="ch6oop_1da">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5205
         NR == 10
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5206
        </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5207
       </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5208
       <li class="listitem">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5209
        <p id="ch6oop_1db">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5210
         Print the last field of every input line:
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5211
        </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5212
        <p id="ch6oop_1dc">
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5213
         { print $NF }
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5214
        </p>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5215
       </li>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5216
      </ol>
f2383fee6584 Testing
amit@thunder
parents: 6
diff changeset
  5217
     </div>
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5218
     <p id="ch6oop_1dd">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5219
      One-liners are also used to show off the differential expressive power of programming languages. Frequently, one-liners are used to demonstrate programming ability. Contests are often held to see who can create the most exceptional one-liner.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5220
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5221
     <p id="ch6oop_1de">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5222
      The following example is a C program (a winning entry in the "Best one-liner" category of the IOCCC, here split to two lines for presentation).:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5223
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5224
     <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5225
      main(int c,char**v){return!m(v[1],v[2]);}m(char*s,char*t){return
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5226
*t-42?*s?63==*t|*s==*t&amp;&amp;m(s+1,t+1):!*t:m(s,t+1)||*s&amp;&amp;m(s+1,t);}
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5227
     </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5228
     <p id="ch6oop_1df">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5229
      This one-liner program is a
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5230
      <span class="emphasis">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5231
       <em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5232
        glob pattern matcher
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5233
       </em>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5234
      </span>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5235
      . It understands the glob characters '*' meaning 'zero or more characters' and '?' meaning exactly one character, just like most Unix shells.
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5236
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5237
     <p id="ch6oop_1e0">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5238
      Run it with two args, the string and the glob pattern. The exit status is 0 (shell true) when the pattern matches, 1 otherwise. The glob pattern must match the whole string, so you may want to use * at the beginning and end of the pattern if you are looking for something in the middle. Examples:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5239
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5240
     <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5241
      $ prog foo 'f??'; echo $?
1
672eaaab9204 Added some new html files that failed earlier during change from rst
amit@thunder
parents: 0
diff changeset
  5242
6
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5243
$ prog 'best short program' '??st*o**p?*'; echo $?
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5244
     </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5245
     <p id="ch6oop_1e1">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5246
      Here is a one line shell script to show directories:
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5247
     </p>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5248
     <pre class="programlisting">
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5249
      $ ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/   /' -e 's/-/|/'
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5250
     </pre>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5251
    </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5252
   </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5253
  </div>
1ce9b33fb6ff sorted the problem related to paths
amit@thunder
parents: 2
diff changeset
  5254
 </body>
0
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
  5255
</html>