Introduction |
|
ix | |
Chapter 1 Getting Started with Unix and Linux |
|
1 | (30) |
|
|
3 | (5) |
|
Connecting to the Unix or Linux System |
|
|
8 | (3) |
|
|
11 | (2) |
|
Changing Your Password with passwd |
|
|
13 | (2) |
|
Listing Directories and Files with is |
|
|
15 | (2) |
|
Changing Directories with cd |
|
|
17 | (1) |
|
Finding Yourself with pwd |
|
|
18 | (1) |
|
|
19 | (2) |
|
|
21 | (2) |
|
|
23 | (1) |
|
Viewing File Contents with more |
|
|
24 | (1) |
|
Displaying File Contents with cat |
|
|
25 | (2) |
|
|
27 | (1) |
|
|
28 | (2) |
|
|
30 | (1) |
Chapter 2 Using Directories and Files |
|
31 | (22) |
|
Creating Directories with mkdir |
|
|
32 | (2) |
|
Creating Files with touch |
|
|
34 | (2) |
|
Copying Directories and Files with cp |
|
|
36 | (2) |
|
Listing Directories and Files with ls (More Goodies) |
|
|
38 | (3) |
|
|
41 | (1) |
|
|
42 | (2) |
|
Removing Directories with rmdir |
|
|
44 | (2) |
|
Finding Forgotten Files with find |
|
|
46 | (2) |
|
Locating Lost Files with locate |
|
|
48 | (1) |
|
Linking with ln (Hard Links) |
|
|
49 | (2) |
|
Linking with ln -s (Soft Links) |
|
|
51 | (2) |
Chapter 3 Working with Your Shell |
|
53 | (18) |
|
Discovering Which Shell You're Using |
|
|
54 | (1) |
|
Understanding Shells and Options |
|
|
55 | (2) |
|
Changing Your Shell with chsh |
|
|
57 | (2) |
|
Changing Your Shell Temporarily |
|
|
59 | (2) |
|
Using Completion in the bash Shell |
|
|
61 | (1) |
|
Viewing Session History in the bash Shell |
|
|
62 | (2) |
|
Using Completion in the zsh Shell |
|
|
64 | (1) |
|
Viewing Session History in the zsh Shell |
|
|
65 | (2) |
|
Changing Your Identity with su |
|
|
67 | (2) |
|
Fixing Terminal Settings with stty |
|
|
69 | (1) |
|
|
70 | (1) |
Chapter 4 Creating and Editing Files |
|
71 | (18) |
|
Choosing an Editor: nano/pico or vi/vim |
|
|
72 | (3) |
|
Starting nano and Dabbling with It |
|
|
75 | (1) |
|
|
76 | (1) |
|
Cutting and Pasting Text Blocks in nano |
|
|
77 | (1) |
|
Checking Spelling in nano |
|
|
78 | (1) |
|
|
79 | (1) |
|
|
80 | (1) |
|
Starting vi (or vim) and Dabbling with It |
|
|
81 | (2) |
|
|
83 | (1) |
|
Adding and Deleting Text in vi |
|
|
84 | (1) |
|
|
85 | (1) |
|
Searching and Replacing in vi |
|
|
86 | (2) |
|
|
88 | (1) |
Chapter 5 Controlling Ownership and Permissions |
|
89 | (18) |
|
Understanding File Ownership and Permissions |
|
|
90 | (1) |
|
Finding Out Who Owns What |
|
|
91 | (3) |
|
Finding Out Which Group You're In |
|
|
94 | (2) |
|
Changing the Group Association of Files and Directories with chgrp |
|
|
96 | (2) |
|
Changing Ownership of Files and Directories with Chown |
|
|
98 | (2) |
|
Changing Permissions with chmod |
|
|
100 | (3) |
|
Translating Mnemonic Permissions to Numeric Permissions |
|
|
103 | (2) |
|
Changing Permission Defaults with umask |
|
|
105 | (2) |
Chapter 6 Manipulating Files |
|
107 | (24) |
|
Counting Files and Their Contents with wc |
|
|
108 | (1) |
|
Viewing File Beginnings with head |
|
|
109 | (1) |
|
Viewing File Endings with tail |
|
|
110 | (1) |
|
|
111 | (1) |
|
Using Regular Expressions with grep |
|
|
112 | (2) |
|
Using Other Ex6mples of Regular Expressions |
|
|
114 | (1) |
|
Making Global Changes with sed |
|
|
115 | (1) |
|
Changing Files vtrith awk |
|
|
116 | (2) |
|
|
118 | (1) |
|
Finding Differences in Files with diff |
|
|
119 | (1) |
|
Finding Differences in Files with sdiff |
|
|
120 | (1) |
|
|
121 | (1) |
|
Eliminating Duplicates with uniq |
|
|
122 | (1) |
|
Redirecting to Multiple Locations with tee |
|
|
123 | (1) |
|
|
124 | (2) |
|
|
126 | (2) |
|
Splitting Files with split |
|
|
128 | (3) |
Chapter 7 Getting Information About the System |
|
131 | (14) |
|
Getting System Information with uname |
|
|
132 | (1) |
|
Viewing File Systems with df |
|
|
133 | (3) |
|
Determining Disk Usage with du |
|
|
136 | (1) |
|
Finding Out File Types with File |
|
|
137 | (1) |
|
Finding Out About Users with finger |
|
|
138 | (3) |
|
Learning Who Else Is Logged In with who |
|
|
141 | (1) |
|
Learning Who Else Is Logged In with w |
|
|
142 | (2) |
|
Getting Information About Your Userid with id |
|
|
144 | (1) |
Chapter 8 Configuring Your Unix or Linux Environment |
|
145 | (26) |
|
Understanding Your Unix or Linux Environment |
|
|
146 | (2) |
|
Discovering Your Current Environment |
|
|
148 | (2) |
|
Adding or Changing Variables |
|
|
150 | (2) |
|
Looking at Your zsh Configuration Files |
|
|
152 | (4) |
|
|
156 | (2) |
|
|
158 | (3) |
|
Looking at Your bash Configuration Files |
|
|
161 | (3) |
|
|
164 | (3) |
|
Changing Your bash Prompt |
|
|
167 | (2) |
|
Setting Aliases with alias |
|
|
169 | (2) |
Chapter 9 Running Scripts and Programs |
|
171 | (18) |
|
|
172 | (1) |
|
Scheduling Onetime Jobs with at |
|
|
173 | (3) |
|
Scheduling Regularly Occurring Jobs with cron |
|
|
176 | (2) |
|
|
178 | (1) |
|
Checking Job Status with jobs |
|
|
179 | (1) |
|
Running Jobs in the Background with bg |
|
|
180 | (1) |
|
Running Jobs in the Foreground with fg |
|
|
181 | (1) |
|
Controlling Job Priority with nice |
|
|
182 | (1) |
|
|
183 | (2) |
|
Finding Out What Processes Are Running with ps |
|
|
185 | (2) |
|
Deleting Processes with kill |
|
|
187 | (2) |
Chapter 10 Writing Basic Scripts |
|
189 | (20) |
|
|
191 | (2) |
|
|
193 | (1) |
|
Making a Script Executable |
|
|
194 | (2) |
|
Getting a Head Start on Scripts with history |
|
|
196 | (1) |
|
|
197 | (2) |
|
|
199 | (2) |
|
Creating If-Then Statements |
|
|
201 | (3) |
|
Accepting Command-Line Arguments in Your Scripts |
|
|
204 | (2) |
|
Accepting Input While a Script Is Running |
|
|
206 | (2) |
|
|
208 | (1) |
Chapter 11 Sending and Reading Email |
|
209 | (26) |
|
Choosing an Email Program and Getting Started |
|
|
210 | (2) |
|
Reading Email with alpine |
|
|
212 | (2) |
|
Sending Email with alpine |
|
|
214 | (2) |
|
|
216 | (2) |
|
|
218 | (2) |
|
|
220 | (2) |
|
|
222 | (1) |
|
|
223 | (2) |
|
Creating a Signature File |
|
|
225 | (2) |
|
Automatically Forwarding Incoming Messages |
|
|
227 | (1) |
|
Announcing an Absence with vacation |
|
|
228 | (2) |
|
|
230 | (2) |
|
Managing Email with procmail |
|
|
232 | (3) |
Chapter 12 Accessing the Internet |
|
235 | (24) |
|
Getting Familiar with Internet Lingo |
|
|
236 | (2) |
|
Logging In to Remote Systems with ssh |
|
|
238 | (1) |
|
Logging In to Remote Systems with telnet |
|
|
239 | (2) |
|
Communicating with Others Using write |
|
|
241 | (1) |
|
Communicating with Others Using talk |
|
|
242 | (1) |
|
Getting Files from the Internet with ftp |
|
|
243 | (4) |
|
Sharing Files on the Internet with ftp |
|
|
247 | (2) |
|
Surfing the Web with links |
|
|
249 | (2) |
|
Surfing the Web with lynx |
|
|
251 | (2) |
|
Downloading Websites with wget |
|
|
253 | (1) |
|
Checking Connections with ping |
|
|
254 | (1) |
|
Tracing Connections with traceroute |
|
|
255 | (2) |
|
Matching Domain Names with IP Addresses |
|
|
257 | (2) |
Chapter 13 Working with Encoded and Compressed Files |
|
259 | (16) |
|
Encoding Files with uunencode |
|
|
260 | (3) |
|
Decoding Files with uudecode |
|
|
263 | (1) |
|
|
264 | (2) |
|
Unarchiving Files with tar |
|
|
266 | (1) |
|
Compressing Files with compress |
|
|
267 | (1) |
|
Uncompressing Files with uncompress |
|
|
268 | (1) |
|
Zipping a File or Directory with stip |
|
|
269 | (1) |
|
Unzipping a gzip File with gunzib |
|
|
270 | (1) |
|
Zipping Files and Directories With zip |
|
|
271 | (1) |
|
Unzipping Zipped Files with unzip |
|
|
272 | (1) |
|
|
273 | (2) |
Chapter 14 Using Handy Utilities |
|
275 | (12) |
|
|
276 | (2) |
|
|
278 | (1) |
|
Evaluating Expressions with expr |
|
|
279 | (1) |
|
|
280 | (1) |
|
|
281 | (1) |
|
Keeping a Record of Your Session with script |
|
|
282 | (2) |
|
Getting Back to Your Place with screen |
|
|
284 | (2) |
|
Acting On Found Files with xargs |
|
|
286 | (1) |
Chapter 15 Being Root |
|
287 | (16) |
|
Acting Like root with sudo |
|
|
288 | (3) |
|
|
291 | (1) |
|
Starting, Stopping, and Restarting Daemons |
|
|
292 | (2) |
|
Changing the System Configuration |
|
|
294 | (2) |
|
|
296 | (3) |
|
|
299 | (1) |
|
Checking Boot Messages with dmesg |
|
|
300 | (2) |
|
Setting the Date and Time |
|
|
302 | (1) |
Chapter 16 Sensational Unix Tricks |
|
303 | (20) |
|
Cleaning Up HTML Documents with tidy |
|
|
304 | (3) |
|
Searching and Replacing Throughout Multiple Documents with sed |
|
|
307 | (3) |
|
Generating Reports with awk |
|
|
310 | (1) |
|
Using Input to Customize Your Environment |
|
|
311 | (2) |
|
Using ROT13-Encoding with sed |
|
|
313 | (2) |
|
Embedding ROT13 Encoding in a Shell Script |
|
|
315 | (3) |
|
Making Backups with rsynt |
|
|
318 | (2) |
|
Using Advanced Redirection with stderr |
|
|
320 | (3) |
Appendix A Unix and Linux Reference |
|
323 | (16) |
Appendix B What's What and What's Where |
|
339 | (4) |
Appendix C Commands, Flags, and Arguments |
|
343 | (41) |
Index |
|
384 | |