A Practical Guide to Linux Commands, Editors, and Shell Programming, Fourth Edition

Book description

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

“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

Discover the Power of Linux–Covers macOS, too!

  • Learn from hundreds of realistic, high-quality examples, and become a true command-line guru
  • Covers MariaDB, DNF, and Python 3
  • 300+ page reference section covers 102 utilities, including macOS commands

For use with all popular versions of Linux, including Ubuntu,™ Fedora,™ openSUSE,™ Red Hat,® Debian, Mageia, Mint, Arch, CentOS, and macOS

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, updated with assistance from new coauthor Matthew Helmke.

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 macOS command line, including macOS-only tools and utilities that other Linux/UNIX titles ignore.

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

  • A MariaDB chapter to get you started with this ubiquitous relational database management system (RDBMS)
  • A masterful introduction to Python for system administrators and power users
  • 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 core utilities, from aspell to xargs, including printf and sshfs/curlftpfs, PLUS macOS—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, 300-plus-page command reference section covering 102 utilities, including find, grep, sort, and tar
  • Instructions for updating systems using apt-get and dnf
  • And much more, including coverage of BitTorrent, gawk, sed, find, sort, bzip2, and regular expressions

Register your product at informit.com/register for convenient access to downloads, updates, and/or corrections as they become available.

