Want to increase your Linux productivity to get more done in less time? This practical book teaches you how to be quick and efficient at the Linux command line. You'll learn to create and run complex commands that solve real business problems, organize your files for quick access, efficiently process and retrieve information, and automate manual tasks. You'll truly understand what happens behind the shell prompt.

Efficient Linux at the Command Line teaches general best practices and the concepts behind them, so no matter which Linux tools you use, you can become more effective in your daily work and more competitive in the job market.

You'll learn:

  • How to invent powerful Linux commands on the fly that get your work done quickly
  • Which Linux features are handled by commands and which are built into the shell that launches those commands--and why it matters
  • A dozen different ways to run commands, including pipelines, subshells, command substitution, process substitution, and more--and when to use each for best advantage

Table of Contents

  1. Preface
    1. The Command-Line Skills You Need
    2. What You’ll Learn
    3. Audience and Prerequisites
    4. Conventions Used in This Book
    5. Using Code Examples
    6. O’Reilly Online Learning
    7. How to Contact Us
    8. Acknowledgments
  2. I. Core Concepts
  3. 1. Combining Commands
    1. Input, Output, and Pipes
    2. Six Commands To Get You Started
    3. Command #1: wc
    4. Command #2: head
    5. Command #3: cut
    6. Command #4: grep
    7. Command #5: sort
    8. Command #6: uniq
    9. Case Study: Detecting Duplicate Files
    10. Summary
  4. 2. Introducing the Shell
    1. Pattern Matching for Filenames
    2. Evaluating Variables
    3. Where Variables Come From
    4. Variables and Superstition
    5. Case Study: Patterns and Variables
    6. Redirecting Input and Output
    7. Disabling Evaluation with Quotes and the Escape Character
    8. Locating Programs to Be Run
    9. Environments and Init Files, the Short Version
    10. Summary
  5. 3. Rerunning Commands
    1. Viewing the Command History
    2. Recalling Commands from the History
    3. Cursoring Through History
    4. History Expansion
    5. Case Study: Never Delete the Wrong File Again
    6. Incremental Search of Command History
    7. Command-Line Editing
    8. Cursoring Within a Command
    9. History Expansion with Carets
    10. Emacs or Vim-Style Command-Line Editing
    11. Summary
  6. 4. Cruising the Filesystem
    1. Visiting Specific Directories Efficiently
    2. Jump to Your Home Directory
    3. Move Faster With Tab Completion
    4. Hop to Frequently-Visited Directories Using Aliases
    5. Make a Big Filesystem Feel Smaller with CDPATH
    6. Case Study: Organize Your Home Directory for Fast Navigation
    7. Returning to Directories Efficiently
    8. Toggle Between Two Directories With “cd -”
    9. Toggle Between Many Directories With pushd and popd
    10. Summary