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

Paperback
from $0.00

Author: Mark G. Sobell

ISBN-10: 0131367366

ISBN-13: 9780131367364

Category: Linux

Search in google:

For use with all versions of Linux, including Ubuntu,™ Fedora,™ openSUSE,™ Red Hat,® Debian, Mandriva, Mint, and now OS X, too! Get more done faster, and become a true Linux guru by mastering the command line! Learn from hundreds of realistic, high-quality examples NEW! Coverage of the Mac OS X command line and its unique tools NEW! Expert primer on automating tasks with PerlThe Most Useful Linux Tutorial and Reference, with Hundreds of High-Quality Examples for Every Distribution–Now Covers OS X and Perl, Too!To be truly productive with Linux, you need to thoroughly master shells and the command line. Until now, you had to buy two books to gain that mastery: a tutorial on fundamental Linux concepts and techniques, plus a separate reference. Now, there’s a far better solution. Renowned Linux expert Mark Sobell has brought together comprehensive, insightful guidance on the tools system administrators, developers, and power users need most, and an outstanding day-to-day reference, both in the same book.This book is 100 percent distribution and release agnostic: You can use it with any Linux system, now and for years to come. Use Macs, too? This new edition adds comprehensive coverage of the Mac OS X command line, including essential OS X-only tools and utilities other Linux/UNIX books ignore.Packed with hundreds of high-quality, realistic examples, this book gives you Linux from the ground up: the clearest explanations and most useful knowledge about everything from filesystems to shells, editors to utilities, and programming tools to regular expressions. Sobell has also added an outstanding new primer on Perl, the most important programming tool for Linux admins seeking to automate complex, time-consuming tasks.A Practical Guide to Linux® Commands, Editors, and Shell Programming, Second Edition, is the only book to deliver Better, more realistic examples covering tasks you’ll actually need to perform Deeper insight, based on Sobell’s immense knowledge of every Linux and OS X nook and cranny A start-to-finish primer on Perl for every system administrator In-depth coverage of basic and advanced Linux shell programming with bash and tcsh Practical explanations of 100 core utilities, from aspell to xargs–including Mac OS X specific utilities from ditto to SetFile All-new coverage of automating remote backups with 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 and using it interactively from the command line Complete guides to high-productivity editing with both vim and emacs A comprehensive, 286-page command reference section–now with revised and expanded indexes for faster access to the information you need Instructions for updating systems automatically with apt-get and yum Dozens of exercises to help you practice and gain confidence And much more, including coverage of BitTorrent, gawk, sed, find, sort, bzip2, and regular expressions

Preface xxxiChapter 1: Welcome to Linux and Mac OS X 1The History of UNIX and GNU—Linux 2What Is So Good About Linux? 6Overview of Linux 11Additional Features of Linux 16Chapter Summary 18Exercises 18Part I: The Linux and Mac OS X Operating Systems 21Chapter 2: Getting Started 23Conventions Used in This Book 24Logging In from a Terminal or Terminal Emulator 26Working with the Shell 28su/sudo: Curbing Your Power (root Privileges) 31Where to Find Documentation 33More About Logging In 40Chapter Summary 43Exercises 44Advanced Exercises 44Chapter 3: The Utilities 45Special Characters 46Basic Utilities 47Working with Files 49(Pipe): Communicates Between Processes 56Four More Utilities 57Compressing and Archiving Files 60Locating Commands 65Obtaining User and System Information 67Communicating with Other Users 70Email 72Chapter Summary 72Exercises 75Advanced Exercises 75Chapter 4: The Filesystem 77The Hierarchical Filesystem 78Directory Files and Ordinary Files 78Pathnames 83Working with Directories 85Access Permissions 93ACLs: Access Control Lists 99Links 104Chapter Summary 111Exercises 112Advanced Exercises 114Chapter 5: The Shell 117The Command Line 118Standard Input and Standard Output 123Running a Command in the Background 134Filename Generation/Pathname Expansion 136Builtins 141Chapter Summary 142Exercises 143Advanced Exercises 144Part II: The Editors 147Chapter 6: The vim Editor 149History 150Tutorial: Using vim to Create and Edit a File 151Introduction to vim Features 158Command Mode: Moving the Cursor 164Input Mode 168Command Mode: Deleting and Changing Text 169Searching and Substituting 173Miscellaneous Commands 180Copying, Moving, and Deleting Text 180Reading and Writing Files 183Setting Parameters 184Advanced Editing Techniques 189Units of Measure 193Chapter Summary 196Exercises 201Advanced Exercises 202Chapter 7: The emacs Editor 205History 206Tutorial: Getting Started with emacs 208The emacs GUI 215Basic Editing Commands 216Online Help 223Advanced Editing 225Major Modes: Language-Sensitive Editing 239Customizing emacs 249More Information 254Chapter Summary 254Exercises 262Advanced Exercises 264Part III: The Shells 267Chapter 8: The Bourne Again Shell 269Background 270Shell Basics 271Parameters and Variables 290Special Characters 304Processes 306History 308Aliases 324Functions 327Controlling bash: Features and Options 330Processing the Command Line 334Chapter Summary 343Exercises 345Advanced Exercises 347Chapter 9: The TC Shell 349Shell Scripts 350Entering and Leaving the TC Shell 351Features Common to the Bourne Again and TC Shells 353Redirecting Standard Error 359Working with the Command Line 360Variables 365Control Structures 378Builtins 387Chapter Summary 391Exercises 392Advanced Exercises 394Part IV: Programming Tools 395Chapter 10: Programming the Bourne Again Shell 397Control Structures 398File Descriptors 431Parameters and Variables 434Builtin Commands 446Expressions 460Shell Programs 468Chapter Summary 478Exercises 480Advanced Exercises 482Chapter 11: The Perl Scripting Language 485Introduction to Perl 486Variables 493Control Structures 501Working with Files 510Sort 513Subroutines 515Regular Expressions 517CPAN Modules 523Examples 525Chapter Summary 529Exercises 529Advanced Exercises 530Chapter 12: The AWK Pattern Processing Language 531Syntax 532Arguments 532Options 533Notes 534Language Basics 534Examples 541Advanced gawk Programming 558Chapter Summary 563Exercises 563Advanced Exercises 564Chapter 13: The sed Editor 565Syntax 566Arguments 566Options 566Editor Basics 567Examples 570Chapter Summary 581Exercises 581Chapter 14: The rsync Secure Copy Utility 583Syntax 584Arguments 584Options 584Examples 587Chapter Summary 594Exercises 594Part V: Command Reference 597Standard Multiplicative Suffixes 602Common Options 603The sample Utility 604Part VI: Appendixes 885Appendix A: Regular Expressions 887Characters 888Delimiters 888Simple Strings 888Special Characters 888Rules 891Bracketing Expressions 892The Replacement String 892Extended Regular Expressions 893Appendix Summary 895Appendix B: Help 897Solving a Problem 898The Apple Web Site 899Finding Linux and OS X—Related Information 899Specifying a Terminal 906Appendix C: Keeping the System Up-to-Date 909Using yum 910Using apt-get 916BitTorrent 921Appendix D: Mac OS X Notes 925Open Directory 926Filesystems 927Extended Attributes 928Activating the META Key 935Startup Files 936Remote Logins 936Many Utilities Do Not Respect Apple Human Interface Guidelines 936Mac OS X Implementation of Linux Features 936Glossary 939File Tree Index 989Utility Index 991Main Index 995