Preface to the Third Edition, |
|
xxvii | |
Acknowledgments for the Third Edition |
|
xxxiii | |
Acknowledgments for the Second and First Editions |
|
xxxv | |
Personal Acknowledgments |
|
xxxvii | |
Chapter 1 Overview Of Operating Systems |
|
1 | (18) |
|
|
1 | (1) |
|
1.2 What Is An Operating System? |
|
|
2 | (2) |
|
1.3 Operating System Services |
|
|
4 | (1) |
|
1.4 Character (Command Line) Versus Graphical User Interfaces |
|
|
5 | (1) |
|
1.5 Types Of Operating Systems |
|
|
5 | (1) |
|
|
6 | (1) |
|
1.7 UNIX Software Architecture |
|
|
7 | (3) |
|
1.7.1 Device Driver Layer |
|
|
7 | (1) |
|
|
7 | (2) |
|
1.7.3 System Call Interface |
|
|
9 | (1) |
|
|
9 | (1) |
|
|
9 | (1) |
|
|
9 | (1) |
|
1.8 Development Of The UNIX Operating System |
|
|
10 | (4) |
|
|
10 | (2) |
|
1.8.2 Research Operating System |
|
|
12 | (1) |
|
|
13 | (1) |
|
1.8.4 Berkeley Software Distributions |
|
|
13 | (1) |
|
|
13 | (1) |
|
1.8.6 Current And Future Developments |
|
|
13 | (1) |
|
1.9 Variations In UNIX Systems |
|
|
14 | (1) |
|
|
15 | (1) |
|
|
16 | (3) |
Chapter 2 A "Quick Start" Into The UNIX Operating System |
|
19 | (46) |
|
|
19 | (1) |
|
2.2 The Structure Of A UNIX Command |
|
|
20 | (2) |
|
2.3 Logging On And Logging Off |
|
|
22 | (7) |
|
2.3.1 Stand-Alone Login Connection To PC-BSD And Solaris |
|
|
24 | (1) |
|
2.3.2 Connecting Via PuTTY From A Microsoft Windows Computer |
|
|
25 | (2) |
|
2.3.3 Connecting Via An SSH Client Between UNIX Machines |
|
|
27 | (2) |
|
2.4 File Maintenance Commands And Help On UNIX Command Usage |
|
|
29 | (16) |
|
2.4.1 File And Directory Structure |
|
|
30 | (1) |
|
2.4.2 Viewing The Contents Of Files |
|
|
31 | (1) |
|
2.4.3 Creating, Deleting, And Managing Files |
|
|
32 | (4) |
|
2.4.4 Creating, Deleting, And Managing Directories |
|
|
36 | (4) |
|
2.4.5 Obtaining Help With The Man Command |
|
|
40 | (3) |
|
2.4.6 Other Methods Of Obtaining Help |
|
|
43 | (2) |
|
|
45 | (4) |
|
2.5.1 Examining System Setups |
|
|
45 | (1) |
|
2.5.2 Printing And General Utility Commands |
|
|
46 | (2) |
|
2.5.3 Communications Commands |
|
|
48 | (1) |
|
|
49 | (3) |
|
2.7 Introduction To UNIX Shells |
|
|
52 | (2) |
|
|
54 | (5) |
|
|
54 | (2) |
|
2.8.2 Which Shell Suits Your Needs? |
|
|
56 | (1) |
|
2.8.3 Ways To Change Your Shell |
|
|
56 | (1) |
|
2.8.4 Shell Start-Up Files And Environment Variables |
|
|
57 | (2) |
|
|
59 | (1) |
|
2.10 The Sudo And Su Commands |
|
|
60 | (1) |
|
|
61 | (1) |
|
|
62 | (3) |
Chapter 3 Editing Text Files |
|
65 | (88) |
|
3.1 Introduction And Quick Start |
|
|
65 | (3) |
|
3.1.1 Quick Start: The Simplest Path Through These Editors |
|
|
65 | (1) |
|
3.1.2 First Comments On UNIX Editors |
|
|
66 | (1) |
|
|
67 | (1) |
|
3.2 Using The vi, vim, And gvim Editors |
|
|
68 | (28) |
|
3.2.1 Basic Shell Script File Creation, Editing, Execution |
|
|
69 | (1) |
|
3.2.2 How To Start, Save A File, And Exit |
|
|
70 | (2) |
|
3.2.3 The Format Of A vi Command And The Modes Of Operation |
|
|
72 | (3) |
|
3.2.4 Cursor Movement And Editing Commands |
|
|
75 | (2) |
|
3.2.5 Yank And Put (Copy And Paste) And Substitute (Search And Replace) |
|
|
77 | (3) |
|
|
80 | (8) |
|
3.2.7 Changing vi, vim, And gvim Behavior |
|
|
88 | (3) |
|
3.2.8 Executing Shell Commands From Within vi, vim, And gvim |
|
|
91 | (1) |
|
3.2.9 vi, vim, And gvim Keyboard Macros |
|
|
91 | (5) |
|
|
96 | (45) |
|
3.3.1 Launching Emacs, Emacs Screen Display, General Emacs Concepts And Features |
|
|
97 | (6) |
|
3.3.2 How To Use Emacs To Do Shell Script File Creation, Editing, And Execution |
|
|
103 | (1) |
|
3.3.3 Visiting Files, Saving Files, And Exiting |
|
|
104 | (1) |
|
3.3.4 Cursor Movement And Editing Commands |
|
|
105 | (3) |
|
|
108 | (1) |
|
3.3.6 Cut Or Copy And Paste And Search And Replace |
|
|
109 | (3) |
|
3.3.7 How To Do Purely Graphical Editing With GNU Emacs |
|
|
112 | (1) |
|
|
112 | (2) |
|
3.3.9 How To Start, Save A File, And Exit In Graphical Emacs |
|
|
114 | (2) |
|
3.3.10 Emacs Graphical Menus |
|
|
116 | (1) |
|
3.3.11 Creating And Editing C Programs |
|
|
116 | (3) |
|
3.3.12 Working In Multiple Buffers |
|
|
119 | (3) |
|
3.3.13 Changing Emacs Behavior |
|
|
122 | (19) |
|
3.4 vi And Emacs Command Tables |
|
|
141 | (1) |
|
|
141 | (5) |
|
|
146 | (7) |
Chapter 4 Files And File System Structure |
|
153 | (30) |
|
|
153 | (1) |
|
4.2 The UNIX File Concept |
|
|
154 | (1) |
|
|
154 | (3) |
|
4.3.1 Simple/ordinary File |
|
|
154 | (1) |
|
|
155 | (1) |
|
|
156 | (1) |
|
4.3.4 Special (Device) File |
|
|
156 | (1) |
|
|
156 | (1) |
|
|
157 | (1) |
|
4.4 File System Structure |
|
|
157 | (6) |
|
4.4.1 File System Organization |
|
|
157 | (1) |
|
4.4.2 Home And Present Working Directories |
|
|
158 | (1) |
|
4.4.3 Pathnames: Absolute And Relative |
|
|
158 | (2) |
|
4.4.4 Some Standard Directories And Files |
|
|
160 | (3) |
|
4.5 Navigating The File Structure |
|
|
163 | (13) |
|
4.5.1 Determining The Absolute Pathname For Your Home Directory |
|
|
163 | (1) |
|
4.5.2 Browsing The File System |
|
|
164 | (3) |
|
|
167 | (1) |
|
4.5.4 Creating And Removing Directories |
|
|
167 | (2) |
|
4.5.5 Determining File Attributes |
|
|
169 | (2) |
|
4.5.6 Determining The Type Of A File's Contents |
|
|
171 | (5) |
|
4.6 Standard Files And File Descriptors |
|
|
176 | (1) |
|
4.7 End-Of-File (eof) Marker |
|
|
177 | (1) |
|
|
178 | (1) |
|
|
178 | (1) |
|
|
179 | (4) |
Chapter 5 File Security |
|
183 | (26) |
|
|
183 | (1) |
|
5.2 Password-Based Protection |
|
|
184 | (1) |
|
5.3 Encryption-Based Protection |
|
|
185 | (1) |
|
5.4 Protection Based On Access Permission |
|
|
186 | (3) |
|
|
186 | (1) |
|
5.4.2 Types Of File Operations/Access Permissions |
|
|
187 | (2) |
|
5.4.3 Access Permissions For Directories |
|
|
189 | (1) |
|
5.5 Determining And Changing File Access Privileges |
|
|
189 | (9) |
|
5.5.1 Determining File Access Privileges |
|
|
189 | (2) |
|
5.5.2 Changing File Access Privileges |
|
|
191 | (3) |
|
5.5.3 Access Privileges For Directories |
|
|
194 | (1) |
|
5.5.4 Default File Access Privileges |
|
|
195 | (3) |
|
|
198 | (6) |
|
5.6.1 Set-User-ID (SUID) Bit |
|
|
199 | (2) |
|
5.6.2 Set-Group-ID (SGID) Bit |
|
|
201 | (1) |
|
|
202 | (2) |
|
|
204 | (1) |
|
|
205 | (4) |
Chapter 6 Basic File Processing |
|
209 | (38) |
|
|
209 | (1) |
|
6.2 Viewing Contents Of Text Files |
|
|
209 | (10) |
|
6.2.1 Viewing Complete Files |
|
|
210 | (2) |
|
6.2.2 Viewing Files One Page At A Time |
|
|
212 | (1) |
|
6.2.3 Viewing The Head Or Tail Of A File |
|
|
213 | (6) |
|
6.3 Copying, Moving, And Removing Files |
|
|
219 | (9) |
|
|
219 | (2) |
|
|
221 | (3) |
|
6.3.3 Removing/deleting Files |
|
|
224 | (2) |
|
6.3.4 Determining File Size |
|
|
226 | (2) |
|
|
228 | (1) |
|
|
229 | (2) |
|
|
231 | (3) |
|
6.7 Locating And Removing Repetition Within Text Files |
|
|
234 | (2) |
|
6.8 Printing Files And Controlling Print Jobs |
|
|
236 | (6) |
|
6.8.1 UNIX Mechanism For Printing Files |
|
|
236 | (1) |
|
|
236 | (3) |
|
6.8.3 Finding The Status Of Your Print Requests |
|
|
239 | (1) |
|
6.8.4 Canceling Your Print Jobs |
|
|
240 | (2) |
|
|
242 | (1) |
|
|
243 | (4) |
Chapter 7 Advanced File Processing |
|
247 | (38) |
|
|
247 | (1) |
|
|
248 | (7) |
|
7.2.1 The Compress Command |
|
|
248 | (2) |
|
7.2.2 The Uncompress Command |
|
|
250 | (1) |
|
|
250 | (1) |
|
|
251 | (1) |
|
|
252 | (1) |
|
7.2.6 The zcat And zmore Commands |
|
|
253 | (2) |
|
|
255 | (3) |
|
7.4 Searching For Commands And Files |
|
|
258 | (4) |
|
|
262 | (2) |
|
|
264 | (5) |
|
|
269 | (4) |
|
7.8 Encoding And Decoding |
|
|
273 | (3) |
|
7.9 File Encryption And Decryption |
|
|
276 | (4) |
|
|
280 | (1) |
|
|
281 | (4) |
Chapter 8 File Sharing |
|
285 | (20) |
|
|
285 | (1) |
|
8.2 Duplicate Shared Files |
|
|
286 | (1) |
|
8.3 Common Logins For Team Members |
|
|
286 | (1) |
|
8.4 Setting Appropriate Access Permissions On Shared Files |
|
|
286 | (1) |
|
8.5 Common Groups For Team Members |
|
|
287 | (1) |
|
8.6 File Sharing Via Links |
|
|
287 | (14) |
|
|
287 | (7) |
|
8.6.2 Drawbacks Of Hard Links |
|
|
294 | (2) |
|
8.6.3 Soft/Symbolic Links |
|
|
296 | (4) |
|
8.6.4 Pros And Cons Of Symbolic Links |
|
|
300 | (1) |
|
|
301 | (1) |
|
|
302 | (3) |
Chapter 9 Redirection And Piping |
|
305 | (32) |
|
|
305 | (1) |
|
|
306 | (1) |
|
|
306 | (2) |
|
|
308 | (2) |
|
9.5 Combining Input And Output Redirection |
|
|
310 | (1) |
|
9.6 I/O Redirection With File Descriptors |
|
|
311 | (1) |
|
9.7 Redirecting Standard Error |
|
|
311 | (2) |
|
9.8 Redirecting stdout And stderr In One Command |
|
|
313 | (1) |
|
9.9 Redirecting stdin, stdout, And STDERR In One Command |
|
|
314 | (2) |
|
9.10 Redirecting Without Overwriting File Contents (Appending) |
|
|
316 | (2) |
|
|
318 | (3) |
|
9.12 Redirection And Piping Combined |
|
|
321 | (1) |
|
9.13 Output And Error Redirection In The C Shell |
|
|
322 | (4) |
|
9.14 Recap Of I/O And Error Redirection |
|
|
326 | (1) |
|
|
326 | (5) |
|
|
331 | (1) |
|
|
332 | (5) |
Chapter 10 Processes |
|
337 | (54) |
|
|
337 | (1) |
|
10.2 CPU Scheduling: Running Multiple Processes Simultaneously |
|
|
338 | (2) |
|
|
340 | (1) |
|
10.4 Execution Of Shell Commands |
|
|
340 | (5) |
|
|
345 | (21) |
|
10.5.1 Static Display Of Process Attributes |
|
|
345 | (12) |
|
10.5.2 Dynamic Display Of Process Attributes |
|
|
357 | (9) |
|
10.6 Process And Job Control |
|
|
366 | (16) |
|
10.6.1 Foreground And Background Processes And Related Commands |
|
|
366 | (5) |
|
|
371 | (1) |
|
10.6.3 Sequential And Parallel Execution Of Commands |
|
|
371 | (5) |
|
10.6.4 Abnormal Termination Of Commands And Processes |
|
|
376 | (6) |
|
10.7 Process Hierarchy In UNIX |
|
|
382 | (4) |
|
|
386 | (2) |
|
|
388 | (3) |
Chapter 11 Networking And Internetworking |
|
391 | (60) |
|
|
391 | (1) |
|
11.2 Computer Networks And Internetworks |
|
|
392 | (1) |
|
11.3 Reasons For Computer Networks And Internetworks |
|
|
393 | (1) |
|
|
393 | (2) |
|
|
395 | (13) |
|
|
395 | (2) |
|
11.5.2 Routing Of Application Data: The Internet Protocol (IP) |
|
|
397 | (4) |
|
|
401 | (1) |
|
11.5.4 Translating Names To IP Addresses: The Domain Name System |
|
|
401 | (5) |
|
11.5.5 Requests For Comments (RFCs) |
|
|
406 | (2) |
|
11.6 Internet Services And Protocols |
|
|
408 | (1) |
|
11.7 The Client-Server Software Model |
|
|
408 | (1) |
|
11.8 Application Software |
|
|
409 | (36) |
|
11.8.1 Displaying The Host Name |
|
|
410 | (1) |
|
11.8.2 Displaying A List Of Users Using Hosts On A Network |
|
|
411 | (1) |
|
11.8.3 Displaying The Status Of Hosts On A Network |
|
|
412 | (1) |
|
11.8.4 Testing A Network Connection |
|
|
413 | (2) |
|
11.8.5 Displaying Information About Users |
|
|
415 | (3) |
|
|
418 | (6) |
|
11.8.7 Remote Command Execution |
|
|
424 | (3) |
|
|
427 | (3) |
|
|
430 | (2) |
|
11.8.10 Secure Shell And Related Commands |
|
|
432 | (9) |
|
|
441 | (2) |
|
11.8.12 Tracing The Route From One Site To Another |
|
|
443 | (2) |
|
11.9 Important Internet Organizations |
|
|
445 | (1) |
|
|
445 | (1) |
|
|
445 | (3) |
|
|
448 | (3) |
Chapter 12 Introductory Bourne Shell Programming |
|
451 | (46) |
|
|
451 | (1) |
|
12.2 Running A Bourne Shell Script |
|
|
452 | (1) |
|
12.3 Shell Variables And Related Commands |
|
|
453 | (14) |
|
12.3.1 Reading And Writing Shell Variables |
|
|
457 | (2) |
|
12.3.2 Command Substitution |
|
|
459 | (1) |
|
12.3.3 Exporting Environment |
|
|
460 | (3) |
|
12.3.4 Resetting Variables |
|
|
463 | (1) |
|
12.3.5 Creating Read-Only Defined Variables |
|
|
464 | (1) |
|
12.3.6 Reading From Standard Input |
|
|
465 | (2) |
|
12.4 Passing Arguments To Shell Scripts |
|
|
467 | (3) |
|
12.5 Comments And Program Headers |
|
|
470 | (2) |
|
12.6 Program Control Flow Commands |
|
|
472 | (19) |
|
12.6.1 The if-then-elif-else-fi Statement |
|
|
472 | (8) |
|
|
480 | (3) |
|
12.6.3 The while Statement |
|
|
483 | (2) |
|
12.6.4 The until Statement |
|
|
485 | (1) |
|
12.6.5 The break And continue Commands |
|
|
486 | (1) |
|
12.6.6 The case Statement |
|
|
487 | (4) |
|
|
491 | (1) |
|
|
492 | (1) |
|
|
493 | (4) |
Chapter 13 Advanced Bourne Shell Programming |
|
497 | (32) |
|
|
497 | (1) |
|
13.2 Numeric Data Processing |
|
|
497 | (6) |
|
|
503 | (3) |
|
13.4 Interrupt (Signal) Processing |
|
|
506 | (5) |
|
13.5 The Exec Command And File I/O |
|
|
511 | (9) |
|
13.5.1 Execution Of A Command (Or Script) In Place Of Its Parent Process |
|
|
511 | (2) |
|
13.5.2 File I/O Via The Exec Command |
|
|
513 | (7) |
|
13.6 Functions In The Bourne Shell |
|
|
520 | (5) |
|
13.6.1 Reasons For Using Functions |
|
|
520 | (1) |
|
13.6.2 Function Definition |
|
|
521 | (1) |
|
13.6.3 Function Invocation/call |
|
|
522 | (1) |
|
13.6.4 A Few More Examples Of Functions |
|
|
523 | (2) |
|
13.7 Debugging Shell Programs |
|
|
525 | (1) |
|
|
526 | (1) |
|
|
527 | (2) |
Chapter 14 Introductory C Shell Programming |
|
529 | (38) |
|
|
529 | (1) |
|
14.2 Running A C Shell Script |
|
|
530 | (1) |
|
14.3 Shell Variables And Related Commands |
|
|
531 | (3) |
|
14.4 Reading And Writing Shell Variables |
|
|
534 | (8) |
|
14.4.1 Command Substitution |
|
|
536 | (1) |
|
14.4.2 Exporting Environment |
|
|
537 | (3) |
|
14.4.3 Resetting Variables |
|
|
540 | (1) |
|
14.4.4 Reading From Standard Input |
|
|
541 | (1) |
|
14.5 Passing Arguments To Shell Scripts |
|
|
542 | (4) |
|
14.6 Comments And Program Headers |
|
|
546 | (1) |
|
14.7 Program Control Flow Commands |
|
|
547 | (16) |
|
14.7.1 The if-then-else-endif Statement |
|
|
547 | (8) |
|
14.7.2 The foreach Statement |
|
|
555 | (2) |
|
14.7.3 The while Statement |
|
|
557 | (2) |
|
14.7.4 The break, Continue, And goto Commands |
|
|
559 | (1) |
|
14.7.5 The switch Statement |
|
|
560 | (3) |
|
|
563 | (1) |
|
|
564 | (3) |
Chapter 15 Advanced C Shell Programming |
|
567 | (20) |
|
|
567 | (1) |
|
15.2 Numeric Data Processing |
|
|
567 | (3) |
|
|
570 | (6) |
|
|
576 | (2) |
|
15.5 Interrupt (Signal) Processing |
|
|
578 | (5) |
|
15.6 Debugging Shell Programs |
|
|
583 | (2) |
|
|
585 | (1) |
|
|
585 | (2) |
Chapter 16 Python |
|
587 | (96) |
|
|
587 | (8) |
|
16.1.1 Python Program Data Model |
|
|
588 | (1) |
|
16.1.2 The Ultimate Python Reference |
|
|
589 | (1) |
|
16.1.3 Ultimate Reference Glossary |
|
|
589 | (1) |
|
16.1.4 Python Standard Type Hierarchy |
|
|
590 | (2) |
|
16.1.5 Basic Assumptions We Make |
|
|
592 | (1) |
|
|
593 | (2) |
|
|
595 | (1) |
|
16.2 How To Install Python On A PC-BSD And Solaris System |
|
|
595 | (2) |
|
16.2.1 Installing Python On PC-BSD |
|
|
596 | (1) |
|
16.2.2 Installing Python On Solaris |
|
|
596 | (1) |
|
16.3 Basic Setup And Syntax, And Getting Help |
|
|
597 | (33) |
|
16.3.1 Printing Text, Comments, Numbers, Grouping Operators, And Expressions |
|
|
597 | (4) |
|
|
601 | (1) |
|
|
601 | (2) |
|
16.3.4 Conditional Execution |
|
|
603 | (2) |
|
16.3.5 Determinate And Indeterminate Repetition Structures And Recursion |
|
|
605 | (3) |
|
16.3.6 File Input And Output |
|
|
608 | (3) |
|
16.3.7 Lists And The List Function |
|
|
611 | (1) |
|
16.3.8 Strings, String Formatting Conversions, And Sequence Operations |
|
|
612 | (5) |
|
|
617 | (1) |
|
|
618 | (1) |
|
|
619 | (1) |
|
|
620 | (2) |
|
|
622 | (2) |
|
16.3.14 Objects And Classes |
|
|
624 | (3) |
|
|
627 | (2) |
|
16.3.16 Modules, Global And Local Scope In Functions |
|
|
629 | (1) |
|
|
630 | (44) |
|
16.4.1 Another Way Of Writing Shell Script Files |
|
|
631 | (3) |
|
16.4.2 Basic User File Maintenance |
|
|
634 | (8) |
|
16.4.3 Graphical User Interface With Python And Tkinter Widgets |
|
|
642 | (15) |
|
16.4.4 Multithreaded Concurrency With Python |
|
|
657 | (11) |
|
16.4.5 Talking Threads: The Producer-Consumer Problem Using A Condition Variable |
|
|
668 | (6) |
|
|
674 | (5) |
|
|
679 | (4) |
Chapter 17 UNIX Tools For Software Development |
|
683 | (100) |
|
|
683 | (1) |
|
17.2 Computer Programming Languages |
|
|
684 | (2) |
|
17.3 The Compilation Process |
|
|
686 | (1) |
|
17.4 The Software Engineering Life Cycle |
|
|
687 | (1) |
|
17.5 Program Generation Tools |
|
|
688 | (68) |
|
17.5.1 Generating C Source Files |
|
|
688 | (1) |
|
17.5.2 Indenting C Source Code |
|
|
688 | (2) |
|
17.5.3 Compiling C, C++, And Java Programs |
|
|
690 | (4) |
|
17.5.4 Handling Module-Based C Software |
|
|
694 | (10) |
|
17.5.5 Building Object Files Into A Library |
|
|
704 | (4) |
|
17.5.6 Working With Libraries |
|
|
708 | (2) |
|
|
710 | (46) |
|
17.6 Static Analysis Tools |
|
|
756 | (5) |
|
17.6.1 Verifying Code For Portability |
|
|
756 | (5) |
|
17.6.2 Source Code Metrics |
|
|
761 | (1) |
|
17.7 Dynamic Analysis Tools |
|
|
761 | (15) |
|
17.7.1 Source Code Debugging |
|
|
762 | (12) |
|
17.7.2 Run-Time Performance |
|
|
774 | (2) |
|
|
776 | (1) |
|
|
776 | (3) |
|
|
779 | (4) |
Chapter 18 System Programming I: File System Management |
|
783 | (38) |
|
|
784 | (1) |
|
18.2 What Is System Programming? |
|
|
784 | (1) |
|
18.3 Entry Points Into The Os Kernel |
|
|
785 | (1) |
|
18.4 Fundamentals Of System Calls |
|
|
786 | (2) |
|
18.4.1 What Is A System Call? |
|
|
786 | (1) |
|
18.4.2 Types Of System Calls |
|
|
787 | (1) |
|
18.4.3 Execution Of A System Call |
|
|
787 | (1) |
|
18.5 Files: The Big Picture |
|
|
788 | (3) |
|
18.5.1 File Descriptors, File Descriptor Tables, File Tables, And Inode Tables |
|
|
789 | (1) |
|
|
790 | (1) |
|
18.6 Fundamental File I/O Paradigm |
|
|
791 | (1) |
|
18.7 Standard I/O Versus Low-Level I/O |
|
|
791 | (3) |
|
18.7.1 The C Standard Library |
|
|
791 | (1) |
|
18.7.2 File Data I/O Using The C Standard Library |
|
|
791 | (2) |
|
18.7.3 Low-Level I/O In UNIX Via System Calls |
|
|
793 | (1) |
|
18.7.4 System Call Failure And Error Handling |
|
|
794 | (1) |
|
|
794 | (16) |
|
18.8.1 Opening And Creating A File |
|
|
794 | (5) |
|
|
e796 | |
|
18.8.3 Reading From A File |
|
|
799 | (1) |
|
|
800 | (2) |
|
18.8.5 Positioning The File Pointer: Random Access |
|
|
802 | (4) |
|
|
806 | (2) |
|
|
808 | (2) |
|
18.9 Getting File Attributes From A File (Node |
|
|
810 | (4) |
|
18.9.1 The Stat Structure |
|
|
811 | (1) |
|
18.9.2 Populating The Stat Structure With System Calls |
|
|
812 | (1) |
|
18.9.3 Displaying File Attributes |
|
|
812 | (1) |
|
18.9.4 Accessing And Manipulating File Attributes |
|
|
813 | (1) |
|
18.10 Restarting System Calls |
|
|
814 | (1) |
|
18.11 System Calls For Manipulating Directories |
|
|
815 | (1) |
|
18.12 Important Web Resources |
|
|
816 | (1) |
|
|
817 | (1) |
|
|
817 | (4) |
Chapter 19 System Programming II: Process Management And Signal Processing |
|
821 | (42) |
|
|
822 | (1) |
|
19.2 Processes And Threads |
|
|
822 | (9) |
|
19.2.1 What Is A Process? |
|
|
822 | (1) |
|
19.2.2 Process Control Block |
|
|
823 | (1) |
|
19.2.3 Process Memory Image (Process Address Space) |
|
|
823 | (2) |
|
19.2.4 Process Disk Image |
|
|
825 | (1) |
|
|
826 | (3) |
|
19.2.6 Commonalities And Differences Between Processes And Threads |
|
|
829 | (1) |
|
19.2.7 Data Sharing Among Threads And The Critical Section Problem |
|
|
829 | (2) |
|
19.3 Process Management Concepts |
|
|
831 | (13) |
|
19.3.1 Getting The Process Id And The Parent Process Id |
|
|
832 | (1) |
|
19.3.2 Creating A Clone Of A Process |
|
|
833 | (2) |
|
19.3.3 Reporting Status To The Parent Process |
|
|
835 | (1) |
|
19.3.4 Collecting The Status Of A Child Process |
|
|
835 | (3) |
|
19.3.5 Overwriting A Process Image |
|
|
838 | (4) |
|
19.3.6 Creating A Zombie Process |
|
|
842 | (2) |
|
19.3.7 Terminating A Process |
|
|
844 | (1) |
|
19.4 Processes And The File Descriptor Table |
|
|
844 | (6) |
|
19.4.1 File Sharing Between Processes |
|
|
844 | (3) |
|
19.4.2 Duplicating File Descriptor |
|
|
847 | (3) |
|
19.5 Getting The Attention Of A Process: UNIX Signals |
|
|
850 | (7) |
|
|
850 | (1) |
|
19.5.2 Intercepting Signals |
|
|
850 | (1) |
|
19.5.3 Setting Up An Alarm |
|
|
851 | (4) |
|
|
855 | (2) |
|
19.6 Important Web Resources |
|
|
857 | (1) |
|
|
857 | (1) |
|
|
858 | (5) |
Chapter 20 System Programming III: Interprocess Communication |
|
863 | (100) |
|
|
864 | (1) |
|
20.2 IPC: Communication Channels And Communication Types |
|
|
865 | (1) |
|
20.3 IPC: Important System And Library Calls, Data Structures, Macros, And Header Files |
|
|
866 | (4) |
|
|
867 | (3) |
|
20.4 The Client-Server Model |
|
|
870 | (10) |
|
20.4.1 Simplest Form Of Communication |
|
|
872 | (1) |
|
20.4.2 Communication Via Pipes |
|
|
872 | (8) |
|
20.5 Communication Between Unrelated Processes On The Same Computer |
|
|
880 | (8) |
|
20.6 Communication Between Unrelated Processes On Different Computers |
|
|
888 | (32) |
|
20.6.1 Socket-Based Communication |
|
|
888 | (1) |
|
|
888 | (2) |
|
20.6.3 Domains Of Socket-Based Communication |
|
|
890 | (1) |
|
20.6.4 Types Of Communication Using A Socket |
|
|
891 | (4) |
|
|
895 | (2) |
|
20.6.6 Important Data Structures And Related Function Calls |
|
|
897 | (6) |
|
20.6.7 Binding An Address To A Socket |
|
|
903 | (2) |
|
20.6.8 Enabling A Server-Side Socket To Listen For Connection Requests From Clients |
|
|
905 | (1) |
|
20.6.9 Sending A Connection Request To Server Process |
|
|
906 | (2) |
|
20.6.10 Accepting A Client Request For Connection |
|
|
908 | (2) |
|
|
910 | (1) |
|
20.6.12 Putting It All Together: A Simple Connection-Oriented Client- Server Software |
|
|
911 | (9) |
|
20.7 Types Of Socket-Based Servers |
|
|
920 | (2) |
|
20.8 Algorithms And Examples For Socket-Based Client- Server Software |
|
|
922 | (18) |
|
20.8.1 Iterative Connectionless Client-Server Model |
|
|
922 | (5) |
|
20.8.2 Iterative Connection-Triggered Client-Server Model |
|
|
927 | (4) |
|
20.8.3 Iterative One-Shot Connection-Oriented Client-Server Model |
|
|
931 | (2) |
|
20.8.4 Iterative Connection-Oriented Client-Server Model |
|
|
933 | (1) |
|
20.8.5 Concurrent Connectionless Client-Server Model |
|
|
934 | (1) |
|
20.8.6 Concurrent Connection-Oriented Client-Server Model |
|
|
935 | (5) |
|
20.9 Synchronous Versus Asynchronous I/O: The SELECT() System Call |
|
|
940 | (6) |
|
20.10 The UNIX Superserver: INETD |
|
|
946 | (6) |
|
20.10.1 Managing inetd On Solaris Via Service Management Facility |
|
|
948 | (4) |
|
|
952 | (1) |
|
|
953 | (1) |
|
|
954 | (1) |
|
|
954 | (9) |
Chapter 21 System Programming Iv: Practical Considerations |
|
963 | (26) |
|
|
964 | (1) |
|
21.2 Restarting System Calls |
|
|
964 | (1) |
|
21.3 Thread-Safe System Calls |
|
|
965 | (1) |
|
21.4 Running Processes In Background: Daemons |
|
|
966 | (2) |
|
|
968 | (1) |
|
|
968 | (2) |
|
21.7 Running A Single Copy Of A Program |
|
|
970 | (6) |
|
|
976 | (1) |
|
21.9 Detaching The Terminal From A Daemon |
|
|
976 | (1) |
|
21.10 Changing The Current Working Directory |
|
|
977 | (1) |
|
21.11 Closing Inherited Standard Descriptors And Opening Standard Descriptors |
|
|
977 | (1) |
|
21.12 Waiting For All Child Processes To Terminate |
|
|
978 | (2) |
|
21.13 Complete Sample Server |
|
|
980 | (4) |
|
21.14 Structure Of A Production Server |
|
|
984 | (1) |
|
|
984 | (1) |
|
|
984 | (1) |
|
|
985 | (4) |
Chapter 22 UNIX X Window System GUI Basics |
|
989 | (62) |
|
|
989 | (2) |
|
22.1.1 User-Application Software Interaction Model |
|
|
990 | (1) |
|
22.2 Basics Of The X Window System |
|
|
991 | (19) |
|
22.2.1 What Is The X Window System Similar To And What Advantage(S) Does It Have? |
|
|
991 | (2) |
|
22.2.2 The Key Components Of Interactivity: Events And Requests |
|
|
993 | (2) |
|
22.2.3 The Role Of A Window Manager In The User Interface, And FVWM For PC-BSD |
|
|
995 | (4) |
|
22.2.4 Customizing The X Window System And FVWM |
|
|
999 | (11) |
|
22.3 The KDE4 Desktop Manager |
|
|
1010 | (11) |
|
22.3.1 Logging In And Out |
|
|
1010 | (3) |
|
|
1013 | (1) |
|
22.3.3 Adding A Desktop Icon That Launches An Application |
|
|
1014 | (1) |
|
22.3.4 KDE4 Window Manager |
|
|
1015 | (3) |
|
22.3.5 KDE4 System Settings |
|
|
1018 | (1) |
|
22.3.6 KDE4 File Management With Dolphin |
|
|
1018 | (3) |
|
22.4 Creating X Window System Client Application Programs |
|
|
1021 | (24) |
|
22.4.1 Client Application Program Structure And Development Model |
|
|
1021 | (4) |
|
|
1025 | (1) |
|
|
1026 | (6) |
|
|
1032 | (8) |
|
22.4.5 Using The Qt Toolkit |
|
|
1040 | (5) |
|
|
1045 | (1) |
|
|
1046 | (5) |
Chapter 23 UNIX System Administration Fundamentals |
|
1051 | (128) |
|
|
1052 | (2) |
|
23.2 Doing A Fresh Install From ISO-Created DVD Media And Preliminary System Configuration |
|
|
1054 | (18) |
|
23.2.1 Preinstallation Considerations |
|
|
1055 | (1) |
|
23.2.2 GUI Install Of PC-BSD |
|
|
1056 | (1) |
|
23.2.3 Postinstall Configuration |
|
|
1057 | (1) |
|
23.2.4 GUI Install Of Solaris |
|
|
1057 | (2) |
|
23.2.5 System Services Administration, Booting And Shutdown Procedures |
|
|
1059 | (13) |
|
|
1072 | (18) |
|
23.3.1 Adding And Deleting A User In A Text-Based Interface On PC-BSD |
|
|
1073 | (7) |
|
23.3.2 Adding/Deleting And Maintaining Users And Groups In A GUI-Based Interface On PC-BSD |
|
|
1080 | (4) |
|
23.3.3 Adding/Deleting And Managing Users And Groups In A Text-Based Interface On Solaris |
|
|
1084 | (6) |
|
23.4 Adding A Hard Disk To The System |
|
|
1090 | (10) |
|
23.4.1 Preliminary Considerations When Adding New Disk Drives |
|
|
1091 | (1) |
|
23.4.2 A Quick And Easy Way To Find Out The Logical Device Names Of Disks Actually Installed On Your System |
|
|
1091 | (1) |
|
23.4.3 Adding A New Disk To The System |
|
|
1092 | (8) |
|
23.5 Adding A Printer To The System |
|
|
1100 | (1) |
|
23.5.1 Researching Your Printer |
|
|
1100 | (1) |
|
|
1101 | (1) |
|
23.5.3 Adding A Printer To Solaris |
|
|
1101 | (1) |
|
23.6 File System Backup Strategies And Techniques |
|
|
1101 | (20) |
|
23.6.1 A Strategic Synopsis And Overview Of File Backup Facilities |
|
|
1102 | (1) |
|
|
1102 | (10) |
|
23.6.3 Other UNIX Archiving And Backup Facilities |
|
|
1112 | (9) |
|
23.7 System Upgrades And Software Updates Using A Package Manager |
|
|
1121 | (8) |
|
23.7.1 Upgrading The Operating System In Solaris |
|
|
1121 | (2) |
|
23.7.2 Updating The Installed Application Packages And Installing New Application Packages In Solaris |
|
|
1123 | (2) |
|
23.7.3 Upgrading The Operating System In PC-BSD |
|
|
1125 | (4) |
|
23.7.4 Updating The Installed Application Packages And Installing New Application Packages In PC-BSD |
|
|
1129 | (1) |
|
23.8 System And Software Performance Monitoring |
|
|
1129 | (15) |
|
23.8.1 Process And Memory Management |
|
|
1130 | (3) |
|
23.8.2 Disk Usage And Management |
|
|
1133 | (3) |
|
23.8.3 Network Configuration |
|
|
1136 | (3) |
|
23.8.4 Practical System Administration Logging And The Syslog() Function |
|
|
1139 | (5) |
|
|
1144 | (29) |
|
23.9.1 Password-Based Authentication |
|
|
1144 | (1) |
|
23.9.2 Access Control: Discretionary (DAC), Mandatory (MAC), And Role-Based (RBAC) |
|
|
1145 | (2) |
|
23.9.3 Using Access Control Lists (ACLs) In PC-BSD |
|
|
1147 | (21) |
|
23.9.4 Intrusion Detection And Intrusion Detection Systems |
|
|
1168 | (1) |
|
|
1168 | (5) |
|
23.10 Virtualization Methodologies |
|
|
1173 | (1) |
|
|
1174 | (1) |
|
|
1174 | (5) |
Chapter 24 ZFS Administration And Use |
|
1179 | (64) |
|
|
1179 | (4) |
|
24.1.1 zpool And ZFS Command Syntax |
|
|
1180 | (1) |
|
|
1180 | (1) |
|
|
1181 | (1) |
|
24.1.4 Important ZFS Concepts |
|
|
1182 | (1) |
|
24.2 Example ZFS Pools And File Systems: Using The zpool And ZFS Commands |
|
|
1183 | (25) |
|
24.2.1 A Quick And Easy Way To Find Out The Logical Device Names Of Disks Actually Installed On Your System |
|
|
1183 | (1) |
|
24.2.2 Basic ZFS Examples |
|
|
1184 | (24) |
|
24.3 ZFS Commands And Operations |
|
|
1208 | (12) |
|
24.3.1 Command Categories And Basic Definitions |
|
|
1208 | (2) |
|
24.3.2 ZFS Storage Pools And The zpool Command |
|
|
1210 | (5) |
|
24.3.3 ZFS File System Commands And The ZFS Command |
|
|
1215 | (5) |
|
24.4 File System Backups Using ZFS Snapshot |
|
|
1220 | (3) |
|
24.4.1 Examples Of Snapshot |
|
|
1220 | (1) |
|
|
1220 | (1) |
|
|
1220 | (1) |
|
24.4.4 Renaming A Filesystem |
|
|
1221 | (1) |
|
24.4.5 Compression Of Filesystems |
|
|
1221 | (1) |
|
24.4.6 Bourne Shell Script Example For Incremental ZFS Backups |
|
|
1221 | (2) |
|
24.5 Using Access Control Lists (ACLS) And Attributes For Securing Solaris ZFS Files |
|
|
1223 | (15) |
|
|
1223 | (6) |
|
24.5.2 Setting ACLs On ZFS Files |
|
|
1229 | (6) |
|
24.5.3 Setting ACL Inheritance On ZFS Files |
|
|
1235 | (3) |
|
|
1238 | (1) |
|
|
1239 | (4) |
Chapter 25 Virtualization Methodologies |
|
1243 | (56) |
|
25.1 Introduction To Virtualization Methodologies And Background |
|
|
1244 | (3) |
|
25.1.1 Virtualized Network Addresses In PC-BSD And Solaris |
|
|
1246 | (1) |
|
25.2 PC-BSD Jails With Iocage |
|
|
1247 | (20) |
|
25.2.1 iocage Introduction, Overview, And Use |
|
|
1247 | (2) |
|
|
1249 | (2) |
|
|
1251 | (2) |
|
|
1253 | (1) |
|
|
1254 | (1) |
|
|
1255 | (3) |
|
25.2.7 How To Create And Use Templates |
|
|
1258 | (1) |
|
25.2.8 Create A Jail Package |
|
|
1259 | (2) |
|
25.2.9 iocage Installation And Worked Examples |
|
|
1261 | (6) |
|
25.3 Solaris Zones Virtualization Method |
|
|
1267 | (13) |
|
25.3.1 Nonglobal Zone State Model |
|
|
1267 | (2) |
|
25.3.2 Commands That Affect Zone State |
|
|
1269 | (1) |
|
25.3.3 Creating A Solaris Zone |
|
|
1269 | (7) |
|
25.3.4 Installing A Web Server Application In A Zone |
|
|
1276 | (4) |
|
|
1280 | (16) |
|
25.4.1 Installing And Running Virtualbox On A PC-BSD Host Os |
|
|
1281 | (1) |
|
25.4.2 Installing And Running Solaris Virtualbox |
|
|
1282 | (3) |
|
25.4.3 Installing A VM Guest |
|
|
1285 | (4) |
|
25.4.4 Securing An FTP Server In A Virtualbox Guest |
|
|
1289 | (3) |
|
25.4.5 Installing PC-BSD Or Solaris As A Guest VM On A LINUX Or Windows Host |
|
|
1292 | (4) |
|
|
1296 | (1) |
|
|
1297 | (2) |
Glossary |
|
1299 | (30) |
Index |
|
1329 | |