Your UNIX The Ultimate Guide Sumitabha Das
User Manual:
Open the PDF directly: View PDF
Page Count: 801 [warning: Documents this large are best viewed by clicking the View PDF Link!]
- Cover Page
- Title Page
- Copyright Page
- Dedication
- Contents in Brief
- Contents
- List of Tables
- Preface
- PART I UNIX for the User
- Chapter 1 Introducing UNIX
- 1.1 The Operating System
- 1.2 The UNIX Operating System
- 1.3 Knowing Your Machine
- 1.4 The System Administrator
- 1.5 Logging In and Out
- 1.6 A Hands-On Session
- 1.7 How It All Clicked
- 1.8 POSIX and the Single UNIX Specification
- 1.9 Linux and GNU
- 1.10 The UNIX Architecture
- 1.11 Features of UNIX
- Summary
- Self-Test
- Exercises
- Chapter 2 Becoming Familiar with UNIX Commands
- 2.1 Command Basics
- 2.2 Command Structure
- 2.3 Flexibility of Command Usage
- 2.4 man: On-Line Help
- 2.5 The man Documentation
- 2.6 echo: Displaying Messages
- 2.7 printf: Alternative to echo
- 2.8 script: Recording Your Session
- 2.9 Using Email with mailx
- 2.10 passwd: Changing Your Password
- 2.11 uname: Your Machine’s Name and Operating System
- 2.12 who: Know the Users
- 2.13 date: Displaying the System Date
- 2.14 stty: When Things Go Wrong
- 2.15 The X Window System
- Summary
- Self-Test
- Exercises
- Chapter 3 The File System
- 3.1 The File
- 3.2 What’s in a (File)name?
- 3.3 The File System Hierarchy
- 3.4 The UNIX File System
- 3.5 Using Absolute Pathnames with Commands
- 3.6 The HOME Variable and ~: The Home Directory
- 3.7 pwd and cd: Navigating the File System
- 3.8 Relative Pathnames (. and ..)
- 3.9 mkdir: Making Directories
- 3.10 rmdir: Removing Directories
- 3.11 ls: Listing Files
- 3.12 cp: Copying Files
- 3.13 mv: Renaming Files
- 3.14 rm: Deleting Files
- 3.15 cat: Displaying and Concatenating Files
- 3.16 more: The UNIX Pager
- 3.17 pico: Rudimentary Text Editing
- 3.18 wc: Counting Lines, Words and Characters
- 3.19 lp: Printing a File
- 3.20 od: Viewing Nonprintable Characters
- 3.21 dos2unix, unix2dos, and Tofrodos: Converting Between DOS and UNIX
- 3.22 tar: The Archival Program
- 3.23 gzip: The Compression Program
- 3.24 zip: The Compression and Archival Program
- 3.25 Other Ways of Using These Commands
- Summary
- Self-Test
- Exercises
- Chapter 4 File Attributes
- 4.1 ls Revisited (-l): Listing File Attributes
- 4.2 File Permissions
- 4.3 chmod: Changing File Permissions
- 4.4 The Directory
- 4.5 umask: Default File and Directory Permissions
- 4.6 File Systems and Inodes
- 4.7 ln: Creating Hard Links
- 4.8 ln Again: Creating Symbolic Links
- 4.9 File Ownership
- 4.10 Modification and Access Times
- 4.11 find: Locating Files
- Summary
- Self-Test
- Exercises
- Chapter 5 The vi/vim Editor
- 5.1 vi Basics
- 5.2 A Few Tips First
- 5.3 Input Mode—Entering and Replacing Text
- 5.4 Saving Text and Quitting—The ex Mode
- 5.5 Recovering from a Crash (:recover and -r)
- 5.6 Navigation
- 5.7 Editing Text without Operators
- 5.8 Correcting a C Program
- 5.9 Editing Text with Operators
- 5.10 Copying and Moving Text from One File to Another
- 5.11 Undoing Last Editing Instructions (u and U)
- 5.12 Searching for a Pattern (/ and ?)
- 5.13 Repeating the Last Command (.)
- 5.14 Substitution—Search and Replace (:s)
- 5.15 set: Customizing vi
- 5.16 map: Mapping Keys of Keyboard
- 5.17 abbr: Abbreviating Text Input
- Summary
- Self-Test
- Exercises
- Chapter 6 The Shell
- 6.1 The Shell as Command Processor
- 6.2 Shell Offerings
- 6.3 Pattern Matching—The Wild Cards
- 6.4 Escaping and Quoting
- 6.5 Redirection
- 6.6 Collective Manipulation
- 6.7 /dev/null and /dev/tty: Two Special Files
- 6.8 Pipes
- 6.9 tee: Creating a Tee
- 6.10 Command Substitution
- 6.11 Shell Variables
- 6.12 Shell Scripts
- 6.13 The Shell’s Treatment of the Command Line
- 6.14 More Wild Cards
- 6.15 xargs: Building a Dynamic Command Line
- Summary
- Self-Test
- Exercises
- Chapter 7 The Process
- 7.1 Process Basics
- 7.2 The Shell and init
- 7.3 ps: Displaying Process Attributes
- 7.4 System Processes and init
- 7.5 The Process Creation Mechanism
- 7.6 Inherited Process Attributes
- 7.7 When You Can’t Use a Separate Process
- 7.8 Process States and Zombies
- 7.9 Signal Handling
- 7.10 Running Jobs in Background
- 7.11 Job Control
- 7.12 at and batch: Execute Later
- 7.13 cron and crontab: Running Jobs Periodically
- Summary
- Self-Test
- Exercises
- Chapter 8 The Shell—Customizing the Environment
- Chapter 9 Simple Filters
- 9.1 pr: Paginating Files
- 9.2 Comparing Files
- 9.3 cmp: Byte-by-Byte Comparison
- 9.4 comm: What Is Common?
- 9.5 diff: Converting One File to Another
- 9.6 head: Displaying the Beginning of a File
- 9.7 tail: Displaying the End of a File
- 9.8 cut: Slitting a File Vertically
- 9.9 paste: Pasting Files
- 9.10 sort: Ordering a File
- 9.11 uniq: Locate Repeated and Nonrepeated Lines
- 9.12 tr: Translating Characters
- 9.13 Applying the Filters
- Summary
- Self-Test
- Exercises
- Chapter 10 Filters Using Regular Expressions—grep and sed
- 10.1 The Sample Database
- 10.2 grep: Searching for a Pattern
- 10.3 grep Options
- 10.4 Basic Regular Expressions (BRE)—An Introduction
- 10.5 Extended Regular Expressions (ERE) and egrep
- 10.6 sed:The Stream Editor
- 10.7 Line Addressing
- 10.8 sed Options
- 10.9 Context Addressing
- 10.10 Writing Selected Lines to a File (w)
- 10.11 Text Editing
- 10.12 Substitution (s)
- 10.13 Basic Regular Expressions Revisited
- 10.14 Applying the IRE and TRE
- Summary
- Self-Test
- Exercises
- Chapter 11 Networking Tools
- 11.1 TCP/IP Basics
- 11.2 Resolving Hostnames and IP Addresses
- 11.3 Client-Server: How Networked Applications Communicate
- 11.4 ping: Checking the Network
- 11.5 telnet: Remote Login
- 11.6 ftp: File Transfer Protocol
- 11.7 Cryptography Basics
- 11.8 SSH: The Secure Shell
- 11.9 The SSH Tools
- 11.10 Internet Mail
- 11.11 MIME: Handling Binary Attachments in Mail
- 11.12 Using X Window on a TCP/IP Network
- 11.13 HTTP and the World Wide Web
- 11.14 Multimedia on the Web: MIME Revisited
- Summary
- Self-Test
- Exercises
- Chapter 1 Introducing UNIX
- PART II UNIX for the Programmer
- Chapter 12 Filtering and Programming with awk
- 12.1 awk Preliminaries
- 12.2 Using print and printf
- 12.3 Number Processing
- 12.4 Variables and Expressions
- 12.5 The Comparison and Logical Operators
- 12.6 The -f Option: Storing awk Programs in a File
- 12.7 The BEGIN and END Sections
- 12.8 Positional Parameters
- 12.9 Arrays
- 12.10 Built-In Variables
- 12.11 Functions
- 12.12 Control Flow—The if Statement
- 12.13 Looping with for
- 12.14 Looping with while
- 12.15 Conclusion
- Summary
- Self-Test
- Exercises
- Chapter 13 Shell Programming
- 13.1 Shell Scripts
- 13.2 read: Making Scripts Interactive
- 13.3 Using Command-Line Arguments
- 13.4 exit and $?: Exit Status of a Command
- 13.5 The Logical Operators && and ||—Conditional Execution
- 13.6 The if Conditional
- 13.7 Using test and [ ] to Evaluate Expressions
- 13.8 Two Important Programming Idioms
- 13.9 The case Conditional
- 13.10 expr, bc and basename: Computation and String Handling
- 13.11 Sample Program 1: Automatically Selects Last C Program
- 13.12 for: Looping with a List
- 13.13 while: Looping
- 13.14 Sample Script 2: Providing Numeric Extensions to Backup Files
- 13.15 Manipulating Positional Parameters with set and shift
- 13.16 Sample Script 3: A Table of Contents for Downloaded Files
- 13.17 The Here Document (<<)
- 13.18 Shell Functions
- 13.19 trap: How a Script Handles Signals
- 13.20 eval: Evaluating Twice
- 13.21 The exec Statement
- Summary
- Self-Test
- Exercises
- Chapter 14 perl—The Master Manipulator
- 14.1 perl Preliminaries
- 14.2 Variables and Constants
- 14.3 Operators
- 14.4 The Standard Conditionals and Loops
- 14.5 Reading Files from Command-Line Arguments
- 14.6 The Current Line Number ($.) and the Range Operator ()
- 14.7 $_: The Default Variable
- 14.8 String-Handling Functions
- 14.9 Lists and Arrays
- 14.10 foreach: Looping Through a List
- 14.11 Two Important List Functions
- 14.12 dec2bin.pl: Converting a Decimal Number to Binary
- 14.13 Associative Arrays
- 14.14 Using Regular Expressions
- 14.15 Substitution with the s and tr Functions
- 14.16 File Handling
- 14.17 File Tests
- 14.18 Subroutines
- 14.19 CGI Programming with perl—An Overview
- Summary
- Self-Test
- Exercises
- Chapter 15 Introducing C
- 15.1 The C Language
- 15.2 first_prog.c: Understanding Our First C Program
- 15.3 printf and scanf: Two Important Functions
- 15.4 Variables and Constants
- 15.5 The Fundamental Data Types
- 15.6 sizeof.c: Determining the Size of the Fundamental Data Types
- 15.7 Symbolic Constants: Constants with Names
- 15.8 Arrays
- 15.9 arrays.c: Printing Array Elements
- 15.10 Structures
- 15.11 Operators and Expressions
- 15.12 type_conversion.c: Demonstrates Type Conversion
- 15.13 Order of Evaluation
- 15.14 Control Flow Revisited
- 15.15 Functions
- 15.16 first_func.c: Two Arguments and Return Value
- 15.17 Function Arguments, Parameters, and Local Variables
- 15.18 Pointers
- 15.19 pointers.c: Basic Features of a Pointer
- 15.20 Pointer Attributes
- 15.21 Pointers and Functions
- 15.22 Pointers and Other Data Types
- Summary
- Self-Test
- Exercises
- Chapter 16 Program Development Tools
- 16.1 Handling Multisource C Applications
- 16.2 make: Keeping Programs Up to Date
- 16.3 ar: Building a Library (Archive)
- 16.4 Static and Shared Libraries
- 16.5 Version Control with SCCS, RCS, and CVS
- 16.6 An SCCS Session
- 16.7 Activity and History Information
- 16.8 Continuing Editing with SCCS
- 16.9 Controlling Access to SCCS
- 16.10 The Revision Control System (RCS)
- 16.11 The Concurrent Version System (CVS)
- 16.12 Debugging Programs with gdb
- Summary
- Self-Test
- Exercises
- Chapter 17 Systems Programming I—Files
- 17.1 System Call Basics
- 17.2 errno and perror: Handling Errors
- 17.3 open: Opening and Creating a File
- 17.4 close: Closing a File
- 17.5 read: Reading a File
- 17.6 write: Writing a File
- 17.7 ccp.c: Copying a File
- 17.8 lseek: Positioning the Offset Pointer
- 17.9 truncate and ftruncate: Truncating a File
- 17.10 umask: Modifying File Permissions During Creation
- 17.11 Directory Navigation
- 17.12 Reading a Directory
- 17.13 Modifying Entries in Directory
- 17.14 Reading the Inode: struct stat and stat
- 17.15 access: Checking the Real User’s Permissions
- 17.16 Modifying File Attributes
- Summary
- Self-Test
- Exercises
- Chapter 18 Systems Programming II—Process Control
- 18.1 The Process Revisited
- 18.2 The Process Environment
- 18.3 fork: Replicating the Current Process
- 18.4 exec: The Final Step in Process Creation
- 18.5 Gathering the Exit Status
- 18.6 fork_exec_wait.c: Using All Three Calls
- 18.7 File Sharing
- 18.8 File Descriptor Manipulation
- 18.9 Signal Handling
- 18.10 sigaction: Installing a Signal Handler
- 18.11 killprocess.c: Using fork-exec-wait and SIGCHLD
- 18.12 IPC with Unnamed Pipes
- Summary
- Self-Test
- Exercises
- Chapter 12 Filtering and Programming with awk
- PART III System Administration
- Chapter 19 System Administration
- 19.1 root: The System Administrator’s Login
- 19.2 The Administrator’s Privileges
- 19.3 User Management
- 19.4 Maintaining Security
- 19.5 Booting and Shutdown
- 19.6 How init Controls the System
- 19.7 Device Files
- 19.8 File Systems
- 19.9 Mounting and Unmounting File Systems
- 19.10 fsck: File System Checking
- 19.11 Managing Disk Space
- 19.12 Handling Floppy Diskettes
- 19.13 tar: Backing Up Files
- 19.14 Installing Programs with rpm
- Summary
- Self-Test
- Exercises
- Chapter 19 System Administration
- Appendix A The C Shell—Programming Constructs
- Appendix B The Korn and Bash Shells—Exclusive Programming Constructs
- Appendix C The GNU emacs Editor
- Appendix D vi/vim Command Reference
- Appendix E The Regular Expression Superset
- Appendix F The HOWTO
- Appendix G The ASCII Character Set
- Appendix H Glossary
- Appendix I Solutions to Self-Test Questions
- Index