The Linux Command Line, 2nd Edition: A Complete IntroductionYou've experienced the shiny, point-and-click surface of your Linux computer--now dive below and explore its depths with the power of the command line. The Linux Command Line takes you from your very first terminal keystrokes to writing full programs in Bash, the most popular Linux shell (or command line). Along the way you'll learn the timeless skills handed down by generations of experienced, mouse-shunning gurus: file navigation, environment configuration, command chaining, pattern matching with regular expressions, and more. In addition to that practical knowledge, author William Shotts reveals the philosophy behind these tools and the rich heritage that your desktop Linux machine has inherited from Unix supercomputers of yore. As you make your way through the book's short, easily-digestible chapters, you'll learn how to: • Create and delete files, directories, and symlinks • Administer your system, including networking, package installation, and process management • Use standard input and output, redirection, and pipelines • Edit files with Vi, the world's most popular text editor • Write shell scripts to automate common or boring tasks • Slice and dice text files with cut, paste, grep, patch, and sed Once you overcome your initial "shell shock," you'll find that the command line is a natural and expressive way to communicate with your computer. Just don't be surprised if your mouse starts to gather dust. |
Contents
5 | |
7 | |
12 | |
23 | |
InCreate Links | 30 |
Summing Up | 37 |
Working with Commands | 39 |
Creating Our Own Commands with alias | 46 |
Comparing Text | 262 |
Summing Up | 278 |
Formatting Output | 279 |
Document Formatting Systems | 290 |
Printing | 297 |
Compiling Programs | 309 |
226 | 312 |
WRITING SHELL SCRIPTS | 321 |
Redirecting Standard Error | 52 |
Seeing the World as the Shell Sees It | 61 |
Summing Up | 71 |
Using History | 77 |
Permissions | 81 |
Changing Identities | 91 |
Changing Your Password | 97 |
Processes | 99 |
Controlling Processes | 104 |
Shutting Down the System | 110 |
The Environment | 115 |
What Is Stored in the Environment? | 116 |
12 | 127 |
Editing Multiple Files | 139 |
Customizing the Prompt | 145 |
Saving the Prompt | 151 |
Storage Media | 165 |
Networking | 181 |
Summing Up | 193 |
Searching for Files | 195 |
Summing | 208 |
Archiving and Backup | 209 |
Regular Expressions | 225 |
POSIX Character Classes | 231 |
Putting Regular Expressions to Work | 239 |
Text Processing | 245 |
Slicing and Dicing | 256 |
Writing Your First Script | 323 |
Starting a Project | 329 |
Here Documents | 336 |
TopDown Design | 339 |
Using test | 352 |
Flow Control Branching with it | 355 |
Reading Keyboard Input | 363 |
Validating Input | 370 |
Flow Control Looping with whileuntil | 375 |
Troubleshooting | 383 |
Logical Errors | 387 |
Summing | 394 |
Flow Control Branching with case | 395 |
Summing | 400 |
Positional Parameters | 401 |
Flow Control Looping with for | 413 |
Strings and Numbers | 419 |
Arithmetic Evaluation and Expansion | 427 |
bcAn Arbitrary Precision Calculator Language | 434 |
Arrays | 437 |
Array Operations | 441 |
Exotica | 447 |
Traps 453 | 453 |
459 | |
470 | |
Other editions - View all
Common terms and phrases
action addition allows arguments array assigned bash beginning called chapter character command line common configuration contains contents copy create cursor default delete device display distribution document echo editing enter error example executed exists exit expansion expression Fedora field filename format function grep input installed Linux look loop match me@linuxbox means mode move multiple Note operator option output owner package parameter pathname perform playground position possible printer problem produce prompt provides regular expression remote root root root script shell shell scripts simple single sort spaces specified standard string SUSE symbolic Table tasks terminal things Ubuntu Unix variable write