It's Been Said That Graphical User Interfaces Make Easy Tasks Easy, While Command-line Interfaces Make Difficult Tasks Possible. The Linux Command Line Shows Readers How To Control Their Computers And Accomplish These Difficult Tasks Using Bash, The Linux Shell. Designed For Command-line Users Of All Levels, The Book Takes Readers From The First Keystrokes To The Process Of Writing Powerful Programs In The Command Line's Native Language. Along The Way, The Author Explores Basic Commands And File System Navigation, Os Configuration, Classic Command-line Programs, Shell Programming, And Much More, Making The Linux Command Line An Essential Guide For All Linux Users Who Wish To Exploit The Full Power Of Their Systems-- Learning The Shell -- What Is The Shell? -- Navigation -- Exploring The System -- Manipulating Files And Directories -- Working With Commands -- Redirection -- Seeing The World As The Shell Sees It -- Advanced Keyboard Tricks -- Permissions -- Processes -- Configuration And The Environment -- The Environment -- A Gentle Introduction To Vi -- Customizing The Prompt -- Common Tasks And Essential Tools -- Package Management -- Storage Media -- Networking -- Searching For Files -- Archiving And Backup -- Regular Expressions -- Text Processing -- Formatting Output -- Printing -- Compiling Programs -- Writing Shell Scripts -- Writing Your First Script -- Starting A Project -- Top-down Design -- Flow Control: Brancing With If -- Reading Keyboard Input -- Flow Control: Looping With While And Until -- Troubleshooting -- Flow Control: Branching With Case -- Positional Parameters -- Flow Control: Looping With For -- Strings And Numbers -- Arrays -- Exotica. William E. Shotts, Jr. Includes Index. Copyright......Page 6 Brief Contents......Page 9 Contents In Detail......Page 11 Acknowledgments......Page 25 Introduction......Page 27 What This Book Is About......Page 28 What’s in This Book......Page 29 Prerequisites......Page 30 Part 1: Learning the Shell ......Page 33 Terminal Emulators......Page 35 Cursor Movement......Page 36 Try Some Simple Commands......Page 37 Ending a Terminal Session......Page 38 Understanding the Filesystem Tree......Page 39 Listing the Contents of a Directory......Page 40 Relative Pathnames......Page 41 Some Helpful Shortcuts......Page 42 More Fun with ls......Page 45 Options and Arguments......Page 46 A Longer Look at Long Format......Page 47 Determining a File’s Type with file......Page 48 Viewing File Contents with less......Page 49 A Guided Tour......Page 51 Symbolic Links......Page 54 4: Manipulating Files and Directories ......Page 57 Wildcards......Page 58 cp—Copy Files and Directories......Page 60 mv—Move and Rename Files......Page 62 rm—Remove Files and Directories......Page 63 Symbolic Links......Page 64 Copying Files......Page 65 Moving and Renaming Files......Page 66 Creating Hard Links......Page 67 Creating Symbolic Links......Page 68 Removing Files and Directories......Page 69 Final Note......Page 70 5: Working with Commands......Page 71 type—Display a Command’s Type......Page 72 help—Get Help for Shell Builtins......Page 73 man—Display a Program’s Manual Page......Page 74 apropos—Display Appropriate Commands......Page 75 info—Display a Program’s Info Entry......Page 76 README and Other Program Documentation Files......Page 77 Creating Your Own Commands with alias......Page 78 Revisiting Old Friends......Page 79 6: Redirection ......Page 81 Redirecting Standard Output......Page 82 Redirecting Standard Error......Page 83 Disposing of Unwanted Output......Page 84 Redirecting Standard Input......Page 85 Pipelines......Page 86 wc—Print Line, Word, and Byte Counts......Page 87 head/tail—Print First/Last Part of Files......Page 88 tee—Read from Stdin and Output to Stdout and Files......Page 89 Final Note......Page 90 Expansion......Page 91 Pathname Expansion......Page 92 Tilde Expansion......Page 93 Arithmetic Expansion......Page 94 Brace Expansion......Page 95 Command Substitution......Page 96 Double Quotes......Page 97 Escaping Characters......Page 99 Final Note......Page 100 8: Advanced Keyboard Tricks ......Page 101 Cutting and Pasting (Killing and Yanking) Text......Page 102 Completion......Page 104 Using History......Page 105 Searching History......Page 106 History Expansion......Page 107 Final Note......Page 108 9: Permissions ......Page 109 Owners, Group Members, and Everybody Else......Page 110 Reading, Writing, and Executing......Page 111 Octal Representation......Page 113 Symbolic Representation......Page 115 umask—Set Default Permissions......Page 116 su—Run a Shell with Substitute User and Group IDs......Page 119 sudo—Execute a Command as Another User......Page 120 chown—Change File Owner and Group......Page 122 Exercising Your Privileges......Page 123 Changing Your Password......Page 125 10: Processes ......Page 127 Viewing Processes with ps......Page 128 Viewing Processes Dynamically with top......Page 130 Controlling Processes......Page 132 Putting a Process in the Background......Page 133 Stopping (Pausing) a Process......Page 134 Sending Signals to Processes with kill......Page 135 More Process-Related Commands......Page 138 Part 2: Configuration and the Environment ......Page 139 11: The Environment ......Page 141 Examining the Environment......Page 142 Some Interesting Variables......Page 143 Login and Non-login Shells......Page 144 What’s in a Startup File?......Page 145 Text Editors......Page 147 Using a Text Editor......Page 148 Activating Our Changes......Page 150 Final Note......Page 151 12: A Gentle Introduction to vi ......Page 153 Starting and Stopping vi......Page 154 Editing Modes......Page 155 Saving Our Work......Page 156 Moving the Cursor Around......Page 157 Basic Editing......Page 158 Opening a Line......Page 159 Deleting Text......Page 160 Cutting, Copying, and Pasting Text......Page 161 Searching the Entire File......Page 163 Global Search and Replace......Page 164 Editing Multiple Files......Page 165 Opening Additional Files for Editing......Page 166 Copying Content from One File into Another......Page 167 Inserting an Entire File into Another......Page 168 Saving Our Work......Page 169 Anatomy of a Prompt......Page 171 Trying Some Alternative Prompt Designs......Page 173 Adding Color......Page 174 Moving the Cursor......Page 176 Final Note......Page 178 Part 3: Common Tasks and Essential Tools......Page 179 14: Package Management ......Page 181 Package Files......Page 182 Dependencies......Page 183 Finding a Package in a Repository......Page 184 Installing a Package from a Package File......Page 185 Upgrading a Package from a Package File......Page 186 Displaying Information About an Installed Package......Page 187 Final Note......Page 188 15: Storage Media ......Page 191 Mounting and Unmounting Storage Devices......Page 192 Viewing a List of Mounted Filesystems......Page 193 Determining Device Names......Page 196 Manipulating Partitions with fdisk......Page 199 Creating a New Filesystem with mkfs......Page 201 Testing and Repairing Filesystems......Page 202 Moving Data Directly to and from Devices......Page 203 Creating an Image from a Collection of Files......Page 204 Writing an Image......Page 205 Extra Credit......Page 206 16: Networking ......Page 207 ping—Send a Special Packet to a Network Host......Page 208 traceroute—Trace the Path of a Network Packet......Page 209 netstat—Examine Network Settings and Statistics......Page 210 ftp—Transfer Files with the File Transfer Protocol......Page 211 wget—Non-interactive Network Downloader......Page 213 ssh—Securely Log in to Remote Computers......Page 214 scp and sftp—Securely Transfer Files......Page 217 17: Searching for Files ......Page 219 locate—Find Files the Easy Way......Page 220 Tests......Page 221 Actions......Page 226 A Return to the Playground......Page 230 Options......Page 232 18: Archiving and Backup ......Page 233 gzip—Compress or Expand Files......Page 234 bzip2—Higher Compression at the Cost of Speed......Page 236 tar—Tape Archiving Utility......Page 237 zip—Package and Compress Files......Page 241 Synchronizing Files and Directories......Page 243 rsync—Remote File and Directory Synchronization......Page 244 Using rsync over a Network......Page 245 19: Regular Expressions ......Page 247 grep—Search Through Text......Page 248 Metacharacters and Literals......Page 249 The Any Character......Page 250 Anchors......Page 251 Traditional Character Ranges......Page 252 POSIX Character Classes......Page 253 POSIX Basic vs. Extended Regular Expressions......Page 256 Alternation......Page 257 ?—Match an Element Zero Times or One Time......Page 258 +—Match an Element One or More Times......Page 259 { }—Match an Element a Specific Number of Times......Page 260 Validating a Phone List with grep......Page 261 Searching for Files with locate......Page 262 Searching for Text with less and vim......Page 263 Final Note......Page 264 20: Text Processing ......Page 265 Printer Output......Page 266 cat—Concatenate Files and Print on Standard Output......Page 267 sort—Sort Lines of Text Files......Page 268 uniq—Report or Omit Repeated Lines......Page 274 cut—Remove Sections from Each Line of Files......Page 275 paste—Merge Lines of Files......Page 278 join—Join Lines of Two Files on a Common Field......Page 279 comm—Compare Two Sorted Files Line by Line......Page 281 diff—Compare Files Line by Line......Page 282 patch—Apply a diff to an Original......Page 285 tr—Transliterate or Delete Characters......Page 286 sed—Stream Editor for Filtering and Transforming Text......Page 288 aspell—Interactive Spell Checker......Page 295 Extra Credit......Page 298 21: Formatting Output ......Page 299 nl—Number Lines......Page 300 fmt—A Simple Text Formatter......Page 303 pr—Format Text for Printing......Page 306 printf—Format and Print Data......Page 307 Document Formatting Systems......Page 310 groff—A Document Formatting System......Page 311 Final Note......Page 315 22: Printing ......Page 317 Character-Based Printers......Page 318 Graphical Printers......Page 319 pr—Convert Text Files for Printing......Page 320 lpr—Print Files (Berkeley Style)......Page 322 lp—Print Files (System V Style)......Page 323 Another Option: a2ps......Page 324 lpstat—Display Print System Status......Page 326 lpq—Display Printer Queue Status......Page 327 lprm and cancel—Cancel Print Jobs......Page 328 23: Compiling Programs ......Page 329 What Is Compiling?......Page 330 Compiling a C Program......Page 331 Obtaining the Source Code......Page 332 Examining the Source Tree......Page 333 Building the Program......Page 334 Installing the Program......Page 337 Final Note......Page 338 Part 4: Writing Shell Scripts......Page 339 What Are Shell Scripts?......Page 341 Script File Format......Page 342 Script File Location......Page 343 More Formatting Tricks......Page 344 Indentation and Line Continuation......Page 345 Final Note......Page 346 First Stage: Minimal Document......Page 347 Second Stage: Adding a Little Data......Page 349 Creating Variables and Constants......Page 350 Assigning Values to Variables and Constants......Page 352 Here Documents......Page 353 Final Note......Page 355 26: Top-Down Design ......Page 357 Shell Functions......Page 358 Local Variables......Page 360 Keep Scripts Running......Page 362 Final Note......Page 364 27: Flow Control: Branching with if ......Page 365 Exit Status......Page 366 File Expressions......Page 368 String Expressions......Page 370 Integer Expressions......Page 372 A More Modern Version of test......Page 373 (( ))—Designed for Integers......Page 374 Combining Expressions......Page 375 Control Operators: Another Way to Branch......Page 377 Final Note......Page 378 28: Reading Keyboard Input ......Page 379 read—Read Values from Standard Input......Page 380 Separating Input Fields with IFS......Page 383 Validating Input......Page 385 Menus......Page 387 Extra Credit......Page 388 29: Flow Control: Looping with while and until ......Page 389 while......Page 390 Breaking out of a Loop......Page 392 until......Page 393 Final Note......Page 394 Syntactic Errors......Page 395 Missing Quotes......Page 396 Unanticipated Expansions......Page 397 Logical Errors......Page 398 Defensive Programming......Page 399 Verifying Input......Page 400 Test Cases......Page 401 Finding the Problem Area......Page 402 Tracing......Page 403 Final Note......Page 405 31: Flow Control: Branching with case ......Page 407 case......Page 408 Patterns......Page 409 Combining Multiple Patterns......Page 410 Final Note......Page 411 Accessing the Command Line......Page 413 Determining the Number of Arguments......Page 414 shift—Getting Access to Many Arguments......Page 415 Simple Applications......Page 416 Handling Positional Parameters En Masse......Page 417 A More Complete Application......Page 419 Final Note......Page 422 for: Traditional Shell Form......Page 425 for: C Language Form......Page 428 Final Note......Page 429 Parameter Expansion......Page 431 Expansions to Manage Empty Variables......Page 432 Expansions That Return Variable Names......Page 433 String Operations......Page 434 Arithmetic Evaluation and Expansion......Page 436 Simple Arithmetic......Page 437 Assignment......Page 438 Bit Operations......Page 440 Logic......Page 441 bc—An Arbitrary-Precision Calculator Language......Page 443 Using bc......Page 444 An Example Script......Page 445 Extra Credit......Page 446 What Are Arrays?......Page 447 Assigning Values to an Array......Page 448 Accessing Array Elements......Page 449 Array Operations......Page 450 Determining the Number of Array Elements......Page 451 Sorting an Array......Page 452 Deleting an Array......Page 453 Final Note......Page 454 Group Commands and Subshells......Page 455 Process Substitution......Page 456 Traps......Page 458 wait......Page 461 Named Pipes......Page 462 Using Named Pipes......Page 463 Final Note......Page 464 Index ......Page 465 You'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. Along the way you'll learn the timeless skills handed down by generations of gray-bearded, 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. - Publisher. Learning the Shell What Is the Shell? Navigation Exploring the System Manipulating Files and Directories Working with Commands Redirection Seeing the World as the Shell Sees It Advanced Keyboard Tricks Permissions Processes Configuration and the Environment The Environment A Gentle Introduction to vi Customizing the Prompt Common Tasks and Essential Tools Package Management Storage Media Networking Searching for Files Archiving and Backup Regular Expressions Text Processing Formatting Output Printing Compiling Programs Writing Shell Scripts Writing Your First Script Starting a Project Top-Down Design Flow Control: Branching with if Reading Keyboard Input Flow Control: Looping with while and until Troubleshooting Flow Control: Branching with case Positional Parameters Flow Control: Looping with for Strings and Numbers Arrays Exotica You'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 ... Available here: (http://readmeaway.com/download?i=1593279523) readmeaway.com/download?i=1593279523 The Linux Command Line, 2nd Edition: A Complete Introduction PDF by William Shotts Read The Linux Command Line, 2nd Edition: A Complete Introduction PDF from No Starch Press,William Shotts Download William Shottss PDF E-book The Linux Command Line, 2nd Edition: A Complete Introduction