You are previewing A Practical Guide to Linux® Commands, Editors, and Shell Programming, Third Edition.
O'Reilly logo
A Practical Guide to Linux® Commands, Editors, and Shell Programming, Third Edition

Book Description

“First Sobell taught people how to use Linux . . . now he teaches you the power of Linux. A must-have book for anyone who wants to take Linux to the next level.” –Jon “maddog” Hall, Executive Director, Linux International 

New Chapters on Python and MySQLCovers Perl, too!

  • Learn from hundreds of realistic, high-quality examples, and become a true Linux command-line guru!

  • NEW! Covers busybox, Midnight Commander, screen, and sshfs/curlftpf

  • Covers the Mac OS X command line and its unique tools

  • 295-page reference covers 98 utilities, including Mac OS X commands! 

  • For use with all popular versions of Linux, including Ubuntu™, Fedora™, openSUSE™, Red Hat®, Debian, Mageia, Mint, Arch, CentOS, and Mac OS X, too!

    The Most Useful Tutorial and Reference, with Hundreds of High-Quality Examples for Every Popular Linux Distribution

    Linux is today’s dominant Internet server platform. System administrators and Web developers need deep Linux fluency, including expert knowledge of shells and the command line. This is the only guide with everything you need to achieve that level of Linux mastery. Renowned Linux expert Mark Sobell has brought together comprehensive, insightful guidance on the tools sysadmins, developers, and power users need most, and has created an outstanding day-to-day reference.

    This title is 100 percent distribution and release agnostic. Packed with hundreds of high-quality, realistic examples, it presents Linux from the ground up: the clearest explanations and most useful information about everything from filesystems to shells, editors to utilities, and programming tools to regular expressions.

    Use a Mac? You’ll find coverage of the Mac OS X command line, including OS X-only tools and utilities other Linux/UNIX titles ignore. Sobell presents a new MySQL chapter. There’s even an expert introduction to Python–today’s most valuable tool for automating complex, time-consuming administration tasks.

    A Practical Guide to Linux® Commands, Editors, and Shell Programming, Third Edition, is the only guide to deliver 

  • A MySQL chapter to get you started with this ubiquitous relational database management system (RDBMS)

  • A masterful introduction to Python for system administrators and power users

  • New coverage of the busybox single binary collection of utilities, the screen terminal session manager/multiplexer, and the mc (Midnight Commander) textual file manager, plus a new chapter on using ssh for secure communication

  • In-depth coverage of the bash and tcsh shells, including a complete discussion of environment, inheritance, and process locality, plus coverage of basic and advanced shell programming

  • Practical explanations of 98 core utilities, from aspell to xargs, including printf and sshfs/curlftpfs, PLUS Mac OS X-specific utilities from ditto to SetFile

  • Expert guidance on automating remote backups using rsync

  • Dozens of system security tips, including step-by-step walkthroughs of implementing secure communications using ssh and scp

  • Tips and tricks for customizing the shell, including step values, sequence expressions, the eval builtin, and implicit command-line continuation

  • High-productivity editing techniques using vim and emacs

  • A comprehensive, 295-page command reference section covering 98 utilities, including find, grep, sort, and tar

  • Instructions for updating systems using apt-get and yum

  • And much more, including coverage of BitTorrent, gawk, sed, find, sort, bzip2, and regular expressions

  • Table of Contents

    1. Title Page
    2. Copyright Page
    3. Praise for Previous Editions of A Practical Guide to Linux® Commands, Editors, and Shell Programming
    4. Praise for Other Books by Mark G. Sobell
    5. Dedication Page
    6. Brief Contents
    7. Contents
    8. Preface
      1. Features of This Book
      2. Contents
        1. Part I: The Linux and Mac OS X Operating Systems
        2. Part II: The Editors
        3. Part III: The Shells
        4. Part IV: Programming Tools
        5. Part V: Secure Network Utilities
        6. Part VI: Command Reference
        7. Part VII: Appendixes
      3. Supplements
      4. Thanks
    9. 1. Welcome to Linux and Mac OS X
      1. Objectives
      2. The History of UNIX and GNU–Linux
        1. The Heritage of Linux: UNIX
        2. Fade to 1983
        3. Next Scene, 1991
        4. The Code Is Free
        5. Have Fun!
      3. What Is So Good About Linux?
        1. Why Linux Is Popular with Hardware Companies and Developers
        2. Linux Is Portable
        3. The C Programming Language
      4. Overview of Linux
        1. Linux Has a Kernel Programming Interface
        2. Linux Can Support Many Users
        3. Linux Can Run Many Tasks
        4. Linux Provides a Secure Hierarchical Filesystem
        5. The Shell: Command Interpreter and Programming Language
        6. A Large Collection of Useful Utilities
        7. Interprocess Communication
        8. System Administration
      5. Additional Features of Linux
        1. GUIs: Graphical User Interfaces
        2. (Inter)Networking Utilities
        3. Software Development
      6. Chapter Summary
      7. Exercises
    10. Part I. The Linux and Mac OS X Operating Systems
      1. 2. Getting Started
        1. Objectives
        2. Conventions Used in This Book
        3. Logging In from a Terminal (Emulator)
        4. Working from the Command Line
          1. Which Shell Are You Running?
          2. Correcting Mistakes
          3. Repeating/Editing Command Lines
        5. su/sudo: Curbing Your Power (root Privileges)
        6. Where to Find Documentation
          1. man: Displays the System Manual
          2. apropos: Searches for a Keyword
          3. info: Displays Information About Utilities
          4. The ––help Option
          5. The bash help Command
          6. Getting Help
        7. More About Logging In and Passwords
          1. What to Do If You Cannot Log In
          2. Logging In Remotely: Terminal Emulators, ssh, and Dial-Up Connections
          3. Using Virtual Consoles
          4. Logging Out
          5. Changing Your Password
        8. Chapter Summary
        9. Exercises
        10. Advanced Exercises
      2. 3. The Utilities
        1. Objectives
        2. Special Characters
        3. Basic Utilities
          1. ls: Lists the Names of Files
          2. cat: Displays a Text File
          3. rm: Deletes a File
          4. less Is more: Display a Text File One Screen at a Time
          5. hostname: Displays the System Name
        4. Working with Files
          1. cp: Copies a File
          2. mv: Changes the Name of a File
          3. lpr: Prints a File
          4. grep: Searches for a String
          5. head: Displays the Beginning of a File
          6. tail: Displays the End of a File
          7. sort: Displays a File in Order
          8. uniq: Removes Duplicate Lines from a File
          9. diff: Compares Two Files
          10. file: Identifies the Contents of a File
        5. | (Pipeline): Communicates Between Processes
        6. Four More Utilities
          1. echo: Displays Text
          2. date: Displays the Time and Date
          3. script: Records a Shell Session
          4. unix2dos: Converts Linux Files to Windows and Macintosh OS X Format
        7. Compressing and Archiving Files
          1. bzip2: Compresses a File
          2. bzcat and bunzip2: Decompress a File
          3. gzip: Compresses a File
          4. tar: Packs and Unpacks Archives
        8. Locating Utilities
          1. which and whereis: Locate a Utility
          2. locate: Searches for a File
        9. Displaying User and System Information
          1. who: Lists Users on the System
          2. finger: Lists Users on the System
          3. uptime: Displays System Load and Duration Information
          4. w: Lists Users on the System
          5. free: Displays Memory Usage Information
        10. Communicating with Other Users
          1. write: Sends a Message
          2. mesg: Denies or Accepts Messages
        11. Email
        12. Chapter Summary
        13. Exercises
        14. Advanced Exercises
      3. 4. The Filesystem
        1. Objectives
        2. The Hierarchical Filesystem
        3. Directory Files and Ordinary Files
          1. Filenames
          2. The Working Directory
          3. Your Home Directory
        4. Pathnames
          1. Absolute Pathnames
          2. Relative Pathnames
        5. Working with Directories
          1. mkdir: Creates a Directory
          2. cd: Changes to Another Working Directory
          3. rmdir: Deletes a Directory
          4. Using Pathnames
          5. mv, cp: Move or Copy Files
          6. mv: Moves a Directory
          7. Important Standard Directories and Files
        6. Access Permissions
          1. ls –l: Displays Permissions
          2. chmod: Changes Access Permissions
          3. Setuid and Setgid Permissions
          4. Directory Access Permissions
        7. ACLs: Access Control Lists
          1. Enabling ACLs
          2. Working with Access Rules
          3. Setting Default Rules for a Directory
        8. Links
          1. Symbolic Links
          2. rm: Removes a Link
          3. Dereferencing Symbolic Links
        9. Chapter Summary
        10. Exercises
        11. Advanced Exercises
      4. 5. The Shell
        1. Objectives
        2. The Command Line
          1. A Simple Command
          2. Syntax
          3. Processing the Command Line
          4. Executing a Command
          5. Editing the Command Line
        3. Standard Input and Standard Output
          1. The Screen as a File
          2. The Keyboard and Screen as Standard Input and Standard Output
          3. Redirection
          4. Pipelines
        4. Running a Command in the Background
          1. Moving a Job from the Foreground to the Background
          2. kill: Aborting a Background Job
        5. Filename Generation/Pathname Expansion
          1. The ? Special Character
          2. The * Special Character
          3. The [ ] Special Characters
        6. Builtins
        7. Chapter Summary
          1. Utilities and Builtins Introduced in This Chapter
        8. Exercises
        9. Advanced Exercises
    11. Part II. The Editors
      1. 6. The vim Editor
        1. Objectives
        2. History
        3. Tutorial: Using vim to Create and Edit a File
          1. Starting vim
          2. Command and Input Modes
          3. Entering Text
          4. Getting Help
          5. Ending the Editing Session
          6. The compatible Parameter
        4. Introduction to vim Features
          1. Online Help
          2. Terminology
          3. Modes of Operation
          4. The Display
          5. Correcting Text as You Insert It
          6. Work Buffer
          7. Line Length and File Size
          8. Windows
          9. File Locks
          10. Abnormal Termination of an Editing Session
          11. Recovering Text After a Crash
        5. Command Mode: Moving the Cursor
          1. Moving the Cursor by Characters
          2. Moving the Cursor to a Specific Character
          3. Moving the Cursor by Words
          4. Moving the Cursor by Lines
          5. Moving the Cursor by Sentences and Paragraphs
          6. Moving the Cursor Within the Screen
          7. Viewing Different Parts of the Work Buffer
        6. Input Mode
          1. Inserting Text
          2. Appending Text
          3. Opening a Line for Text
          4. Replacing Text
          5. Quoting Special Characters in Input Mode
        7. Command Mode: Deleting and Changing Text
          1. Undoing Changes
          2. Deleting Characters
          3. Deleting Text
          4. Changing Text
          5. Replacing Text
          6. Changing Case
        8. Searching and Substituting
          1. Searching for a Character
          2. Searching for a String
          3. Substituting One String for Another
        9. Miscellaneous Commands
          1. Join
          2. Status
          3. . (Period)
        10. Copying, Moving, and Deleting Text
          1. The General-Purpose Buffer
        11. Reading and Writing Files
          1. Reading Files
          2. Writing Files
          3. Identifying the Current File
        12. Setting Parameters
          1. Setting Parameters from Within vim
          2. Setting Parameters in a Startup File
          3. The .vimrc Startup File
          4. Parameters
        13. Advanced Editing Techniques
          1. Executing Shell Commands from Within vim
        14. Units of Measure
          1. Character
          2. Word
          3. Blank-Delimited Word
          4. Line
          5. Sentence
          6. Paragraph
          7. Screen (Window)
          8. Repeat Factor
        15. Chapter Summary
        16. Exercises
        17. Advanced Exercises
      2. 7. The emacs Editor
        1. Objectives
        2. History
          1. Evolution
          2. emacs Versus vim
        3. Tutorial: Getting Started with emacs
          1. Starting emacs
          2. Exiting
          3. Inserting Text
          4. Deleting Characters
          5. Moving the Cursor
          6. Editing at the Cursor Position
          7. Saving and Retrieving the Buffer
        4. Basic Editing Commands
          1. Keys: Notation and Use
          2. Key Sequences and Commands
          3. META-x: Running a Command Without a Key Binding
          4. Numeric Arguments
          5. Point and the Cursor
          6. Scrolling Through a Buffer
          7. Erasing Text
          8. Searching for Text
          9. Using the Menubar from the Keyboard
        5. Online Help
        6. Advanced Editing
          1. Undoing Changes
          2. Point, Mark, and Region
          3. Cut and Paste: Yanking Killed Text
          4. Inserting Special Characters
          5. Global Buffer Commands
          6. Visiting and Saving Files
          7. Buffers
          8. Windows
          9. Foreground Shell Commands
          10. Background Shell Commands
        7. Major Modes: Language-Sensitive Editing
          1. Selecting a Major Mode
          2. Human-Language Modes
          3. C Mode
          4. Customizing Indention
          5. Comments
          6. Special-Purpose Modes
        8. More Information
          1. Access to emacs
        9. Chapter Summary
        10. Exercises
        11. Advanced Exercises
    12. Part III. The Shells
      1. 8. The Bourne Again Shell (bash)
        1. Objectives
        2. Background
        3. Startup Files
          1. Login Shells
          2. Interactive Nonlogin Shells
          3. Noninteractive Shells
          4. Setting Up Startup Files
          5. . (Dot) or source: Runs a Startup File in the Current Shell
        4. Commands That Are Symbols
        5. Redirecting Standard Error
        6. Writing and Executing a Simple Shell Script
          1. chmod: Makes a File Executable
          2. #! Specifies a Shell
          3. # Begins a Comment
          4. Executing a Shell Script
        7. Control Operators: Separate and Group Commands
          1. ; and NEWLINE Separate Commands
          2. | and & Separate Commands and Do Something Else
          3. && and || Boolean Control Operators
          4. \ Continues a Command
        8. Job Control
          1. jobs: Lists Jobs
          2. fg: Brings a Job to the Foreground
          3. Suspending a Job
          4. bg: Sends a Job to the Background
        9. Manipulating the Directory Stack
          1. dirs: Displays the Stack
          2. pushd: Pushes a Directory on the Stack
          3. popd: Pops a Directory Off the Stack
        10. Parameters and Variables
          1. User-Created Variables
          2. Variable Attributes
          3. Keyword Variables
        11. Special Characters
        12. Locale
          1. LC_: Locale Variables
          2. locale: Displays Locale Information
          3. Setting the Locale
        13. Time
        14. Processes
          1. Process Structure
          2. Process Identification
          3. Executing a Command
        15. History
          1. Variables That Control History
          2. Reexecuting and Editing Commands
          3. The Readline Library
        16. Aliases
          1. Single Versus Double Quotation Marks in Aliases
          2. Examples of Aliases
        17. Functions
        18. Controlling bash: Features and Options
          1. bash Command-Line Options
          2. Shell Features
        19. Processing the Command Line
          1. History Expansion
          2. Alias Substitution
          3. Parsing and Scanning the Command Line
          4. Command-Line Expansion
        20. Chapter Summary
        21. Exercises
        22. Advanced Exercises
      2. 9. The TC Shell (tcsh)
        1. Objectives
        2. Shell Scripts
        3. Entering and Leaving the TC Shell
          1. Startup Files
        4. Features Common to the Bourne Again and TC Shells
          1. Command-Line Expansion (Substitution)
          2. Job Control
          3. Filename Substitution
          4. Manipulating the Directory Stack
          5. Command Substitution
        5. Redirecting Standard Error
        6. Working with the Command Line
          1. Word Completion
          2. Editing the Command Line
          3. Correcting Spelling
        7. Variables
          1. Variable Substitution
          2. String Variables
          3. Arrays of String Variables
          4. Numeric Variables
          5. Braces
          6. Special Variable Forms
          7. tcsh Variables
        8. Control Structures
          1. if
          2. goto
          3. Interrupt Handling
          4. if...then...else
          5. foreach
          6. while
          7. break and continue
          8. switch
        9. Builtins
        10. Chapter Summary
        11. Exercises
        12. Advanced Exercises
    13. Part IV. Programming Tools
      1. 10. Programming the Bourne Again Shell (bash)
        1. Objectives
        2. Control Structures
          1. if...then
          2. if...then...else
          3. if...then...elif
          4. for...in
          5. for
          6. while
          7. until
          8. break and continue
          9. case
          10. select
          11. Here Document
        3. File Descriptors
          1. Opening a File Descriptor
          2. Duplicating a File Descriptor
          3. File Descriptor Examples
          4. Determining Whether a File Descriptor Is Associated with the Terminal
        4. Parameters
          1. Positional Parameters
          2. Special Parameters
        5. Variables
          1. Shell Variables
          2. Environment, Environment Variables, and Inheritance
          3. Expanding Null and Unset Variables
          4. Array Variables
          5. Variables in Functions
        6. Builtin Commands
          1. type: Displays Information About a Command
          2. read: Accepts User Input
          3. exec: Executes a Command or Redirects File Descriptors
          4. trap: Catches a Signal
          5. kill: Aborts a Process
          6. eval: Scans, Evaluates, and Executes a Command Line
          7. getopts: Parses Options
          8. A Partial List of Builtins
        7. Expressions
          1. Arithmetic Evaluation
          2. Logical Evaluation (Conditional Expressions)
          3. String Pattern Matching
          4. Arithmetic Operators
        8. Implicit Command-Line Continuation
        9. Shell Programs
          1. A Recursive Shell Script
          2. The quiz Shell Script
        10. Chapter Summary
        11. Exercises
        12. Advanced Exercises
      2. 11. The Perl Scripting Language
        1. Objectives
        2. Introduction to Perl
          1. More Information
          2. Help
          3. perldoc
          4. Terminology
          5. Running a Perl Program
          6. Syntax
        3. Variables
          1. Scalar Variables
          2. Array Variables
          3. Hash Variables
        4. Control Structures
          1. if/unless
          2. if...else
          3. if...elsif...else
          4. foreach/for
          5. foreach: Syntax 1
          6. last and next
          7. foreach: Syntax 2
          8. while/until
        5. Working with Files
        6. Sort
        7. Subroutines
        8. Regular Expressions
          1. Syntax and the =~ Operator
        9. CPAN Modules
        10. Examples
        11. Chapter Summary
        12. Exercises
        13. Advanced Exercises
      3. 12. The Python Programming Language
        1. Objectives
        2. Introduction
          1. Invoking Python
          2. More Information
          3. Writing to Standard Output and Reading from Standard Input
          4. Functions and Methods
        3. Scalar Variables, Lists, and Dictionaries
          1. Scalar Variables
          2. Lists
          3. Dictionaries
        4. Control Structures
          1. if
          2. if...else
          3. if...elif...else
          4. while
          5. for
        5. Reading from and Writing to Files
          1. File Input and Output
          2. Exception Handling
          3. Pickle
        6. Regular Expressions
        7. Defining a Function
        8. Using Libraries
          1. Standard Library
          2. Nonstandard Libraries
          3. SciPy and NumPy Libraries
          4. Namespace
          5. Importing a Module
          6. Example of Importing a Function
        9. Chapter Summary
        10. Exercises
        11. Advanced Exercises
      4. 13. The MySQL Database Management System
        1. Objectives
        2. Notes
          1. Terminology
          2. Syntax and Conventions
          3. More Information
        3. Installing a MySQL Server and Client
          1. Fedora/RHEL (Red Hat Enterprise Linux)
          2. Debian/Ubuntu/Mint
          3. openSUSE
          4. OS X
        4. Client Options
        5. Setting Up MySQL
          1. Assigning a Password to the MySQL User Named root
          2. Removing Anonymous Users
          3. Running the Secure Installation Script
          4. ~/.my.cnf: Configures a MySQL Client
          5. ~/.mysql_history: Stores Your MySQL History
        6. Creating a Database
        7. Adding a User
        8. Examples
          1. Logging In
          2. Creating a Table
          3. Adding Data
          4. Retrieving Data
          5. Backing Up a Database
          6. Modifying Data
          7. Creating a Second Table
          8. Joins
        9. Chapter Summary
        10. Exercises
      5. 14. The AWK Pattern Processing Language
        1. Objectives
        2. Syntax
        3. Arguments
        4. Options
        5. Notes
        6. Language Basics
          1. Patterns
          2. Actions
          3. Comments
          4. Variables
          5. Functions
          6. Arithmetic Operators
          7. Associative Arrays
          8. printf
          9. Control Structures
        7. Examples
        8. Chapter Summary
        9. Exercises
        10. Advanced Exercises
      6. 15. The sed Editor
        1. Objectives
        2. Syntax
        3. Arguments
        4. Options
        5. Editor Basics
          1. Addresses
          2. Instructions
          3. Control Structures
          4. The Hold Space
        6. Examples
        7. Chapter Summary
        8. Exercises
    14. Part V. Secure Network Utilities
      1. 16. The rsync Secure Copy Utility
        1. Objectives
        2. Syntax
        3. Arguments
        4. Options
          1. Notes
          2. More Information
        5. Examples
          1. Using a Trailing Slash (/) on source-file
          2. Removing Files
          3. Copying Files to and from a Remote System
          4. Mirroring a Directory
          5. Making Backups
          6. Restoring a File
        6. Chapter Summary
        7. Exercises
      2. 17. The OpenSSH Secure Communication Utilities
        1. Objectives
        2. Introduction to OpenSSH
          1. How OpenSSH Works
          2. Files
          3. More Information
        3. Running the ssh, scp, and sftp OpenSSH Clients
          1. Tutorial: Using ssh and scp to Connect to an OpenSSH Server
          2. Configuring OpenSSH Clients
          3. ssh: Logs In or Executes Commands on a Remote System
          4. scp: Copies Files to and from a Remote System
          5. sftp: A Secure FTP Client
          6. ~/.ssh/config and /etc/ssh/ssh_config Configuration Files
          7. Authorized Keys: Automatic Login
          8. ssh-agent: Holds Your Private Keys
        4. Tunneling/Port Forwarding
          1. Forwarding X11
          2. Port Forwarding
        5. Chapter Summary
        6. Exercises
        7. Advanced Exercises
    15. Part VI. Command Reference
      1. Command Reference
        1. Utilities That Display and Manipulate Files
        2. Network Utilities
        3. Utilities That Display and Alter Status
        4. Utilities That Are Programming Tools
        5. Miscellaneous Utilities
        6. Standard Multiplicative Suffixes
        7. Common Options
        8. The sample Utility
        9. sample : Brief description of what the utility does.
          1. Arguments
          2. Options
          3. Discussion
          4. Notes
          5. Examples
        10. aspell: Checks a file for spelling errors
          1. Actions
          2. Arguments
          3. Options
          4. Discussion
          5. Notes
          6. Examples
        11. at: Executes commands at a specified time
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        12. busybox: Implements many standard utilities
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        13. bzip2: Compresses or decompresses files
          1. Arguments
          2. Options
          3. Discussion
          4. Notes
          5. Examples
        14. cal: Displays a calendar
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        15. cat: Joins and displays files
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        16. cd: Changes to another working directory
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        17. chgrp: Changes the group associated with a file
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        18. chmod: Changes the access mode (permissions) of a file
          1. Arguments
          2. Symbolic
          3. Absolute
          4. Options
          5. Notes
          6. Examples
        19. chown: Changes the owner of a file and/or the group the file is associated with
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        20. cmp: Compares two files
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        21. comm: Compares sorted files
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        22. configure: Configures source code automatically
          1. Options
          2. Discussion
          3. Notes
          4. Examples
        23. cp: Copies files
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        24. cpio: Creates an archive, restores files from an archive, or copies a directory hierarchy
          1. Arguments
          2. Options
          3. Discussion
          4. Examples
        25. crontab: Maintains crontab files
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        26. cut: Selects characters or fields from input lines
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        27. date: Displays or sets the system time and date
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        28. dd: Converts and copies a file
          1. Arguments
          2. Notes
          3. Examples
        29. df: Displays disk space usage
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        30. diff: Displays the differences between two text files
          1. Arguments
          2. Options
          3. Discussion
          4. Notes
          5. Examples
        31. diskutil : Checks, modifies, and repairs local volumes
          1. Arguments
          2. Notes
          3. Examples
        32. ditto : Copies files and creates and unpacks archives
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        33. dmesg: Displays kernel messages
          1. Options
          2. Discussion
          3. Notes
          4. Examples
        34. dscl : Displays and manages Directory Service information
          1. Arguments
          2. Options
          3. Commands
          4. Notes
          5. Examples
        35. du: Displays information on disk usage by directory hierarchy and/or file
          1. Arguments
          2. Options
          3. Examples
        36. echo: Displays a message
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        37. expand/unexpand: Converts TABs to SPACEs and SPACEs to TABs
          1. Arguments
          2. Options
          3. Examples
        38. expr: Evaluates an expression
          1. Arguments
          2. Notes
          3. Examples
        39. file: Displays the classification of a file
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        40. find: Finds files based on criteria
          1. Arguments
          2. Options
          3. Criteria
          4. Discussion
          5. Notes
          6. Examples
        41. finger: Displays information about users
          1. Arguments
          2. Options
          3. Discussion
          4. Notes
          5. Examples
        42. fmt: Formats text very simply
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        43. fsck: Checks and repairs a filesystem
          1. Arguments
          2. Options
          3. Notes
          4. Messages
          5. Cleanup
        44. ftp: Transfers files over a network
          1. Arguments
          2. Options
          3. Commands
          4. Notes
          5. Examples
        45. gawk: Searches for and processes patterns in a file
        46. gcc: Compiles C and C++ programs
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        47. GetFileInfo : Displays file attributes
          1. Arguments
          2. Options
          3. Discussion
          4. Notes
          5. Examples
        48. grep: Searches for a pattern in files
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        49. gzip: Compresses or decompresses files
          1. Arguments
          2. Options
          3. Discussion
          4. Notes
          5. Examples
        50. head: Displays the beginning of a file
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        51. join: Joins lines from two files based on a common field
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        52. kill: Terminates a process by PID
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        53. killall: Terminates a process by name
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        54. launchctl : Controls the launchd daemon
          1. Arguments
          2. Option
          3. Discussion
          4. Notes
          5. Examples
        55. less: Displays text files, one screen at a time
          1. Arguments
          2. Options
          3. Notes
          4. Commands
          5. Examples
        56. ln: Makes a link to a file
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        57. lpr: Sends files to printers
          1. Arguments
          2. Options
          3. Discussion
          4. Notes
          5. Examples
        58. ls: Displays information about one or more files
          1. Arguments
          2. Options
          3. Discussion
          4. Notes
          5. Examples
        59. make: Keeps a set of programs current
          1. Arguments
          2. Options
          3. Discussion
          4. Note
          5. Examples
        60. man: Displays documentation for utilities
          1. Arguments
          2. Options
          3. Discussion
          4. Notes
          5. Examples
        61. mc: Manages files in a textual environment (aka Midnight Commander)
          1. Arguments
          2. Options
          3. Notes
          4. The Display
          5. Moving the Cursor
          6. Commands
          7. Menubar
          8. Tutorial
        62. mkdir: Creates a directory
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        63. mkfs: Creates a filesystem on a device
          1. Arguments
          2. Options
          3. Filesystem Type-Specific Options
          4. Discussion
          5. Notes
          6. Examples
        64. mv: Renames or moves a file
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        65. nice: Changes the priority of a command
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        66. nl: Numbers lines from a file
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        67. nohup: Runs a command that keeps running after you log out
          1. Arguments
          2. Notes
          3. Examples
        68. od: Dumps the contents of a file
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        69. open : Opens files, directories, and URLs
          1. Arguments
          2. Options
          3. Discussion
          4. Notes
          5. Examples
        70. otool : Displays object, library, and executable files
          1. Arguments
          2. Options
          3. Discussion
          4. Notes
          5. Examples
        71. paste: Joins corresponding lines from files
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        72. pax: Creates an archive, restores files from an archive, or copies a directory hierarchy
          1. Arguments
          2. Options
          3. Discussion
          4. Notes
          5. Examples
        73. plutil : Manipulates property list files
          1. Arguments
          2. Options
          3. Discussion
          4. Notes
          5. Examples
        74. pr: Paginates files for printing
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        75. printf: Formats string and numeric data
          1. Arguments
          2. Option
          3. Notes
          4. Examples
        76. ps: Displays process status
          1. Arguments
          2. Options
          3. Discussion
          4. Notes
          5. Examples
        77. renice: Changes the priority of a process
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        78. rm: Removes a file (deletes a link)
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        79. rmdir: Removes directories
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        80. rsync: Securely copies files and directory hierarchies over a network
        81. scp: Securely copies one or more files to or from a remote system
        82. screen: Manages several textual windows
          1. Arguments
          2. Options
          3. Commands
          4. Notes
          5. Tutorial
        83. sed: Edits a file noninteractively
        84. SetFile : Sets file attributes
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        85. sleep: Creates a process that sleeps for a specified interval
          1. Arguments
          2. Examples
        86. sort: Sorts and/or merges files
          1. Arguments
          2. Options
          3. Discussion
          4. Examples
        87. split: Divides a file into sections
          1. Arguments
          2. Options
          3. Discussion
          4. Examples
        88. ssh: Securely runs a program or opens a shell on a remote system
        89. sshfs/curlftpfs: Mounts a directory on an OpenSSH or FTP server as a local directory
          1. Arguments
          2. Options
          3. Discussion
          4. Notes
          5. Examples
        90. stat: Displays information about files
          1. Arguments
          2. Options
          3. Examples
        91. strings: Displays strings of printable characters from files
          1. Arguments
          2. Options
          3. Discussion
          4. Examples
        92. stty: Displays or sets terminal parameters
          1. Options
          2. Arguments
          3. Notes
          4. Examples
        93. sysctl: Displays and alters kernel variables at runtime
          1. Arguments
          2. Options
          3. Discussion
          4. Examples
        94. tail: Displays the last part (tail) of a file
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        95. tar: Stores or retrieves files to/from an archive file
          1. Arguments
          2. Options
          3. Modifiers
          4. Notes
          5. Examples
        96. tee: Copies standard input to standard output and one or more files
          1. Arguments
          2. Options
          3. Examples
        97. telnet: Connects to a remote computer over a network
          1. Arguments
          2. Options
          3. Discussion
          4. Notes
          5. Examples
        98. test: Evaluates an expression
          1. Arguments
          2. Notes
          3. Examples
        99. top: Dynamically displays process status
          1. Options
          2. Discussion
          3. Notes
          4. Example
        100. touch: Creates a file or changes a file’s access and/or modification time
          1. Arguments
          2. Options
          3. Examples
        101. tr: Replaces specified characters
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        102. tty: Displays the terminal pathname
          1. Options
          2. Notes
          3. Examples
        103. tune2fs: Changes parameters on an ext2, ext3, or ext4 filesystem
          1. Arguments
          2. Options
          3. Discussion
          4. Examples
        104. umask: Specifies the file-creation permissions mask
          1. Arguments
          2. Option
          3. Discussion
          4. Notes
          5. Examples
        105. uniq: Displays unique lines from a file
          1. Arguments
          2. Options
          3. Examples
        106. w: Displays information about local system users
          1. Arguments
          2. Options
          3. Discussion
          4. Examples
        107. wc: Displays the number of lines, words, and bytes in one or more files
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        108. which: Shows where in PATH a utility is located
          1. Arguments
          2. Options
          3. Notes
          4. Examples
        109. who: Displays information about logged-in users
          1. Arguments
          2. Options
          3. Discussion
          4. Notes
          5. Examples
        110. xargs: Converts standard input to command lines
          1. Arguments
          2. Options
          3. Discussion
          4. Notes
          5. Examples
    16. Part VII. Appendixes
      1. A. Regular Expressions
        1. Characters
        2. Delimiters
        3. Simple Strings
        4. Special Characters
          1. Periods
          2. Brackets
          3. Asterisks
          4. Carets and Dollar Signs
          5. Quoting Special Characters
        5. Rules
          1. Longest Match Possible
          2. Empty Regular Expressions
        6. Bracketing Expressions
        7. The Replacement String
          1. Ampersand
          2. Quoted Digit
        8. Extended Regular Expressions
        9. Appendix Summary
      2. B. Help
        1. Solving a Problem
        2. Finding Linux and OS X Related Information
          1. Linux and OS X Newsgroups
          2. Mailing Lists
        3. Specifying a Terminal
      3. C. Keeping the System Up-to-Date
        1. Using yum
          1. Using yum to Install, Remove, and Update Packages
          2. Other yum Commands
          3. yum Groups
          4. Downloading rpm Package Files Using yumdownloader
          5. Configuring yum
        2. Using apt-get
          1. Using apt-get to Install, Remove, and Update Packages
          2. Using apt-get to Upgrade the System
          3. Other apt-get Commands
          4. Repositories
          5. sources.list: Specifies Repositories for apt-get to Search
        3. BitTorrent
          1. Prerequisites
          2. Using BitTorrent
      4. D. Mac OS X Notes
        1. Open Directory
        2. Filesystems
          1. Nondisk Filesystems
          2. Case Sensitivity
          3. /Volumes
        3. Extended Attributes
          1. File Forks
          2. File Attributes
          3. ACLs
        4. Activating the Terminal META Key
        5. Startup Files
        6. Remote Logins
        7. Many Utilities Do Not Respect Apple Human Interface Guidelines
        8. Installing Xcode and MacPorts
        9. Mac OS X Implementation of Linux Features
    17. Glossary
    18. File Tree Index
    19. Utility Index
    20. Main Index
    21. Add Pages