About the Author |
|
xix | |
About the Technical Reviewer |
|
xxi | |
Acknowledgments |
|
xxiii | |
|
|
1 | (22) |
|
Chapter 1 Introduction to the Linux Philosophy |
|
|
3 | (12) |
|
|
5 | (2) |
|
The Structure of the Philosophy |
|
|
7 | (2) |
|
Who Should Read This Book |
|
|
9 | (2) |
|
But I Don't Meet Those Requirements |
|
|
10 | (1) |
|
Who Should Not Read This Book |
|
|
11 | (1) |
|
|
11 | (1) |
|
Restrictive Operating Systems |
|
|
12 | (1) |
|
|
12 | (1) |
|
|
13 | (1) |
|
|
14 | (1) |
|
|
15 | (8) |
|
|
15 | (2) |
|
|
17 | (4) |
|
How to Access the Command Line |
|
|
18 | (1) |
|
|
19 | (1) |
|
Preparing the USB Thumb Drive |
|
|
19 | (2) |
|
What to Do if the Experiments Do Not Work |
|
|
21 | (2) |
|
|
23 | (84) |
|
|
27 | (16) |
|
Text Streams -- A Universal Interface |
|
|
27 | (1) |
|
|
28 | (1) |
|
|
29 | (2) |
|
|
31 | (2) |
|
|
33 | (6) |
|
|
39 | (2) |
|
|
41 | (2) |
|
Chapter 4 Transforming Data Streams |
|
|
43 | (16) |
|
Data Streams as Raw Materials |
|
|
44 | (1) |
|
|
44 | (2) |
|
|
46 | (1) |
|
|
47 | (5) |
|
|
50 | (2) |
|
|
52 | (6) |
|
|
52 | (2) |
|
|
54 | (3) |
|
Thoughts on the Solutions |
|
|
57 | (1) |
|
|
58 | (1) |
|
Chapter 5 Everything Is a File |
|
|
59 | (22) |
|
|
59 | (1) |
|
|
60 | (1) |
|
|
60 | (1) |
|
|
61 | (2) |
|
|
62 | (1) |
|
|
63 | (1) |
|
Device File Classification |
|
|
64 | (2) |
|
|
66 | (5) |
|
Randomness, Zero, and More |
|
|
71 | (3) |
|
Back Up the Master Boot Record |
|
|
74 | (5) |
|
Implications of Everything Is a File |
|
|
79 | (1) |
|
|
79 | (2) |
|
Chapter 6 Using the Linux FHS |
|
|
81 | (26) |
|
|
81 | (1) |
|
|
82 | (3) |
|
Using a Well-Defined filesystem Structure |
|
|
85 | (1) |
|
Linux Unified Directory Structure |
|
|
86 | (1) |
|
|
87 | (14) |
|
|
88 | (6) |
|
|
94 | (5) |
|
|
99 | (2) |
|
|
101 | (4) |
|
Using the filesystem Incorrectly |
|
|
102 | (1) |
|
|
103 | (1) |
|
|
103 | (1) |
|
|
104 | (1) |
|
|
105 | (2) |
|
|
107 | (218) |
|
Chapter 7 Embrace the CLI |
|
|
109 | (22) |
|
Defining the Command Line |
|
|
110 | (1) |
|
|
110 | (14) |
|
|
110 | (1) |
|
|
111 | (1) |
|
|
111 | (1) |
|
|
111 | (2) |
|
|
113 | (1) |
|
|
114 | (1) |
|
|
115 | (2) |
|
|
117 | (1) |
|
|
117 | (1) |
|
|
118 | (3) |
|
|
121 | (1) |
|
|
121 | (3) |
|
|
124 | (1) |
|
Non-Restrictive Interface |
|
|
125 | (5) |
|
|
125 | (3) |
|
Baffle Them with Big Data |
|
|
128 | (2) |
|
|
130 | (1) |
|
Chapter 8 Be a Lazy SysAdmin |
|
|
131 | (34) |
|
|
131 | (1) |
|
|
132 | (1) |
|
|
133 | (1) |
|
|
134 | (2) |
|
|
134 | (2) |
|
|
136 | (1) |
|
|
136 | (1) |
|
|
136 | (10) |
|
|
136 | (3) |
|
Command-Line Recall and Editing |
|
|
139 | (1) |
|
|
139 | (1) |
|
|
140 | (6) |
|
|
146 | (10) |
|
|
146 | (3) |
|
|
149 | (1) |
|
|
150 | (1) |
|
|
151 | (1) |
|
|
152 | (3) |
|
|
155 | (1) |
|
|
156 | (4) |
|
|
160 | (3) |
|
Success as a Lazy SysAdmin |
|
|
163 | (2) |
|
Chapter 9 Automate Everything |
|
|
165 | (30) |
|
|
165 | (1) |
|
|
166 | (1) |
|
Scripting Repetitive Tasks |
|
|
167 | (2) |
|
|
167 | (1) |
|
From Desirable to Necessity |
|
|
168 | (1) |
|
|
169 | (12) |
|
Additional Levels of Automation |
|
|
181 | (2) |
|
Using cron for Timely Automation |
|
|
183 | (8) |
|
|
183 | (3) |
|
|
186 | (2) |
|
|
188 | (2) |
|
|
190 | (1) |
|
|
190 | (1) |
|
|
191 | (1) |
|
Other Automation Possibilities |
|
|
191 | (1) |
|
|
192 | (1) |
|
|
192 | (3) |
|
Chapter 10 Always Use Shell Scripts |
|
|
195 | (22) |
|
|
195 | (2) |
|
|
197 | (4) |
|
|
197 | (1) |
|
|
198 | (1) |
|
|
199 | (1) |
|
|
200 | (1) |
|
|
200 | (1) |
|
|
201 | (1) |
|
Shell Scripts as Prototypes |
|
|
201 | (1) |
|
|
202 | (13) |
|
|
202 | (1) |
|
|
203 | (12) |
|
|
215 | (2) |
|
Chapter 11 Test Early, Test Often |
|
|
217 | (30) |
|
|
218 | (4) |
|
|
218 | (2) |
|
Start Testing at the Beginning |
|
|
220 | (1) |
|
|
220 | (1) |
|
|
221 | (1) |
|
|
222 | (1) |
|
|
223 | (1) |
|
|
224 | (21) |
|
Requirements for MOTD Script |
|
|
225 | (1) |
|
Test Plan for MOTD Script |
|
|
226 | (1) |
|
|
227 | (4) |
|
|
231 | (14) |
|
|
245 | (1) |
|
|
246 | (1) |
|
Chapter 12 Use Commonsense Naming |
|
|
247 | (10) |
|
|
247 | (3) |
|
|
250 | (5) |
|
|
250 | (1) |
|
Make Everything a Variable |
|
|
251 | (4) |
|
|
255 | (1) |
|
|
255 | (1) |
|
|
256 | (1) |
|
|
256 | (1) |
|
Chapter 13 Store Data in Open Formats |
|
|
257 | (16) |
|
|
257 | (1) |
|
|
258 | (1) |
|
|
259 | (13) |
|
System Configuration Files |
|
|
260 | (5) |
|
Global Bash Configuration |
|
|
265 | (3) |
|
|
268 | (2) |
|
|
270 | (2) |
|
|
272 | (1) |
|
Chapter 14 Use Separate filesystems for Data |
|
|
273 | (20) |
|
Why We Need Separate filesystems |
|
|
273 | (2) |
|
|
274 | (1) |
|
|
274 | (1) |
|
|
275 | (3) |
|
|
278 | (1) |
|
|
279 | (6) |
|
|
280 | (1) |
|
|
281 | (1) |
|
|
282 | (1) |
|
|
283 | (1) |
|
|
283 | (1) |
|
|
284 | (1) |
|
|
284 | (1) |
|
Starting with Separate filesystems |
|
|
285 | (1) |
|
Adding Separate filesystems Later |
|
|
285 | (7) |
|
|
292 | (1) |
|
Chapter 15 Make Programs Portable |
|
|
293 | (18) |
|
|
293 | (1) |
|
|
294 | (1) |
|
|
295 | (2) |
|
|
295 | (1) |
|
|
295 | (2) |
|
|
297 | (1) |
|
|
297 | (3) |
|
|
298 | (2) |
|
The Internet and Portability |
|
|
300 | (1) |
|
|
300 | (9) |
|
|
301 | (1) |
|
Dynamic Web Pages for a New Job |
|
|
302 | (5) |
|
|
307 | (1) |
|
|
308 | (1) |
|
|
309 | (2) |
|
Chapter 16 Use Open Source Software |
|
|
311 | (14) |
|
Definition of Open Source |
|
|
311 | (1) |
|
The Open Source Definition (Annotated) |
|
|
312 | (3) |
|
|
312 | (3) |
|
|
315 | (1) |
|
|
316 | (1) |
|
|
316 | (2) |
|
Organizational Code Sharing |
|
|
318 | (3) |
|
|
318 | (1) |
|
Open Organizations and Code Sharing |
|
|
319 | (1) |
|
|
320 | (1) |
|
|
321 | (3) |
|
|
321 | (1) |
|
Code Sharing Considerations |
|
|
322 | (2) |
|
|
324 | (1) |
|
|
325 | (168) |
|
Chapter 17 Strive for Elegance |
|
|
327 | (26) |
|
|
327 | (4) |
|
|
328 | (1) |
|
|
328 | (1) |
|
|
329 | (1) |
|
|
329 | (1) |
|
|
330 | (1) |
|
|
331 | (5) |
|
|
336 | (2) |
|
|
338 | (12) |
|
|
338 | (4) |
|
|
342 | (1) |
|
|
343 | (7) |
|
|
350 | (3) |
|
Chapter 18 Find the Simplicity |
|
|
353 | (18) |
|
|
353 | (2) |
|
|
355 | (1) |
|
The Never-Ending Process of Simplification |
|
|
356 | (1) |
|
Simple Programs Do One Thing |
|
|
356 | (3) |
|
Simple Programs Are Small |
|
|
359 | (2) |
|
Simplicity and the Philosophy |
|
|
361 | (1) |
|
Simplifying My Own Programs |
|
|
361 | (1) |
|
Simplifying Others' Programs |
|
|
362 | (5) |
|
|
362 | (5) |
|
|
367 | (1) |
|
|
368 | (1) |
|
|
369 | (1) |
|
|
370 | (1) |
|
Chapter 19 Use Your Favorite Editor |
|
|
371 | (10) |
|
|
372 | (1) |
|
|
372 | (2) |
|
|
373 | (1) |
|
|
373 | (1) |
|
|
374 | (1) |
|
|
374 | (1) |
|
|
375 | (4) |
|
|
376 | (2) |
|
|
378 | (1) |
|
|
379 | (2) |
|
Chapter 20 Document Everything |
|
|
381 | (14) |
|
|
382 | (1) |
|
My Documentation Philosophy |
|
|
383 | (5) |
|
|
383 | (1) |
|
|
384 | (3) |
|
My Code Documentation Process |
|
|
387 | (1) |
|
|
388 | (1) |
|
|
388 | (4) |
|
System Documentation Template |
|
|
389 | (3) |
|
|
392 | (1) |
|
|
393 | (1) |
|
|
393 | (1) |
|
|
394 | (1) |
|
Chapter 21 Back Up Everything - Frequently |
|
|
395 | (22) |
|
|
395 | (2) |
|
|
397 | (8) |
|
|
397 | (7) |
|
|
404 | (1) |
|
|
405 | (9) |
|
|
405 | (8) |
|
|
413 | (1) |
|
Disaster Recovery Services |
|
|
414 | (1) |
|
|
415 | (1) |
|
What About the "Frequently" Part? |
|
|
415 | (1) |
|
|
415 | (2) |
|
Chapter 22 Follow Your Curiosity |
|
|
417 | (28) |
|
|
417 | (1) |
|
Curiosity Led Me to Linux |
|
|
418 | (5) |
|
Curiosity Solves Problems |
|
|
423 | (17) |
|
|
423 | (17) |
|
Follow Your Own Curiosity |
|
|
440 | (3) |
|
|
441 | (1) |
|
|
441 | (1) |
|
|
442 | (1) |
|
|
443 | (2) |
|
Chapter 23 There Is No Should |
|
|
445 | (18) |
|
There Are Always Possibilities |
|
|
445 | (1) |
|
|
446 | (1) |
|
|
447 | (8) |
|
|
449 | (1) |
|
Reasoning to Solve Problems |
|
|
450 | (3) |
|
|
453 | (2) |
|
|
455 | (1) |
|
|
455 | (1) |
|
The Implications of Diversity |
|
|
456 | (1) |
|
|
457 | (1) |
|
|
458 | (1) |
|
|
458 | (4) |
|
|
460 | (1) |
|
|
461 | (1) |
|
|
462 | (1) |
|
Chapter 24 Mentor the Young SysAdmins |
|
|
463 | (14) |
|
|
464 | (1) |
|
|
465 | (2) |
|
|
466 | (1) |
|
The Art of Problem Solving |
|
|
467 | (7) |
|
The Five Steps of Problem Solving |
|
|
467 | (2) |
|
|
469 | (1) |
|
|
469 | (3) |
|
|
472 | (1) |
|
|
473 | (1) |
|
|
473 | (1) |
|
|
474 | (1) |
|
|
475 | (1) |
|
|
475 | (2) |
|
Chapter 25 Support Your Favorite Open Source Project |
|
|
477 | (8) |
|
|
477 | (1) |
|
|
478 | (1) |
|
|
479 | (1) |
|
|
479 | (1) |
|
|
480 | (1) |
|
|
481 | (1) |
|
|
482 | (1) |
|
|
482 | (1) |
|
|
483 | (1) |
|
|
484 | (1) |
|
|
485 | (8) |
|
|
485 | (1) |
|
|
486 | (1) |
|
|
487 | (1) |
|
|
488 | (1) |
|
|
489 | (1) |
|
|
490 | (1) |
|
|
490 | (1) |
|
|
491 | (1) |
|
|
492 | (1) |
|
|
493 | |
|
|
493 | (1) |
|
|
494 | (7) |
Index |
|
501 | |