Table of contents

  1. Cover Page
  2. About This E-Book
  3. Title Page
  4. Copyright Page
  5. Dedication
  6. Brief Contents
  7. Contents
  8. Preface
  9. Chapter 1: Welcome to Linux and macOS
    1. 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!
    2. 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
    3. 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
    4. Additional Features of Linux
      1. GUIs: Graphical User Interfaces
      2. (Inter)Networking Utilities
      3. Software Development
    5. Chapter Summary
    6. Exercises
  10. Part I The Linux and macOS Operating Systems
    1. Chapter 2: Getting Started
      1. Conventions Used in This Book
      2. Logging In from a Terminal (Emulator)
      3. Working from the Command Line
        1. Which Shell Are You Running?
        2. Correcting Mistakes
        3. Repeating/Editing Command Lines
      4. su/sudo: Curbing Your Power (root Privileges)
      5. 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
      6. 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
      7. Chapter Summary
      8. Exercises
      9. Advanced Exercises
    2. Chapter 3: The Utilities
      1. Special Characters
      2. 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
      3. 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
      4. | (Pipeline): Communicates Between Processes
      5. 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 macOS Format
      6. 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
      7. Locating Utilities
        1. which and whereis: Locate a Utility
        2. locate: Searches for a File
      8. 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
      9. Communicating with Other Users
        1. write: Sends a Message
        2. mesg: Denies or Accepts Messages
      10. Email
      11. Chapter Summary
      12. Exercises
      13. Advanced Exercises
    3. Chapter 4: The Filesystem
      1. The Hierarchical Filesystem
      2. Directory Files and Ordinary Files
        1. Filenames
        2. The Working Directory
        3. Your Home Directory
      3. Pathnames
        1. Absolute Pathnames
        2. Relative Pathnames
      4. 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
      5. Access Permissions
        1. ls –l: Displays Permissions
        2. chmod: Changes Access Permissions
        3. Setuid and Setgid Permissions
        4. Directory Access Permissions
      6. ACLs: Access Control Lists
        1. Enabling ACLs
        2. Working with Access Rules
        3. Setting Default Rules for a Directory
      7. Links
        1. Hard Links
        2. Symbolic Links
        3. rm: Removes a Link
        4. Dereferencing Symbolic Links
      8. Chapter Summary
      9. Exercises
      10. Advanced Exercises
    4. Chapter 5: The Shell
      1. Special Characters
      2. Ordinary Files and Directory Files
        1. The Working Directory
        2. Your Home Directory
      3. The Command Line
        1. A Simple Command
        2. Syntax
        3. Simple Commands
        4. Processing the Command Line
        5. Executing a Command
        6. Editing the Command Line
      4. 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
        5. Lists
      5. Running a Command in the Background
      6. Filename Generation/Pathname Expansion
        1. The ? Special Character
        2. The * Special Character
        3. The [ ] Special Characters
      7. Builtins
      8. Chapter Summary
        1. Utilities and Builtins Introduced in This Chapter
      9. Exercises
      10. Advanced Exercises
  11. Part II The Editors
    1. Chapter 6: The vim Editor
      1. History
      2. 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
      3. 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
      4. 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
      5. Input Mode
        1. Inserting Text
        2. Appending Text
        3. Opening a Line for Text
        4. Replacing Text
        5. Quoting Special Characters in Input Mode
      6. Command Mode: Deleting and Changing Text
        1. Undoing Changes
        2. Deleting Characters
        3. Deleting Text
        4. Changing Text
        5. Replacing Text
        6. Changing Case
      7. Searching and Substituting
        1. Searching for a Character
        2. Searching for a String
        3. Substituting One String for Another
      8. Miscellaneous Commands
        1. Join
        2. Status
        3. . (Period)
      9. Copying, Moving, and Deleting Text
        1. The General-Purpose Buffer
        2. Named Buffers
        3. Numbered Buffers
      10. Reading and Writing Files
        1. Reading Files
        2. Writing Files
        3. Identifying the Current File
      11. Setting Parameters
        1. Setting Parameters from Within vim
        2. Setting Parameters in a Startup File
        3. The .vimrc Startup File
        4. Parameters
      12. Advanced Editing Techniques
        1. Using Markers
        2. Editing Other Files
        3. Macros and Shortcuts
        4. Executing Shell Commands from Within vim
      13. Units of Measure
        1. Character
        2. Word
        3. Blank-Delimited Word
        4. Line
        5. Sentence
        6. Paragraph
        7. Screen (Window)
        8. Repeat Factor
      14. Chapter Summary
      15. Exercises
      16. Advanced Exercises
    2. Chapter 7: The emacs Editor
      1. History
        1. Evolution
        2. emacs Versus vim
      2. 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
      3. 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
      4. Online Help
      5. 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
      6. 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
      7. Customizing emacs
        1. The .emacs Startup File
        2. Remapping Keys
        3. A Sample .emacs File
      8. More Information
        1. Access to emacs
      9. Chapter Summary
      10. Exercises
      11. Advanced Exercises
  12. Part III The Shells
    1. Chapter 8: The Bourne Again Shell (bash)
      1. Background
      2. 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
      3. Commands That Are Symbols
      4. Redirecting Standard Error
      5. 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
      6. 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. ( ) Groups Commands
        5. \ Continues a Command
      7. 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
      8. 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
      9. Parameters and Variables
        1. User-Created Variables
        2. Variable Attributes
        3. Keyword Variables
      10. Special Characters
      11. Locale
      12. Time
      13. Processes
        1. Process Structure
        2. Process Identification
        3. Executing a Command
      14. History
        1. Variables That Control History
        2. Reexecuting and Editing Commands
        3. The Readline Library
      15. Aliases
        1. Single Versus Double Quotation Marks in Aliases
        2. Examples of Aliases
      16. Functions
      17. Controlling bash: Features and Options
        1. bash Command-Line Options
        2. Shell Features
      18. Processing the Command Line
        1. History Expansion
        2. Alias Substitution
        3. Parsing and Scanning the Command Line
        4. Command-Line Expansion
      19. Chapter Summary
      20. Exercises
      21. Advanced Exercises
    2. Chapter 9: The TC Shell (tcsh)
      1. Shell Scripts
      2. Entering and Leaving the TC Shell
        1. Startup Files
      3. 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
      4. Redirecting Standard Error
      5. Working with the Command Line
        1. Word Completion
        2. Editing the Command Line
        3. Correcting Spelling
      6. Variables
        1. Variable Substitution
        2. String Variables
        3. Arrays of String Variables
        4. Numeric Variables
        5. Braces
        6. Special Variable Forms
        7. tcsh Variables
      7. Control Structures
        1. if
        2. goto
        3. Interrupt Handling
        4. if...then...else
        5. foreach
        6. while
        7. break and continue
        8. switch
      8. Builtins
      9. Chapter Summary
      10. Exercises
      11. Advanced Exercises
  13. Part IV Programming Tools
    1. Chapter 10: Programming the Bourne Again Shell (bash)
      1. 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
      2. 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
      3. Parameters
        1. Positional Parameters
        2. Special Parameters
      4. Variables
        1. Shell Variables
        2. Environment, Environment Variables, and Inheritance
        3. Expanding Null and Unset Variables
        4. Array Variables
        5. Variables in Functions
      5. 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
      6. Expressions
        1. Arithmetic Evaluation
        2. Logical Evaluation (Conditional Expressions)
        3. String Pattern Matching
        4. Arithmetic Operators
      7. Implicit Command-Line Continuation
      8. Shell Programs
        1. A Recursive Shell Script
        2. The quiz Shell Script
      9. Chapter Summary
      10. Exercises
      11. Advanced Exercises
    2. Chapter 11: The Perl Scripting Language
      1. Introduction to Perl
        1. More Information
        2. Help
        3. perldoc
        4. Terminology
        5. Running a Perl Program
        6. Syntax
      2. Variables
        1. Scalar Variables
        2. Array Variables
        3. Hash Variables
      3. Control Structures
        1. if/unless
        2. if...else
        3. if...elsif...else
        4. foreach/for
        5. last and next
        6. while/until
      4. Working with Files
      5. Sort
      6. Subroutines
      7. Regular Expressions
        1. Syntax and the =~ Operator
      8. CPAN Modules
      9. Examples
      10. Chapter Summary
      11. Exercises
      12. Advanced Exercises
    3. Chapter 12: The Python Programming Language
      1. Introduction
        1. Invoking Python
        2. More Information
        3. Writing to Standard Output and Reading from Standard Input
        4. Functions and Methods
      2. Scalar Variables, Lists, and Dictionaries
        1. Scalar Variables
        2. Lists
        3. Dictionaries
      3. Control Structures
        1. if
        2. if...else
        3. if...elif...else
        4. while
        5. for
      4. Reading from and Writing to Files
        1. File Input and Output
        2. Exception Handling
        3. Pickle
      5. Regular Expressions
      6. Defining a Function
      7. 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
      8. Lambda Functions
      9. List Comprehensions
      10. Chapter Summary
      11. Exercises
      12. Advanced Exercises
    4. Chapter 13: The MariaDB SQL Database Management System
      1. History
      2. Notes
        1. Syntax and Conventions
        2. More Information
      3. Installing a MariaDB Server and Client
        1. Fedora/RHEL (Red Hat Enterprise Linux)
        2. Debian/Ubuntu/Mint
        3. openSUSE
        4. macOS
      4. Client Options
      5. Setting Up MariaDB
        1. Assigning a Password to the MariaDB User Named root
        2. Removing Anonymous Users
        3. Running the Secure Installation Script
        4. ~/.my.cnf: Configures a MariaDB Client
        5. ~/.mysql_history: Stores Your MariaDB 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. Chapter 14: The AWK Pattern Processing Language
      1. Syntax
      2. Arguments
      3. Options
      4. Notes
      5. Language Basics
        1. Patterns
        2. Actions
        3. Comments
        4. Variables
        5. Functions
        6. Arithmetic Operators
        7. Associative Arrays
        8. printf
        9. Control Structures
      6. Examples
      7. Advanced gawk Programming
        1. getline: Controlling Input
        2. Coprocess: Two-Way I/O
        3. Getting Input from a Network
      8. Chapter Summary
      9. Exercises
      10. Advanced Exercises
    6. Chapter 15: The sed Editor
      1. Syntax
      2. Arguments
      3. Options
      4. Editor Basics
        1. Addresses
        2. Instructions
        3. Control Structures
        4. The Hold Space
      5. Examples
      6. Chapter Summary
      7. Exercises
  14. Part V Secure Network Utilities
    1. Chapter 16: The rsync Secure Copy Utility
      1. Syntax
      2. Arguments
      3. Options
        1. Notes
        2. More Information
      4. 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
      5. Chapter Summary
      6. Exercises
    2. Chapter 17: The OpenSSH Secure Communication Utilities
      1. Introduction to OpenSSH
        1. Files
        2. More Information
      2. Running the ssh, scp , and sftp OpenSSH Clients
        1. Prerequisites
        2. JumpStart I: Using ssh and scp to Connect to an OpenSSH Server
        3. Configuring OpenSSH Clients
        4. ssh: Logs in or Executes Commands on a Remote System
        5. scp: Copies Files to and from a Remote System
        6. sftp: A Secure FTP Client
        7. ~/.ssh/config and /etc/ssh/ssh_config Configuration Files
      3. Setting Up an OpenSSH Server (sshd)
        1. Prerequisites
        2. Note
        3. JumpStart II: Starting an OpenSSH Server
        4. Authorized Keys: Automatic Login
        5. Randomart Image
        6. ssh-agent: Holds Your Private Keys
        7. Command-Line Options
        8. /etc/ssh/sshd_config Configuration File
      4. Troubleshooting
      5. Tunneling/Port Forwarding
        1. Forwarding X11
        2. Port Forwarding
      6. Chapter Summary
      7. Exercises
      8. Advanced Exercises
  15. Part VI 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
      1. sample Brief description of what the utility does
      2. aspell Checks a file for spelling errors
      3. at Executes commands at a specified time
      4. busybox Implements many standard utilities
      5. bzip2 Compresses or decompresses files
      6. cal Displays a calendar
      7. cat Joins and displays files
      8. cd Changes to another working directory
      9. chgrp Changes the group associated with a file
      10. chmod Changes the access mode (permissions) of a file
      11. chown Changes the owner of a file and/or the group the file is associated with
      12. cmp Compares two files
      13. comm Compares sorted files
      14. configure Configures source code automatically
      15. cp Copies files
      16. cpio Creates an archive, restores files from an archive, or copies a directory hierarchy
      17. crontab Maintains crontab files
      18. cut Selects characters or fields from input lines
      19. date Displays or sets the system time and date
      20. dd Converts and copies a file
      21. df Displays disk space usage
      22. diff Displays the differences between two text files
      23. diskutil Checks, modifies, and repairs local volumes
      24. ditto Copies files and creates and unpacks archives
      25. dmesg Displays kernel messages
      26. dscl Displays and manages Directory Service information
      27. du Displays information on disk usage by directory hierarchy and/or file
      28. echo Displays a message
      29. expand/unexpand Converts TABs to SPACEs and SPACEs to TABs
      30. expr Evaluates an expression
      31. file Displays the classification of a file
      32. find Finds files based on criteria
      33. finger Displays information about users
      34. fmt Formats text very simply
      35. fsck Checks and repairs a filesystem
      36. ftp Transfers files over a network
      37. gawk Searches for and processes patterns in a file
      38. gcc Compiles C and C++ programs
      39. GetFileInfo Displays file attributes
      40. grep Searches for a pattern in files
      41. gzip Compresses or decompresses files
      42. head Displays the beginning of a file
      43. join Joins lines from two files based on a common field
      44. kill Terminates a process by PID
      45. killall Terminates a process by name
      46. launchctl Controls the launchd daemon
      47. less Displays text files, one screen at a time
      48. ln Makes a link to a file
      49. lpr Sends files to printers
      50. ls Displays information about one or more files
      51. make Keeps a set of programs current
      52. man Displays documentation for utilities
      53. mc Manages files in a textual environment (aka Midnight Commander)
      54. mkdir Creates a directory
      55. mkfs Creates a filesystem on a device
      56. mv Renames or moves a file
      57. nice Changes the priority of a command
      58. nl Numbers lines from a file
      59. nohup Runs a command that keeps running after you log out
      60. od Dumps the contents of a file
      61. open Opens files, directories, and URLs
      62. otool Displays object, library, and executable files
      63. paste Joins corresponding lines from files
      64. pax Creates an archive, restores files from an archive, or copies a directory hierarchy
      65. plutil Manipulates property list files
      66. pr Paginates files for printing
      67. printf Formats string and numeric data
      68. ps Displays process status
      69. renice Changes the priority of a process
      70. rm Removes a file (deletes a link)
      71. rmdir Removes directories
      72. rsync Securely copies files and directory hierarchies over a network
      73. scp Securely copies one or more files to or from a remote system
      74. screen Manages several textual windows
      75. sed Edits a file noninteractively
      76. SetFile Sets file attributes
      77. sleep Creates a process that sleeps for a specified interval
      78. sort Sorts and/or merges files
      79. split Divides a file into sections
      80. ssh Securely runs a program or opens a shell on a remote system
      81. sshfs/curlftpfs Mounts a directory on an OpenSSH or FTP server as a local directory
      82. stat Displays information about files
      83. strings Displays strings of printable characters from files
      84. stty Displays or sets terminal parameters
      85. sysctl Displays and alters kernel variables at runtime
      86. tail Displays the last part (tail) of a file
      87. tar Stores or retrieves files to/from an archive file
      88. tee Copies standard input to standard output and one or more files
      89. telnet Connects to a remote computer over a network
      90. test Evaluates an expression
      91. top Dynamically displays process status
      92. touch Creates a file or changes a file’s access and/or modification time
      93. tr Replaces specified characters
      94. tty Displays the terminal pathname
      95. tune2fs Changes parameters on an ext2, ext3, or ext4 filesystem
      96. umask Specifies the file-creation permissions mask
      97. uniq Displays unique lines from a file
      98. w Displays information about local system users
      99. wc Displays the number of lines, words, and bytes in one or more files
      100. which Shows where in PATH a utility is located
      101. who Displays information about logged-in users
      102. xargs Converts standard input to command lines
  16. Part VII Appendixes
    1. Appendix 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. Appendix B Help
      1. Solving a Problem
      2. Finding Linux and macOS Related Information
        1. Mailing Lists
      3. Specifying a Terminal
    3. Appendix C Keeping the System Up-to-Date
      1. Using dnf
        1. Using dnf to Install, Remove, and Update Packages
        2. Other dnf Commands
        3. dnf Groups
        4. Downloading rpm Package Files Using dnf download
        5. Configuring dnf
      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. Using apt Commands
        5. Repositories
        6. sources.list: Specifies Repositories for apt-get to Search
      3. BitTorrent
    4. Appendix D macOS 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. macOS Implementation of Linux Features
  17. Glossary
  18. File Tree Index
  19. Utility Index
  20. Main Index

Product information

  • Title: A Practical Guide to Linux Commands, Editors, and Shell Programming, Fourth Edition
  • Author(s): Mark G. Sobell, Matthew Helmke
  • Release date: November 2017
  • Publisher(s): Pearson
  • ISBN: 9780134774626