--- a/SEESenv/web/html/ch9Using_Linux_Tools.html Mon Feb 22 00:37:50 2010 +0530
+++ b/SEESenv/web/html/ch9Using_Linux_Tools.html Mon Feb 22 16:22:32 2010 +0530
@@ -4,8 +4,15 @@
<title>
Chapter. Using_Linux_Tools
</title>
- <link rel="stylesheet" href="hgbook.css" type="text/css" />
- <meta name="generator" content="DocBook XSL Stylesheets V1.75.1" />
+ <link rel="stylesheet" href="/review/support/styles.css" type="text/css" />
+ <meta name="generator" content="DocBook XSL Stylesheets V1.74.3" />
+ <link rel="shortcut icon" type="image/png" href="/review/support/figs/favicon.png" />
+ <script type="text/javascript" src="/review/support/jquery-min.js">
+ </script>
+ <script type="text/javascript" src="/review/support/form.js">
+ </script>
+ <script type="text/javascript" src="/review/support/hsbook.js">
+ </script>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="chapter" id="Using_Linux_Tools">
@@ -20,7 +27,7 @@
<dl>
<dt>
<span class="article">
- <a href="#id2438728">
+ <a href="#id2949704">
</a>
</span>
</dt>
@@ -28,7 +35,7 @@
<dl>
<dt>
<span class="section">
- <a href="#id2248853">
+ <a href="#id2759829">
1. Introducing Linux
</a>
</span>
@@ -37,21 +44,21 @@
<dl>
<dt>
<span class="section">
- <a href="#id2438532">
+ <a href="#id2949508">
1.1. Historical Background
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2489779">
+ <a href="#id3000755">
1.2. Design and Implications
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2490190">
+ <a href="#id3001166">
1.3. Reasons for Using Linux
</a>
</span>
@@ -60,7 +67,7 @@
</dd>
<dt>
<span class="section">
- <a href="#id2490330">
+ <a href="#id3001306">
2. Getting Started
</a>
</span>
@@ -69,7 +76,7 @@
<dl>
<dt>
<span class="section">
- <a href="#id2490339">
+ <a href="#id3001315">
2.1. Logging in, activating the user interface and logging out
</a>
</span>
@@ -78,7 +85,7 @@
</dd>
<dt>
<span class="section">
- <a href="#id2490619">
+ <a href="#id3001595">
3. Basic Commands
</a>
</span>
@@ -87,35 +94,35 @@
<dl>
<dt>
<span class="section">
- <a href="#id2490627">
+ <a href="#id3001603">
3.1. ls
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2490791">
+ <a href="#id3001766">
3.2. date
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2490852">
+ <a href="#id3001826">
3.3. cd
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2490955">
+ <a href="#id3001928">
3.4. who
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2491038">
+ <a href="#id3002011">
3.5. mkdir
</a>
</span>
@@ -124,7 +131,7 @@
</dd>
<dt>
<span class="section">
- <a href="#id2491219">
+ <a href="#id3002178">
4. Getting Help
</a>
</span>
@@ -133,28 +140,28 @@
<dl>
<dt>
<span class="section">
- <a href="#id2491227">
+ <a href="#id3002187">
4.1. apropos and whatis
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2491311">
+ <a href="#id3002282">
4.2. man
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2491522">
+ <a href="#id3002475">
4.3. info
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2491614">
+ <a href="#id3002562">
4.4. --help
</a>
</span>
@@ -163,7 +170,7 @@
</dd>
<dt>
<span class="section">
- <a href="#id2491666">
+ <a href="#id3002615">
5. Basic file handling
</a>
</span>
@@ -172,21 +179,21 @@
<dl>
<dt>
<span class="section">
- <a href="#id2491675">
+ <a href="#id3002624">
5.1. cp
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2491990">
+ <a href="#id3002936">
5.2. mv
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2492122">
+ <a href="#id3003069">
5.3. rm
</a>
</span>
@@ -195,14 +202,14 @@
</dd>
<dt>
<span class="section">
- <a href="#id2492294">
+ <a href="#id3003237">
6. Command Line Arguments
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2492388">
+ <a href="#id3003330">
7. Basic Text Processing
</a>
</span>
@@ -211,28 +218,28 @@
<dl>
<dt>
<span class="section">
- <a href="#id2492396">
+ <a href="#id3003339">
7.1. head
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2492483">
+ <a href="#id3003426">
7.2. tail
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2492611">
+ <a href="#id3003554">
7.3. cut
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2492698">
+ <a href="#id3003640">
7.4. paste
</a>
</span>
@@ -241,14 +248,14 @@
</dd>
<dt>
<span class="section">
- <a href="#id2492832">
+ <a href="#id3003775">
8. Shell Meta Characters
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2492941">
+ <a href="#id3003880">
9. Looking At Files
</a>
</span>
@@ -257,21 +264,21 @@
<dl>
<dt>
<span class="section">
- <a href="#id2492949">
+ <a href="#id3003888">
9.1. cat
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2493137">
+ <a href="#id3004076">
9.2. more
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2493248">
+ <a href="#id3004187">
9.3. less
</a>
</span>
@@ -280,7 +287,7 @@
</dd>
<dt>
<span class="section">
- <a href="#id2493498">
+ <a href="#id3004428">
10. Directory Structure
</a>
</span>
@@ -289,14 +296,14 @@
<dl>
<dt>
<span class="section">
- <a href="#id2493772">
+ <a href="#id3004703">
10.1. man hier
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2493788">
+ <a href="#id3004719">
10.2. ls -l
</a>
</span>
@@ -305,7 +312,7 @@
</dd>
<dt>
<span class="section">
- <a href="#id2493811">
+ <a href="#id3004742">
11. Permissions and Ownership
</a>
</span>
@@ -314,7 +321,7 @@
<dl>
<dt>
<span class="section">
- <a href="#id2493820">
+ <a href="#id3004751">
11.1. chmod
</a>
</span>
@@ -323,7 +330,7 @@
</dd>
<dt>
<span class="section">
- <a href="#id2494598">
+ <a href="#id3005528">
12. Redirection and Piping
</a>
</span>
@@ -332,35 +339,35 @@
<dl>
<dt>
<span class="section">
- <a href="#id2494633">
+ <a href="#id3005563">
12.1. Redirecting standard input and standard output
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2494702">
+ <a href="#id3005633">
12.2. Piping
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2494764">
+ <a href="#id3005695">
12.3. Redirecting to and from the standard file handles
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2494971">
+ <a href="#id3005902">
12.4. Chained pipelines
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2495005">
+ <a href="#id3005936">
12.5. Redirect to multiple outputs
</a>
</span>
@@ -369,7 +376,7 @@
</dd>
<dt>
<span class="section">
- <a href="#id2495036">
+ <a href="#id3005967">
13. More Text Processing
</a>
</span>
@@ -378,14 +385,14 @@
<dl>
<dt>
<span class="section">
- <a href="#id2495045">
+ <a href="#id3005976">
13.1. grep
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2495235">
+ <a href="#id3006166">
13.2. tr
</a>
</span>
@@ -394,7 +401,7 @@
</dd>
<dt>
<span class="section">
- <a href="#id2495386">
+ <a href="#id3006317">
14. Elementary Regex
</a>
</span>
@@ -403,7 +410,7 @@
<dl>
<dt>
<span class="section">
- <a href="#id2495602">
+ <a href="#id3006530">
14.1. Lazy quantification
</a>
</span>
@@ -412,7 +419,7 @@
</dd>
<dt>
<span class="section">
- <a href="#id2495679">
+ <a href="#id3006606">
15. One Liners
</a>
</span>
@@ -425,7 +432,7 @@
<div class="titlepage">
<div>
<div>
- <h2 class="title" id="id2438728">
+ <h2 class="title" id="id2949704">
</h2>
</div>
</div>
@@ -440,7 +447,7 @@
<dl>
<dt>
<span class="section">
- <a href="#id2248853">
+ <a href="#id2759829">
1. Introducing Linux
</a>
</span>
@@ -449,21 +456,21 @@
<dl>
<dt>
<span class="section">
- <a href="#id2438532">
+ <a href="#id2949508">
1.1. Historical Background
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2489779">
+ <a href="#id3000755">
1.2. Design and Implications
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2490190">
+ <a href="#id3001166">
1.3. Reasons for Using Linux
</a>
</span>
@@ -472,7 +479,7 @@
</dd>
<dt>
<span class="section">
- <a href="#id2490330">
+ <a href="#id3001306">
2. Getting Started
</a>
</span>
@@ -481,7 +488,7 @@
<dl>
<dt>
<span class="section">
- <a href="#id2490339">
+ <a href="#id3001315">
2.1. Logging in, activating the user interface and logging out
</a>
</span>
@@ -490,7 +497,7 @@
</dd>
<dt>
<span class="section">
- <a href="#id2490619">
+ <a href="#id3001595">
3. Basic Commands
</a>
</span>
@@ -499,35 +506,35 @@
<dl>
<dt>
<span class="section">
- <a href="#id2490627">
+ <a href="#id3001603">
3.1. ls
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2490791">
+ <a href="#id3001766">
3.2. date
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2490852">
+ <a href="#id3001826">
3.3. cd
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2490955">
+ <a href="#id3001928">
3.4. who
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2491038">
+ <a href="#id3002011">
3.5. mkdir
</a>
</span>
@@ -536,7 +543,7 @@
</dd>
<dt>
<span class="section">
- <a href="#id2491219">
+ <a href="#id3002178">
4. Getting Help
</a>
</span>
@@ -545,28 +552,28 @@
<dl>
<dt>
<span class="section">
- <a href="#id2491227">
+ <a href="#id3002187">
4.1. apropos and whatis
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2491311">
+ <a href="#id3002282">
4.2. man
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2491522">
+ <a href="#id3002475">
4.3. info
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2491614">
+ <a href="#id3002562">
4.4. --help
</a>
</span>
@@ -575,7 +582,7 @@
</dd>
<dt>
<span class="section">
- <a href="#id2491666">
+ <a href="#id3002615">
5. Basic file handling
</a>
</span>
@@ -584,21 +591,21 @@
<dl>
<dt>
<span class="section">
- <a href="#id2491675">
+ <a href="#id3002624">
5.1. cp
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2491990">
+ <a href="#id3002936">
5.2. mv
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2492122">
+ <a href="#id3003069">
5.3. rm
</a>
</span>
@@ -607,14 +614,14 @@
</dd>
<dt>
<span class="section">
- <a href="#id2492294">
+ <a href="#id3003237">
6. Command Line Arguments
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2492388">
+ <a href="#id3003330">
7. Basic Text Processing
</a>
</span>
@@ -623,28 +630,28 @@
<dl>
<dt>
<span class="section">
- <a href="#id2492396">
+ <a href="#id3003339">
7.1. head
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2492483">
+ <a href="#id3003426">
7.2. tail
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2492611">
+ <a href="#id3003554">
7.3. cut
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2492698">
+ <a href="#id3003640">
7.4. paste
</a>
</span>
@@ -653,14 +660,14 @@
</dd>
<dt>
<span class="section">
- <a href="#id2492832">
+ <a href="#id3003775">
8. Shell Meta Characters
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2492941">
+ <a href="#id3003880">
9. Looking At Files
</a>
</span>
@@ -669,21 +676,21 @@
<dl>
<dt>
<span class="section">
- <a href="#id2492949">
+ <a href="#id3003888">
9.1. cat
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2493137">
+ <a href="#id3004076">
9.2. more
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2493248">
+ <a href="#id3004187">
9.3. less
</a>
</span>
@@ -692,7 +699,7 @@
</dd>
<dt>
<span class="section">
- <a href="#id2493498">
+ <a href="#id3004428">
10. Directory Structure
</a>
</span>
@@ -701,14 +708,14 @@
<dl>
<dt>
<span class="section">
- <a href="#id2493772">
+ <a href="#id3004703">
10.1. man hier
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2493788">
+ <a href="#id3004719">
10.2. ls -l
</a>
</span>
@@ -717,7 +724,7 @@
</dd>
<dt>
<span class="section">
- <a href="#id2493811">
+ <a href="#id3004742">
11. Permissions and Ownership
</a>
</span>
@@ -726,7 +733,7 @@
<dl>
<dt>
<span class="section">
- <a href="#id2493820">
+ <a href="#id3004751">
11.1. chmod
</a>
</span>
@@ -735,7 +742,7 @@
</dd>
<dt>
<span class="section">
- <a href="#id2494598">
+ <a href="#id3005528">
12. Redirection and Piping
</a>
</span>
@@ -744,35 +751,35 @@
<dl>
<dt>
<span class="section">
- <a href="#id2494633">
+ <a href="#id3005563">
12.1. Redirecting standard input and standard output
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2494702">
+ <a href="#id3005633">
12.2. Piping
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2494764">
+ <a href="#id3005695">
12.3. Redirecting to and from the standard file handles
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2494971">
+ <a href="#id3005902">
12.4. Chained pipelines
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2495005">
+ <a href="#id3005936">
12.5. Redirect to multiple outputs
</a>
</span>
@@ -781,7 +788,7 @@
</dd>
<dt>
<span class="section">
- <a href="#id2495036">
+ <a href="#id3005967">
13. More Text Processing
</a>
</span>
@@ -790,14 +797,14 @@
<dl>
<dt>
<span class="section">
- <a href="#id2495045">
+ <a href="#id3005976">
13.1. grep
</a>
</span>
</dt>
<dt>
<span class="section">
- <a href="#id2495235">
+ <a href="#id3006166">
13.2. tr
</a>
</span>
@@ -806,7 +813,7 @@
</dd>
<dt>
<span class="section">
- <a href="#id2495386">
+ <a href="#id3006317">
14. Elementary Regex
</a>
</span>
@@ -815,7 +822,7 @@
<dl>
<dt>
<span class="section">
- <a href="#id2495602">
+ <a href="#id3006530">
14.1. Lazy quantification
</a>
</span>
@@ -824,7 +831,7 @@
</dd>
<dt>
<span class="section">
- <a href="#id2495679">
+ <a href="#id3006606">
15. One Liners
</a>
</span>
@@ -836,7 +843,7 @@
<div>
<div>
<h2 class="title" style="clear: both">
- <a name="id2248853">
+ <a name="id2759829">
</a>
1.Introducing Linux
</h2>
@@ -860,7 +867,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2438532">
+ <a name="id2949508">
</a>
1.1.Historical Background
</h3>
@@ -872,7 +879,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2436514">
+ <a name="id2947490">
</a>
1.1.1.Events leading to the creation
</h4>
@@ -899,7 +906,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2489744">
+ <a name="id3000720">
</a>
1.1.2.The Creation of Linux
</h4>
@@ -919,7 +926,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2489779">
+ <a name="id3000755">
</a>
1.2.Design and Implications
</h3>
@@ -934,7 +941,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2489804">
+ <a name="id3000780">
</a>
1.2.1.User Interface
</h4>
@@ -953,7 +960,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2489858">
+ <a name="id3000834">
</a>
1.2.2.Development
</h4>
@@ -975,7 +982,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2489559">
+ <a name="id3000535">
</a>
1.2.3.Community
</h4>
@@ -997,7 +1004,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2489604">
+ <a name="id3000580">
</a>
1.2.4.Can I make a profit out of running a business involving Linux?
</h4>
@@ -1013,7 +1020,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2489650">
+ <a name="id3000626">
</a>
1.2.5.Programming on Linux
</h4>
@@ -1036,7 +1043,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2490190">
+ <a name="id3001166">
</a>
1.3.Reasons for Using Linux
</h3>
@@ -1124,7 +1131,7 @@
<div>
<div>
<h2 class="title" style="clear: both">
- <a name="id2490330">
+ <a name="id3001306">
</a>
2.Getting Started
</h2>
@@ -1136,7 +1143,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2490339">
+ <a name="id3001315">
</a>
2.1.Logging in, activating the user interface and logging out
</h3>
@@ -1151,7 +1158,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2490369">
+ <a name="id3001345">
</a>
2.1.1.Graphical Mode
</h4>
@@ -1274,7 +1281,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2490529">
+ <a name="id3001505">
</a>
2.1.2.Text Mode
</h4>
@@ -1329,7 +1336,7 @@
<div>
<div>
<h2 class="title" style="clear: both">
- <a name="id2490619">
+ <a name="id3001595">
</a>
3.Basic Commands
</h2>
@@ -1341,7 +1348,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2490627">
+ <a name="id3001603">
</a>
3.1.ls
</h3>
@@ -1387,84 +1394,80 @@
</span>
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:
</p>
- <span style="color: red">
- <block_quote>
- <div class="itemizedlist">
- <ul class="itemizedlist" type="*">
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_34">
- <span class="emphasis">
- <em>
- -l
- </em>
- </span>
- long format, displaying Unix file types, permissions, number of hard links, owner, group, size, date, and filename
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_35">
- <span class="emphasis">
- <em>
- -F
- </em>
- </span>
- appends a character revealing the nature of a file, for example, * for an executable, or / for a directory. Regular files have no suffix.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_36">
- <span class="emphasis">
- <em>
- -a
- </em>
- </span>
- 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.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_37">
- <span class="emphasis">
- <em>
- -R
- </em>
- </span>
- recursively lists subdirectories. The command ls -R / would therefore list all files.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_38">
- <span class="emphasis">
- <em>
- -d
- </em>
- </span>
- shows information about a symbolic link or directory, rather than about the link's target or listing the contents of a directory.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_39">
- <span class="emphasis">
- <em>
- -t
- </em>
- </span>
- sort the list of files by modification time.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_3a">
- <span class="emphasis">
- <em>
- -h
- </em>
- </span>
- print sizes in human readable format. (e.g., 1K, 234M, 2G, etc.)
- </p>
- </li>
- </ul>
- </div>
- </block_quote>
- </span>
+ <div class="itemizedlist">
+ <ul class="itemizedlist" type="*">
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_34">
+ <span class="emphasis">
+ <em>
+ -l
+ </em>
+ </span>
+ long format, displaying Unix file types, permissions, number of hard links, owner, group, size, date, and filename
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_35">
+ <span class="emphasis">
+ <em>
+ -F
+ </em>
+ </span>
+ appends a character revealing the nature of a file, for example, * for an executable, or / for a directory. Regular files have no suffix.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_36">
+ <span class="emphasis">
+ <em>
+ -a
+ </em>
+ </span>
+ 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.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_37">
+ <span class="emphasis">
+ <em>
+ -R
+ </em>
+ </span>
+ recursively lists subdirectories. The command ls -R / would therefore list all files.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_38">
+ <span class="emphasis">
+ <em>
+ -d
+ </em>
+ </span>
+ shows information about a symbolic link or directory, rather than about the link's target or listing the contents of a directory.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_39">
+ <span class="emphasis">
+ <em>
+ -t
+ </em>
+ </span>
+ sort the list of files by modification time.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_3a">
+ <span class="emphasis">
+ <em>
+ -h
+ </em>
+ </span>
+ print sizes in human readable format. (e.g., 1K, 234M, 2G, etc.)
+ </p>
+ </li>
+ </ul>
+ </div>
<p id="ch9Using_Linux_Tools_3b">
In some environments, providing the option
<span class="emphasis">
@@ -1515,7 +1518,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2490791">
+ <a name="id3001766">
</a>
3.2.date
</h3>
@@ -1571,7 +1574,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2490852">
+ <a name="id3001826">
</a>
3.3.cd
</h3>
@@ -1593,13 +1596,9 @@
<p id="ch9Using_Linux_Tools_46">
Absolute paths:
</p>
- <span style="color: red">
- <block_quote>
- </span>
<p id="ch9Using_Linux_Tools_47">
An absolute path is easily recognised from the leading forward slash, /. The / means that you start at the top level directory and continue down.
</p>
- </block_quote>
<p id="ch9Using_Linux_Tools_48">
For example to get to /boot/grub you would type:
</p>
@@ -1612,9 +1611,6 @@
<p id="ch9Using_Linux_Tools_4a">
Relative paths:
</p>
- <span style="color: red">
- <block_quote>
- </span>
<p id="ch9Using_Linux_Tools_4b">
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.
</p>
@@ -1624,7 +1620,6 @@
<pre class="programlisting">
$ cd music
</pre>
- </block_quote>
<p id="ch9Using_Linux_Tools_4d">
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.
</p>
@@ -1634,7 +1629,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2490955">
+ <a name="id3001928">
</a>
3.4.who
</h3>
@@ -1732,7 +1727,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2491038">
+ <a name="id3002011">
</a>
3.5.mkdir
</h3>
@@ -1765,7 +1760,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2491070">
+ <a name="id3002043">
</a>
3.5.1.Options
</h4>
@@ -1781,44 +1776,40 @@
</span>
takes options. Three of the most common options are:
</p>
- <span style="color: red">
- <block_quote>
- <div class="itemizedlist">
- <ul class="itemizedlist" type="*">
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_56">
- <span class="emphasis">
- <em>
- -p
- </em>
- </span>
- : 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.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_57">
- <span class="emphasis">
- <em>
- -v
- </em>
- </span>
- : display each directory that mkdir creates. Most often used with -p.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_58">
- <span class="emphasis">
- <em>
- -m
- </em>
- </span>
- : specify the octal permissions of directories created by mkdir.
- </p>
- </li>
- </ul>
- </div>
- </block_quote>
- </span>
+ <div class="itemizedlist">
+ <ul class="itemizedlist" type="*">
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_56">
+ <span class="emphasis">
+ <em>
+ -p
+ </em>
+ </span>
+ : 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.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_57">
+ <span class="emphasis">
+ <em>
+ -v
+ </em>
+ </span>
+ : display each directory that mkdir creates. Most often used with -p.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_58">
+ <span class="emphasis">
+ <em>
+ -m
+ </em>
+ </span>
+ : specify the octal permissions of directories created by mkdir.
+ </p>
+ </li>
+ </ul>
+ </div>
<p id="ch9Using_Linux_Tools_59">
<span class="emphasis">
<em>
@@ -1833,7 +1824,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2491132">
+ <a name="id3002102">
</a>
3.5.2.Examples
</h4>
@@ -1888,56 +1879,28 @@
<p id="ch9Using_Linux_Tools_5d">
This will create:
</p>
- <span style="color: red">
- <definition_list>
- <span style="color: red">
- <definition_list_item>
- <span style="color: red">
- <term>tmpdir - branches</term>
- </span>
- <span style="color: red">
- <definition>
+ tmpdir - branches
+ <div class="itemizedlist">
+ <ul class="itemizedlist" type="*">
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_5e">
+ tag
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ trunk - sources - includes
<div class="itemizedlist">
<ul class="itemizedlist" type="*">
<li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_5e">
- tag
+ <p id="ch9Using_Linux_Tools_5f">
+ docs
</p>
</li>
- <li class="listitem" style="list-style-type: *">
- <span style="color: red">
- <definition_list>
- <span style="color: red">
- <definition_list_item>
- <span style="color: red">
- <term>trunk - sources - includes</term>
- </span>
- <span style="color: red">
- <definition>
- <div class="itemizedlist">
- <ul class="itemizedlist" type="*">
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_5f">
- docs
- </p>
- </li>
- </ul>
- </div>
- </definition>
- </span>
- </definition_list_item>
- </span>
- </definition_list>
- </span>
- </li>
</ul>
</div>
- </definition>
- </span>
- </definition_list_item>
- </span>
- </definition_list>
- </span>
+ </li>
+ </ul>
+ </div>
</div>
</div>
</div>
@@ -1946,7 +1909,7 @@
<div>
<div>
<h2 class="title" style="clear: both">
- <a name="id2491219">
+ <a name="id3002178">
</a>
4.Getting Help
</h2>
@@ -1958,7 +1921,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2491227">
+ <a name="id3002187">
</a>
4.1.apropos and whatis
</h3>
@@ -2040,7 +2003,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2491311">
+ <a name="id3002282">
</a>
4.2.man
</h3>
@@ -2121,7 +2084,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2491394">
+ <a name="id3002364">
</a>
4.2.1.Layout
</h4>
@@ -2131,80 +2094,26 @@
<p id="ch9Using_Linux_Tools_6b">
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:
</p>
- <span style="color: red">
- <definition_list>
- <span style="color: red">
- <definition_list_item>
- <span style="color: red">
- <term>NAME</term>
- </span>
- <span style="color: red">
- <definition>
- </span>
- </span>
- </span>
+ NAME
<p id="ch9Using_Linux_Tools_6c">
The name of the command or function, followed by a one-line description of what it does.
</p>
- </definition>
- </definition_list_item>
- <span style="color: red">
- <definition_list_item>
- <span style="color: red">
- <term>SYNOPSIS</term>
- </span>
- <span style="color: red">
- <definition>
- </span>
- </span>
+ SYNOPSIS
<p id="ch9Using_Linux_Tools_6d">
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.
</p>
- </definition>
- </definition_list_item>
- <span style="color: red">
- <definition_list_item>
- <span style="color: red">
- <term>DESCRIPTION</term>
- </span>
- <span style="color: red">
- <definition>
- </span>
- </span>
+ DESCRIPTION
<p id="ch9Using_Linux_Tools_6e">
A textual description of the functioning of the command or function.
</p>
- </definition>
- </definition_list_item>
- <span style="color: red">
- <definition_list_item>
- <span style="color: red">
- <term>EXAMPLES</term>
- </span>
- <span style="color: red">
- <definition>
- </span>
- </span>
+ EXAMPLES
<p id="ch9Using_Linux_Tools_6f">
Some examples of common usage.
</p>
- </definition>
- </definition_list_item>
- <span style="color: red">
- <definition_list_item>
- <span style="color: red">
- <term>SEE ALSO</term>
- </span>
- <span style="color: red">
- <definition>
- </span>
- </span>
+ SEE ALSO
<p id="ch9Using_Linux_Tools_70">
A list of related commands or functions.
</p>
- </definition>
- </definition_list_item>
- </definition_list>
<p id="ch9Using_Linux_Tools_71">
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.
</p>
@@ -2236,7 +2145,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2491522">
+ <a name="id3002475">
</a>
4.3.info
</h3>
@@ -2265,63 +2174,55 @@
</span>
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
</p>
- <span style="color: red">
- <block_quote>
- <div class="itemizedlist">
- <ul class="itemizedlist" type="*">
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_7a">
- <span class="emphasis">
- <em>
- n
- </em>
- </span>
- goes to the next page.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_7b">
- <span class="emphasis">
- <em>
- p
- </em>
- </span>
- goes to the previous page.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_7c">
- <span class="emphasis">
- <em>
- u
- </em>
- </span>
- goes to the upper page.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_7d">
- <span class="emphasis">
- <em>
- l
- </em>
- </span>
- goes to the last(visited) node
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_7e">
- To follow a cross reference, the cursor can be moved over a link (a word preceded by a
- <span style="color: red">
- <title_reference>*</title_reference>
- </span>
- ) and enter pressed.
- </p>
- </li>
- </ul>
- </div>
- </block_quote>
- </span>
+ <div class="itemizedlist">
+ <ul class="itemizedlist" type="*">
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_7a">
+ <span class="emphasis">
+ <em>
+ n
+ </em>
+ </span>
+ goes to the next page.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_7b">
+ <span class="emphasis">
+ <em>
+ p
+ </em>
+ </span>
+ goes to the previous page.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_7c">
+ <span class="emphasis">
+ <em>
+ u
+ </em>
+ </span>
+ goes to the upper page.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_7d">
+ <span class="emphasis">
+ <em>
+ l
+ </em>
+ </span>
+ goes to the last(visited) node
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_7e">
+ To follow a cross reference, the cursor can be moved over a link (a word preceded by a *) and enter pressed.
+ </p>
+ </li>
+ </ul>
+ </div>
<p id="ch9Using_Linux_Tools_7f">
info was initially written for use with GNU/Linux and then ported to other Unix-like operating systems.
</p>
@@ -2331,7 +2232,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2491614">
+ <a name="id3002562">
</a>
4.4.--help
</h3>
@@ -2380,7 +2281,7 @@
<div>
<div>
<h2 class="title" style="clear: both">
- <a name="id2491666">
+ <a name="id3002615">
</a>
5.Basic file handling
</h2>
@@ -2392,7 +2293,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2491675">
+ <a name="id3002624">
</a>
5.1.cp
</h3>
@@ -2412,7 +2313,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2491692">
+ <a name="id3002641">
</a>
5.1.1.Usage
</h4>
@@ -2444,7 +2345,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2491727">
+ <a name="id3002676">
</a>
5.1.2.Flags
</h4>
@@ -2483,29 +2384,25 @@
</span>
(preserve) duplicates the following characteristics of each SourceFile/SourceDirectory in the corresponding TargetFile and/or TargetDirectory:
</p>
- <span style="color: red">
- <block_quote>
- <div class="itemizedlist">
- <ul class="itemizedlist" type="*">
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_89">
- The time of the last data modification and the time of the last access.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_8a">
- The user ID and group ID (only if it has permissions to do this)
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_8b">
- The file permission bits and the SUID and SGID bits.
- </p>
- </li>
- </ul>
- </div>
- </block_quote>
- </span>
+ <div class="itemizedlist">
+ <ul class="itemizedlist" type="*">
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_89">
+ The time of the last data modification and the time of the last access.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_8a">
+ The user ID and group ID (only if it has permissions to do this)
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_8b">
+ The file permission bits and the SUID and SGID bits.
+ </p>
+ </li>
+ </ul>
+ </div>
<p id="ch9Using_Linux_Tools_8c">
<span class="emphasis">
<em>
@@ -2520,7 +2417,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2491826">
+ <a name="id3002773">
</a>
5.1.3.Examples
</h4>
@@ -2602,13 +2499,9 @@
<p id="ch9Using_Linux_Tools_95">
To copy a directory, including all its files and subdirectories, to another directory, enter:
</p>
- <span style="color: red">
- <block_quote>
- </span>
<p id="ch9Using_Linux_Tools_96">
$ cp -R /home/hhgg/clients /home/hhgg/customers
</p>
- </block_quote>
<p id="ch9Using_Linux_Tools_97">
This copies the clients directory, including all its files, subdirectories, and the files in those subdirectories, to the customers/clients directory.
</p>
@@ -2667,7 +2560,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2491990">
+ <a name="id3002936">
</a>
5.2.mv
</h3>
@@ -2693,7 +2586,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2492014">
+ <a name="id3002960">
</a>
5.2.1.Conflicting existing file
</h4>
@@ -2709,7 +2602,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2492033">
+ <a name="id3002980">
</a>
5.2.2.Differences with copy and delete
</h4>
@@ -2725,7 +2618,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2492063">
+ <a name="id3003010">
</a>
5.2.3.Examples
</h4>
@@ -2786,7 +2679,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2492122">
+ <a name="id3003069">
</a>
5.3.rm
</h3>
@@ -2813,7 +2706,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2492152">
+ <a name="id3003099">
</a>
5.3.1.Options
</h4>
@@ -2823,54 +2716,50 @@
<p id="ch9Using_Linux_Tools_a3">
Common options that rm accepts include:
</p>
- <span style="color: red">
- <block_quote>
- <div class="itemizedlist">
- <ul class="itemizedlist" type="*">
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_a4">
- <span class="emphasis">
- <em>
- -r
- </em>
- </span>
- , which removes directories, removing the contents recursively beforehand (so as not to leave files without a directory to reside in) ("recursive")
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_a5">
- <span class="emphasis">
- <em>
- -i
- </em>
- </span>
- , which asks for every deletion to be confirmed ("interactive")
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_a6">
- <span class="emphasis">
- <em>
- -f
- </em>
- </span>
- , which ignores non-existent files and overrides any confirmation prompts ("force")
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_a7">
- <span class="emphasis">
- <em>
- -v
- </em>
- </span>
- , which shows what is being removed as it happens ("verbose")
- </p>
- </li>
- </ul>
- </div>
- </block_quote>
- </span>
+ <div class="itemizedlist">
+ <ul class="itemizedlist" type="*">
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_a4">
+ <span class="emphasis">
+ <em>
+ -r
+ </em>
+ </span>
+ , which removes directories, removing the contents recursively beforehand (so as not to leave files without a directory to reside in) ("recursive")
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_a5">
+ <span class="emphasis">
+ <em>
+ -i
+ </em>
+ </span>
+ , which asks for every deletion to be confirmed ("interactive")
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_a6">
+ <span class="emphasis">
+ <em>
+ -f
+ </em>
+ </span>
+ , which ignores non-existent files and overrides any confirmation prompts ("force")
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_a7">
+ <span class="emphasis">
+ <em>
+ -v
+ </em>
+ </span>
+ , which shows what is being removed as it happens ("verbose")
+ </p>
+ </li>
+ </ul>
+ </div>
<p id="ch9Using_Linux_Tools_a8">
<span class="emphasis">
<em>
@@ -2885,11 +2774,7 @@
rm -rf
</em>
</span>
- (variously, rm -rf /, rm -rf
- <span style="color: red">
- <title_reference>*</title_reference>
- </span>
- , 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.
+ (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.
</p>
<p id="ch9Using_Linux_Tools_aa">
<span class="emphasis">
@@ -2917,7 +2802,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2492255">
+ <a name="id3003197">
</a>
5.3.2.Permissions
</h4>
@@ -2941,7 +2826,7 @@
<div>
<div>
<h2 class="title" style="clear: both">
- <a name="id2492294">
+ <a name="id3003237">
</a>
6.Command Line Arguments
</h2>
@@ -3026,7 +2911,7 @@
<div>
<div>
<h2 class="title" style="clear: both">
- <a name="id2492388">
+ <a name="id3003330">
</a>
7.Basic Text Processing
</h2>
@@ -3038,7 +2923,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2492396">
+ <a name="id3003339">
</a>
7.1.head
</h3>
@@ -3088,7 +2973,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2492448">
+ <a name="id3003390">
</a>
7.1.1.Flags
</h4>
@@ -3128,7 +3013,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2492483">
+ <a name="id3003426">
</a>
7.2.tail
</h3>
@@ -3194,7 +3079,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2492562">
+ <a name="id3003504">
</a>
7.2.1.File monitoring
</h4>
@@ -3243,7 +3128,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2492611">
+ <a name="id3003554">
</a>
7.3.cut
</h3>
@@ -3322,7 +3207,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2492698">
+ <a name="id3003640">
</a>
7.4.paste
</h3>
@@ -3407,7 +3292,7 @@
<div>
<div>
<h2 class="title" style="clear: both">
- <a name="id2492832">
+ <a name="id3003775">
</a>
8.Shell Meta Characters
</h2>
@@ -3448,11 +3333,7 @@
because the c* matches that long file name.
</p>
<p id="ch9Using_Linux_Tools_e6">
- 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
- <span style="color: red">
- <title_reference>"``*`|more</title_reference>
- </span>
- "` can be accomplished with:
+ 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:
</p>
<pre class="programlisting">
$ rm ??more
@@ -3475,7 +3356,7 @@
<div>
<div>
<h2 class="title" style="clear: both">
- <a name="id2492941">
+ <a name="id3003880">
</a>
9.Looking At Files
</h2>
@@ -3487,7 +3368,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2492949">
+ <a name="id3003888">
</a>
9.1.cat
</h3>
@@ -3532,7 +3413,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2492993">
+ <a name="id3003932">
</a>
9.1.1.Jargon File Definition
</h4>
@@ -3576,7 +3457,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2493032">
+ <a name="id3003971">
</a>
9.1.2.Useless Use of 'cat'
</h4>
@@ -3628,7 +3509,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2493103">
+ <a name="id3004043">
</a>
9.1.3.zcat
</h4>
@@ -3679,7 +3560,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2493137">
+ <a name="id3004076">
</a>
9.2.more
</h3>
@@ -3700,7 +3581,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2493157">
+ <a name="id3004096">
</a>
9.2.1.Usage
</h4>
@@ -3803,7 +3684,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2493248">
+ <a name="id3004187">
</a>
9.3.less
</h3>
@@ -3835,7 +3716,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2493277">
+ <a name="id3004216">
</a>
9.3.1.Usage
</h4>
@@ -3889,139 +3770,131 @@
<div>
<div>
<h4 class="title">
- <a name="id2493338">
+ <a name="id3004271">
</a>
9.3.2.Frequently Used Options
</h4>
</div>
</div>
</div>
- <span style="color: red">
- <block_quote>
- <div class="itemizedlist">
- <ul class="itemizedlist" type="*">
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_fe">
- -g: Highlights just the current match of any searched string.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_ff">
- -I: Case-insensitive searches.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_100">
- -M: Shows more detailed prompt, including file position.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_101">
- -N: Shows line numbers (useful for source code viewing).
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_102">
- -S: Disables line wrap ("chop long lines"). Long lines can be seen by side scrolling.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_103">
- -?: Shows help.
- </p>
- </li>
- </ul>
- </div>
- </block_quote>
- </span>
+ <div class="itemizedlist">
+ <ul class="itemizedlist" type="*">
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_fe">
+ -g: Highlights just the current match of any searched string.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_ff">
+ -I: Case-insensitive searches.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_100">
+ -M: Shows more detailed prompt, including file position.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_101">
+ -N: Shows line numbers (useful for source code viewing).
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_102">
+ -S: Disables line wrap ("chop long lines"). Long lines can be seen by side scrolling.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_103">
+ -?: Shows help.
+ </p>
+ </li>
+ </ul>
+ </div>
</div>
<div class="section" title="9.3.3.Frequently Used Commands">
<div class="titlepage">
<div>
<div>
<h4 class="title">
- <a name="id2493391">
+ <a name="id3004323">
</a>
9.3.3.Frequently Used Commands
</h4>
</div>
</div>
</div>
- <span style="color: red">
- <block_quote>
- <div class="itemizedlist">
- <ul class="itemizedlist" type="*">
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_104">
- [Arrows]/[Page Up]/[Page Down]/[Home]/[End]: Navigation.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_105">
- [Space bar]: Next page.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_106">
- b: Previous page.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_107">
- ng: Jump to line number n. Default is the start of the file.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_108">
- nG: Jump to line number n. Default is the end of the file.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_109">
- /pattern: Search for pattern. Regular expressions can be used.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_10a">
- '^ or g: Go to start of file.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_10b">
- '$ or G: Go to end of file.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_10c">
- s: Save current content (got from another program like grep) in a file.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_10d">
- =: File information.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_10e">
- h: Help.
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_10f">
- q: Quit.
- </p>
- </li>
- </ul>
- </div>
- </block_quote>
- </span>
+ <div class="itemizedlist">
+ <ul class="itemizedlist" type="*">
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_104">
+ [Arrows]/[Page Up]/[Page Down]/[Home]/[End]: Navigation.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_105">
+ [Space bar]: Next page.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_106">
+ b: Previous page.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_107">
+ ng: Jump to line number n. Default is the start of the file.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_108">
+ nG: Jump to line number n. Default is the end of the file.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_109">
+ /pattern: Search for pattern. Regular expressions can be used.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_10a">
+ '^ or g: Go to start of file.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_10b">
+ '$ or G: Go to end of file.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_10c">
+ s: Save current content (got from another program like grep) in a file.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_10d">
+ =: File information.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_10e">
+ h: Help.
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_10f">
+ q: Quit.
+ </p>
+ </li>
+ </ul>
+ </div>
</div>
<div class="section" title="9.3.4.Examples">
<div class="titlepage">
<div>
<div>
<h4 class="title">
- <a name="id2493482">
+ <a name="id3004413">
</a>
9.3.4.Examples
</h4>
@@ -4042,7 +3915,7 @@
<div>
<div>
<h2 class="title" style="clear: both">
- <a name="id2493498">
+ <a name="id3004428">
</a>
10.Directory Structure
</h2>
@@ -4068,7 +3941,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2493772">
+ <a name="id3004703">
</a>
10.1.man hier
</h3>
@@ -4087,7 +3960,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2493788">
+ <a name="id3004719">
</a>
10.2.ls -l
</h3>
@@ -4110,7 +3983,7 @@
<div>
<div>
<h2 class="title" style="clear: both">
- <a name="id2493811">
+ <a name="id3004742">
</a>
11.Permissions and Ownership
</h2>
@@ -4122,7 +3995,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2493820">
+ <a name="id3004751">
</a>
11.1.chmod
</h3>
@@ -4143,7 +4016,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2493846">
+ <a name="id3004777">
</a>
11.1.1.Usage
</h4>
@@ -4174,7 +4047,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2493874">
+ <a name="id3004805">
</a>
11.1.2.Command line options
</h4>
@@ -4190,30 +4063,26 @@
</span>
command has a number of command line options that affect its behavior. The most common options are:
</p>
- <span style="color: red">
- <block_quote>
- <div class="itemizedlist">
- <ul class="itemizedlist" type="*">
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_13d">
- -R: Changes the modes of directories and files recursively
- </p>
- </li>
- <li class="listitem" style="list-style-type: *">
- <p id="ch9Using_Linux_Tools_13e">
- -v: Verbose mode; lists all files as they are being processed
- </p>
- </li>
- </ul>
- </div>
- </block_quote>
- </span>
+ <div class="itemizedlist">
+ <ul class="itemizedlist" type="*">
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_13d">
+ -R: Changes the modes of directories and files recursively
+ </p>
+ </li>
+ <li class="listitem" style="list-style-type: *">
+ <p id="ch9Using_Linux_Tools_13e">
+ -v: Verbose mode; lists all files as they are being processed
+ </p>
+ </li>
+ </ul>
+ </div>
<div class="section" title="11.1.2.1.Symbolic modes">
<div class="titlepage">
<div>
<div>
<h5 class="title">
- <a name="id2493911">
+ <a name="id3004841">
</a>
11.1.2.1.Symbolic modes
</h5>
@@ -4284,7 +4153,7 @@
<div>
<div>
<h5 class="title">
- <a name="id2494472">
+ <a name="id3005402">
</a>
11.1.2.2.Symbolic examples
</h5>
@@ -4333,7 +4202,7 @@
<div>
<div>
<h5 class="title">
- <a name="id2494515">
+ <a name="id3005445">
</a>
11.1.2.3.Octal numbers
</h5>
@@ -4384,7 +4253,7 @@
<div>
<div>
<h5 class="title">
- <a name="id2494554">
+ <a name="id3005484">
</a>
11.1.2.4.Special modes
</h5>
@@ -4436,7 +4305,7 @@
<div>
<div>
<h2 class="title" style="clear: both">
- <a name="id2494598">
+ <a name="id3005528">
</a>
12.Redirection and Piping
</h2>
@@ -4478,7 +4347,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2494633">
+ <a name="id3005563">
</a>
12.1.Redirecting standard input and standard output
</h3>
@@ -4553,7 +4422,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2494702">
+ <a name="id3005633">
</a>
12.2.Piping
</h3>
@@ -4611,7 +4480,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2494764">
+ <a name="id3005695">
</a>
12.3.Redirecting to and from the standard file handles
</h3>
@@ -4733,7 +4602,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2494971">
+ <a name="id3005902">
</a>
12.4.Chained pipelines
</h3>
@@ -4767,7 +4636,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2495005">
+ <a name="id3005936">
</a>
12.5.Redirect to multiple outputs
</h3>
@@ -4802,7 +4671,7 @@
<div>
<div>
<h2 class="title" style="clear: both">
- <a name="id2495036">
+ <a name="id3005967">
</a>
13.More Text Processing
</h2>
@@ -4814,7 +4683,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2495045">
+ <a name="id3005976">
</a>
13.1.grep
</h3>
@@ -4852,7 +4721,7 @@
<div>
<div>
<h4 class="title">
- <a name="id2495076">
+ <a name="id3006007">
</a>
13.1.1.Usage
</h4>
@@ -4927,7 +4796,7 @@
<div>
<div>
<h5 class="title">
- <a name="id2495155">
+ <a name="id3006086">
</a>
13.1.1.1.Variations
</h5>
@@ -5022,7 +4891,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2495235">
+ <a name="id3006166">
</a>
13.2.tr
</h3>
@@ -5164,7 +5033,7 @@
<div>
<div>
<h2 class="title" style="clear: both">
- <a name="id2495386">
+ <a name="id3006317">
</a>
14.Elementary Regex
</h2>
@@ -5214,7 +5083,7 @@
<div>
<div>
<h3 class="title">
- <a name="id2495602">
+ <a name="id3006530">
</a>
14.1.Lazy quantification
</h3>
@@ -5228,11 +5097,7 @@
Another whale explosion occurred on <January 26>, <2004>.
</pre>
<p id="ch9Using_Linux_Tools_1ca">
- ...would likely come up with the pattern <.*>, or similar. However, this pattern will actually return "<January 26>, <2004>" instead of the "<January 26>" which might be expected, because the
- <span style="color: red">
- <title_reference>*</title_reference>
- </span>
- quantifier is greedy it will consume as many characters as possible from the input, and "January 26>, <2004" has more characters than "January 26".
+ ...would likely come up with the pattern <.*>, or similar. However, this pattern will actually return "<January 26>, <2004>" instead of the "<January 26>" which might be expected, because the * quantifier is greedy it will consume as many characters as possible from the input, and "January 26>, <2004" has more characters than "January 26".
</p>
<p id="ch9Using_Linux_Tools_1cb">
Though this problem can be avoided in a number of ways (e.g., by specifying the text that is not to be matched: <[^>]*>), modern regular expression tools allow a quantifier to be specified as
@@ -5250,7 +5115,7 @@
<div>
<div>
<h2 class="title" style="clear: both">
- <a name="id2495679">
+ <a name="id3006606">
</a>
15.One Liners
</h2>
@@ -5269,30 +5134,26 @@
<p id="ch9Using_Linux_Tools_1cd">
The one liner can be
</p>
- <span style="color: red">
- <block_quote>
- <div class="orderedlist">
- <ol class="orderedlist" type="1">
- <li class="listitem">
- <p id="ch9Using_Linux_Tools_1ce">
- An expression written in the language of the shell.
- </p>
- </li>
- <li class="listitem">
- <p id="ch9Using_Linux_Tools_1cf">
- The invocation of an interpreter together with program source for the interpreter to run.
- </p>
- </li>
- <li class="listitem">
- <p id="ch9Using_Linux_Tools_1d0">
- The invocation of a compiler together with source to compile and
+ <div class="orderedlist">
+ <ol class="orderedlist" type="1">
+ <li class="listitem">
+ <p id="ch9Using_Linux_Tools_1ce">
+ An expression written in the language of the shell.
+ </p>
+ </li>
+ <li class="listitem">
+ <p id="ch9Using_Linux_Tools_1cf">
+ The invocation of an interpreter together with program source for the interpreter to run.
+ </p>
+ </li>
+ <li class="listitem">
+ <p id="ch9Using_Linux_Tools_1d0">
+ The invocation of a compiler together with source to compile and
instructions for executing the compiled program.
- </p>
- </li>
- </ol>
- </div>
- </block_quote>
- </span>
+ </p>
+ </li>
+ </ol>
+ </div>
<p id="ch9Using_Linux_Tools_1d1">
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.
</p>
@@ -5326,38 +5187,34 @@
<p id="ch9Using_Linux_Tools_1d6">
Here are the first few of them:
</p>
- <span style="color: red">
- <block_quote>
- <div class="orderedlist">
- <ol class="orderedlist" type="1">
- <li class="listitem">
- <p id="ch9Using_Linux_Tools_1d7">
- Print the total number of input lines:
- </p>
- <p id="ch9Using_Linux_Tools_1d8">
- END { print NR }
- </p>
- </li>
- <li class="listitem">
- <p id="ch9Using_Linux_Tools_1d9">
- Print the tenth input line:
- </p>
- <p id="ch9Using_Linux_Tools_1da">
- NR == 10
- </p>
- </li>
- <li class="listitem">
- <p id="ch9Using_Linux_Tools_1db">
- Print the last field of every input line:
- </p>
- <p id="ch9Using_Linux_Tools_1dc">
- { print $NF }
- </p>
- </li>
- </ol>
- </div>
- </block_quote>
- </span>
+ <div class="orderedlist">
+ <ol class="orderedlist" type="1">
+ <li class="listitem">
+ <p id="ch9Using_Linux_Tools_1d7">
+ Print the total number of input lines:
+ </p>
+ <p id="ch9Using_Linux_Tools_1d8">
+ END { print NR }
+ </p>
+ </li>
+ <li class="listitem">
+ <p id="ch9Using_Linux_Tools_1d9">
+ Print the tenth input line:
+ </p>
+ <p id="ch9Using_Linux_Tools_1da">
+ NR == 10
+ </p>
+ </li>
+ <li class="listitem">
+ <p id="ch9Using_Linux_Tools_1db">
+ Print the last field of every input line:
+ </p>
+ <p id="ch9Using_Linux_Tools_1dc">
+ { print $NF }
+ </p>
+ </li>
+ </ol>
+ </div>
<p id="ch9Using_Linux_Tools_1dd">
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.
</p>