TY - BOOK AU - Sarwar,Syed Mansoor AU - Koretsky,Robert AU - Sarwar,Syed Aqeel TI - LINUX: the textbook SN - 0201725959 (pbk.) U1 - 005.432 SAR PY - 2002/// CY - Boston, MA PB - Addison-Wesley KW - Operating systems (Computers) KW - Mathematics- General KW - Operating systems (Computers) KW - UNIX (Computer file) N1 - Includes index; Includes index; Overview of Operating Systems 1 (8) Introduction 2 (1) What is an Operating System? 2 (2) Operating System Services 4 (1) Character Versus Graphical User Interfaces 4 (1) Types of Operating Systems 5 (1) The LINUX Family 6 (3) Summary 7 (1) Problems 7 (2) LINUX History 9 (8) Introduction 10 (1) Open Source Background 10 (2) Linus Torvalds 12 (1) LINUX Distributions 13 (1) Kernel History 13 (1) Popularity of LINUX 14 (1) Future Developments 14 (1) Web Resources 14 (3) Summary 14 (1) Problems 15 (2) Getting Started 17 (24) Introduction 18 (1) Computer System Hardware 18 (3) Main/Primary Storage 18 (1) Central Processing Unit (CPU) 19 (1) Disk 20 (1) Bus 20 (1) I/O Devices 21 (1) LINUX Software Architecture 21 (4) Device Driver Layer 21 (1) The LINUX Kernel 22 (2) The System Call Interface 24 (1) Language Libraries 24 (1) LINUX Shell 24 (1) Applications 25 (1) Logging On and Logging Off 25 (4) Correcting Command Line Typing Mistakes 29 (1) Some Important System Setups 30 (2) Some Useful Commands for the Beginner 32 (9) Changing Your Password 32 (1) Getting Help 32 (4) Finding Out Who You Are and What the Name of Your LINUX System Is 36 (1) Summary 37 (1) Problems 38 (3) LINUX Shells 41 (20) Introduction 42 (1) Various LINUX Shells 43 (6) Various Shell Programs 44 (1) Which Shell Suits Your Needs? 44 (1) Various Ways to Change Your Shell 45 (3) Shell Start-up Files and Environment Variables 48 (1) Some Useful General-Purpose Commands 49 (7) Creating and Displaying Directories 49 (2) Displaying Files 51 (1) Printing Files 51 (1) Displaying a Calendar 51 (1) One-Way Real-Time Messaging 52 (1) Notification of and Permission for Electronic Communication 52 (1) Creating Pseudonyms for Commands 53 (3) Displaying System Up Time 56 (1) Shell Metacharacters 56 (5) Summary 58 (1) Problems 59 (2) Editing Text Files 61 (46) Introduction 62 (1) How to Do Short and Simple Edits by Using the pico Editor 63 (6) Creating the Text of an E-mail Message with the pico Text Editor 63 (1) How to Start, Save a File, and Exit 64 (2) General Keystroke Commands and Cursor Movement 66 (2) Cutting, Pasting, and Searching 68 (1) Obtaining More Control Using the vi Editor 69 (15) Shell Script File 70 (2) How to Start, Save a File, and Exit 72 (1) The Format of a vi Command and the Modes of Operation 73 (5) Cursor Movement and Editing Commands 78 (2) Yank and Put (Copy and Paste) and Substitute (Search and Replace) 80 (3) Setting the vi Environment 83 (1) Executing Shell Commands from Within vi 84 (1) Getting Maximum Control by Using the emacs Editor 84 (11) DOS Aliases 84 (2) How to Start, Save a File, and Exit 86 (1) Cursor Movement and Editing Commands 87 (1) Keyboard Macros 88 (3) Cut or Copy and Paste and Search and Replace 91 (4) How to do Graphical Editing by Using XEmacs 95 (5) Editing Data Files with XEmacs 95 (2) XEmacs Menus and Buttons 97 (1) How to Start, Save a File, and Exit 98 (2) Command Line Editing 100 (7) Summary 104 (1) Problems 104 (3) Electronic Mail 107 (52) Introduction 108 (3) How to Use the LINUX mail Command Effectively 111 (9) Sending and Reading E-mail with the LINUX mail Command 111 (1) Sending E-mail with the mail Command 112 (3) Reading E-mail with mail 115 (2) Saving Messages in Folders 117 (1) Replying to and Forwarding Messages and Including Attachments 118 (1) mail Aliases 119 (1) elm---A Full-Screen Display E-mail System 120 (11) Sending a Message in elm 121 (1) Sending E-mail with elm 121 (1) Reading E-mail in elm 121 (5) Forwarding and Replying to an E-mail message in elm 126 (3) Saving Messages in Folders 129 (1) elm Aliases 129 (2) pine---Another Full-Screen Display E-mail System Sending an E-mail Message by Using pine with an Attachment Created in vi 131 (3) Sending E-mail with pine 134 (2) Reading E-mail with pine 136 (1) Disposing of E-mail in Folders in pine 137 (2) Using the pine Address Book 139 (4) A Summary of pine Commands 143 (1) Graphical E-mail with Kmail 144 (15) Starting Out with Kmail 145 (2) Reading E-mail in Kmail 147 (3) Sending E-mail in Kmail 150 (2) Simple Filtering of E-mail into Folders 152 (2) Summary 154 (1) Problems 155 (4) Files and File System Structure 159 (38) Introduction 159 (1) The LINUX File Concept 160 (1) Types of Files 160 (3) Simple/Ordinary File 160 (1) Directory 161 (1) Link File 162 (1) Special File (Device) 162 (1) Named Pipe (FIFO) 163 (1) File System Structure 163 (7) File System Organization 163 (1) Home and Present Working Directories 164 (1) Pathnames: Absolute and Relative 164 (1) Some Standard Directories and Files 165 (5) Navigating the File Structure 170 (18) Determining the Absolute Pathname for Your Home Directory 171 (1) Browsing the File System 172 (4) Creating Files 176 (1) Creating and Removing Directories 176 (2) Manipulating the Directory Stack 178 (5) Determining File Attributes 183 (4) Determining the Type of a File's Contents 187 (1) File Representation and Storage in LINUX 188 (3) Standard Files and File Descriptors 191 (1) End of File (eof) Marker 192 (5) Summary 193 (1) Problems 194 (3) File Security 197 (22) Introduction 198 (1) Password-Based Protection 198 (1) Encryption-Based Protection 198 (2) Protection-Based on Access Permission 200 (1) Types of Users 200 (1) Types of File Operations/Access Permissions 200 (1) Determining and Changing File Access Privileges 201 (10) Determining File Access Privileges 202 (2) Changing File Access Privilages 204 (5) Default File Access Privileges 209 (2) Special Access Bits 211 (5) The Set-User-ID (SUID) Bit 211 (2) The Set-Group-ID (SGID) Bit 213 (1) The Sticky Bit 214 (2) File Permissions and Types 216 (3) Summary 216 (1) Problems 217 (2) Basic File Processing 219 (40) Introduction 220 (1) Viewing Contents of Text Files 220 (11) Viewing Complete Files 220 (3) Viewing Files One Page at a Time 223 (4) Viewing the Head or Tail of a File 227 (4) Copying, Moving, and Removing Files 231 (9) Copying Files 231 (3) Moving Files 234 (2) Removing/Deleting Files 236 (2) Determining File Size 238 (2) Appending to Files 240 (2) Combining Files 242 (2) Comparing Files 244 (5) Removing Repeated Lines 249 (2) Printing Files and Controlling Print Jobs 251 (8) LINUX Mechanism for Printing Files 251 (1) Printing Files 252 (2) Finding the Status of a Print Request 254 (1) Canceling Print Jobs 254 (2) Summary 256 (1) Problems 257 (2) Advanced File Processing 259 (42) Introduction 260 (1) Regular Expressions 260 (2) Compressing Files 262 (6) The gzip Command 263 (1) The gunzip Command 264 (1) The gzexe Command 265 (1) The zcat Command 266 (1) The zforce Command 267 (1) Sorting Files 268 (3) Searching for Commands and Files 271 (4) The find Command 272 (2) The where is Command 274 (1) The which Command 275 (1) Searching Files 275 (6) Cutting and Pasting 281 (5) Encoding and Decoding 286 (2) Command History 288 (13) Summary 297 (1) Problems 298 (3) File Sharing 301 (24) Introduction 302 (1) Duplicate Shared Files 302 (1) Common Login for Members of a Team 302 (1) Setting Appropriate Access Permissions on Shared Files 303 (1) Common Group for Members of a Team 303 (1) File Sharing via Links 303 (18) Hard Links 304 (8) Drawbacks of Hard Links 312 (2) Soft/Symbolic Links 314 (5) Types of Symbolic Links 319 (1) Pros and Cons of Symbolic Links 319 (2) Searching for Symbolic Links 321 (4) Summary 322 (1) Problems 323 (2) Redirection and Piping 325 (30) Introduction 326 (1) Standard Files 326 (1) Input Redirection 326 (2) Output Redirection 328 (2) Combining Input and Output Redirection 330 (1) I/O Redirection with File Descriptors 331 (1) Redirecting Standard Error 332 (1) Redirecting stdout and stderr in One Command 333 (2) Redirecting stdin, stdout, and stderr in One Command 335 (2) Redirecting Without Overwriting File Contents (Appending) 337 (2) LINUX pipes 339 (4) Redirection and Piping Combined 343 (2) Error Redirection in the TC Shell 345 (4) Recap of I/O and Error Redirection 349 (6) Summary 351 (1) Problems 352 (3) Processes 355 (46) Introduction 356 (1) Running Multiple Processes Simultaneously 356 (1) LINUX Process States 357 (1) Execution of Shell Commands 357 (5) Process Attributes 362 (11) Process and Job Control 373 (20) Foreground and Background Processes and Related Commands 373 (8) LINUX Daemons 381 (1) Sequential and Parallel Execution of Commands 382 (5) Abnormal Termination of Commands and Processes 387 (5) Conditional Command Execution 392 (1) Process Hierarchy in LINUX 393 (8) Summary 397 (1) Problems 398 (3) Networks and Internetworking 401 (48) Introduction 402 (1) Computer Networks and Internetworks 402 (1) The Reasons for Computer Networks and Internetworks 403 (1) Network Models 404 (2) The TCP/IP Protocol Suite 406 (8) TCP and UDP 406 (1) Routing of Application Data---The Internet Protocol (IP) 407 (2) Ipv4 Addresses in Dotted Decimal Notation 409 (1) Symbolic Names 410 (2) Translating Names to IP Addresses---The Domain Name System 412 (2) Internet Services and Protocols 414 (1) The Client-Server Software Model 415 (1) Application Software 416 (33) Displaying the Host Name 416 (1) Displaying List of Users Using Hosts on a Network 417 (2) Displaying the Status of Hosts on a Network 419 (1) Testing a Network Connection 420 (2) Displaying Information About Users 422 (3) Remote Login 425 (8) Remote Command Execution 433 (3) File Transfer 436 (3) Remote Copy 439 (3) Interactive Chat 442 (1) Tracing the Route from One Site to Another Site 443 (2) Summary 445 (1) Problems 445 (4) Introductory Bash Programming 449 (54) Introduction 450 (1) Running a Bash Script 450 (1) Shell Variables and Related Commands 451 (21) Controlling the Prompt 457 (1) Variable Declaration 457 (3) Reading and Writing Shell Variables 460 (4) Command Substitution 464 (1) Exporting Environment 465 (3) Resetting Variables 468 (1) Creating Read-Only User Defined Variables 469 (1) Reading from Standard Input 470 (2) Passing Arguments to Shell Scripts 472 (5) Comments and Program Headers 477 (1) Program Control Flow Commands 478 (25) The if-then-elif-else-fi Statement 478 (10) The for Statement 488 (2) The while Statement 490 (3) The until Statement 493 (1) The break and continue Commands 494 (1) The case Statement 495 (5) Summary 500 (1) Problems 501 (2) Advanced Bash Programming 503 (44) Introduction 504 (1) Numeric Data Processing 504 (10) Array Processing 514 (5) The Here Document 519 (4) Interrupt (Signal) Processing 523 (4) The exec Command and File I/O 527 (11) Execution of a Command without Creating a New Process 528 (2) File I/O via the exec Command 530 (8) Functions In Bash 538 (9) The Reasons for Functions 538 (1) Function Definition 539 (1) Function Invocation/Call 539 (1) Examples of Functions 539 (3) Debugging Shell Programs 542 (2) Summary 544 (1) Problems 545 (2) Introductory TC Shell Programming 547 (42) Introduction 548 (1) Running a TC Shell Script 548 (1) Shell Variables and Related Commands 549 (14) Reading and Writing Shell Variables 553 (2) Command Substitution 555 (1) Exporting Environment 556 (3) Resetting Variables 559 (1) Creating Read-Only User-Defined Variables 560 (1) Reading from Standard Input 561 (2) Passing Arguments to Shell Scripts 563 (4) Comments and Program Headers 567 (1) Program Control Commands 568 (21) The if-then-else-endif Statement 568 (9) The foreach Statement 577 (2) The while Statement 579 (2) The break, continue and goto Commands 581 (1) The switch Statement 582 (4) Summary 586 (1) Problems 586 (3) Advanced TC Shell Programming 589 (20) Introduction 590 (1) Numeric Data Processing 590 (2) Array Processing 592 (6) The Here Document 598 (2) Interrupt (Signal) Processing 600 (5) Debugging Shell Programs 605 (4) Summary 606 (1) Problems 607 (2) File System Backup 609 (16) Introduction 610 (1) Archiving and Restoring Files Via tar 610 (12) Archiving Files 611 (5) Restoring Archived Files 616 (4) Copying Directory Hierarchies 620 (2) Software Distributions in the tar Format 622 (3) Summary 623 (1) Problems 623 (2) LINUX Tools for Software Development 625 (98) Introduction 626 (1) Computer Programming Languages 626 (2) The Compilation Process 628 (1) The Software Engineering Life Cycle 628 (2) Program Generation Tools 630 (67) Generating C Source Files 631 (1) Indenting C Source Code 631 (3) Compiling C Programs 634 (5) Handling Module-Based C Software 639 (13) Creating, Modifying, and Extracting from Libraries/Archives 652 (8) Version Control 660 (37) Static Analysis Tools 697 (7) Profiling C Source Code 698 (6) Dynamic Analysis Tools 704 (19) Source Code Debugging 704 (13) Run-Time Performance 717 (2) Summary 719 (1) Problems 719 (4) Xfree 86 and the LINUX GUI 723 Introduction 724 The Basics of Xfree86 725 Comparisons and Advantages 725 The Key Components of Interactivity---Events and Requests 727 The Role of a Window Manager in the User Interface and fvwm 729 Customizing Xfree86 and fvwm 734 The GNOME Desktop Manager 742 Logging In and Out and the Appearance of the GNOME Desktop 743 The GNOME Panel 744 Customizing the Panel 747 GnoRPM Installation of New Packages 751 The Sawfish Window Manager 755 The GNOME Control Center 760 File Management with the GNOME File Manager 761 The KDE Desktop Manager 763 Logging In and Out 764 The KDE Panel 766 New Packages Installation 771 The K Window Manager 775 The KDE Control Center 778 File Management with kfm 780 Internet Resources 782 Summary 783 Problems 784 Appendix A: LINUX Installation A-1 Appendix B: Command Dictionary A-13 Glossary G-1 Index l-1 ER -