Introduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p. 2 Conventions Used in This Book p. 2 Introduction to UNIX p. 5 An Overview of UNIX p. 5 What Is an Operating System? p. 6 The History of UNIX p. 8 Berkeley UNIX p. 9 UNIX System V p. 10 OSF Versus UI p. 10 X-Windows and Linux p. 11 The UNIX Philosophy p. 11 What Can UNIX Do for You? p. 12 The Electronic Office p. 12 Programmer's Support Tools p. 17 Getting Started: login, passwd, and who p. 19 Getting Started p. 20 Establishing Contact with the System p. 21 The Keyboard p. 22 Logging In p. 26 The Prompt Character p. 26 The Password p. 27 Logging Out p. 28 Correcting Typing Errors p. 29 Some Simple Shell Commands p. 30 The date Command p. 31 The cal Command p. 33 The who Command p. 35 The finger Command p. 36 Electronic Mail and Online Help: mail, talk, and man p. 41 Working with Email p. 42 Using Either mail or mailx p. 43 Sending Mail to Yourself p. 43 Reading Your Mail p. 45 Getting Help in mail p. 46 For Advanced Users: Sending Mail p. 46 For Advanced Users: Reading Mail p. 48 For Advanced Users: Adjusting the mail Environment p. 50 Making Electronic Chit-Chat with talk p. 51
Getting More Information with help and man p. 52 Files and Directories: 1s, cat, more, and pr p. 59 Files and the UNIX Directory System p. 60 Listing Directories: 1s p. 63 File and Directory Names p. 64 Listing Other Directories p. 65 Some 1s Options p. 66 Reading Files: cat p. 67 Reading Files with more p. 69 Formatting and Printing Files: pr and 1pr p. 71 Creating Files with cat and Redirection p. 72 Input and Output p. 74 More on Redirection p. 74 Redirection and Electronic Mail p. 76 Removing Files with rm p. 76 The vi Screen Editor p. 79 Introduction to Editing p. 80 The Memory Buffer p. 80 Two Modes of Operation p. 80 Working with the vi Editor p. 81 Starting vi p. 82 Moving the Cursor p. 84 Text Input Mode p. 86 Deleting and Changing Text p. 89 Undoing Changes: u and U p. 90 Leaving the vi Editor p. 91 Additional vi Commands p. 92 Cursor-Positioning Commands p. 93 Screen Scrolling and Paging p. 94 Pattern Searches p. 96 Operators That Delete, Duplicate, Change, and Rearrange Text p. 97 Using the Yank and Delete Operators with the Put Command p. 100 Additional Commands and Features of vi p. 104 The emacs Editor p. 109 Writing Your First Letter with emacs p. 110 The Echo Area p. 111 Basic Cursor Moves p. 112 Simple Editing: Adding and Removing Text p. 114 Saving CPU Time When Adding Text p. 115 Dealing with Line Lengths in emacs p. 115 The emacs Commands p. 116
Running an emacs Command by Using Its Long Name p. 116 Getting Help p. 117 Searching for Text p. 118 Searching for and Replacing Text p. 119 Defining Regions with Point and Mark p. 120 Formatting Text p. 121 Creating Multiple Windows p. 122 Creating Multiple Buffers p. 122 Working with Multiple Buffers and Multiple Windows p. 123 Working with Files p. 123 For Experienced Users: Customizing emacs p. 124 Manipulating Files and Directories: mv, cp, and mkdir p. 131 Filenames, Pathnames, Heads, and Tails p. 131 Basic File and Directory Manipulation Commands p. 133 Directory Commands: mkdir, rmdir, cd, and pwd p. 134 File Commands: rm, cp, mv, and 1n p. 138 Comparing cp, mv, and 1n p. 147 Searching Through Files: grep p. 148 What Can You Do with a UNIX File? p. 149 Marvelous Metacharacters: Using Wildcards and Symbolic Substitutions p. 151 Directory Abbreviations:. and.. and p. 154 The UNIX Shell: Command Lines, Redirection, and Shell Scripts p. 159 The Shell Command Line p. 160 Redirection p. 162 Redirecting Output to a File:] p. 163 Overriding File Protection: ]! p. 164 Redirecting and Appending Output to a File:]] p. 165 Redirecting Input from a File: [ p. 165 Combined Redirects p. 165 The Pipeline: p. 166 Split Output: tee p. 167 Job Control p. 169 Stopping and Restarting a Job: Ctrl-z and fg p. 169 Background Jobs p. 169 Multiple Jobs: jobs and bg p. 170 Job Numbers and PID Numbers p. 172 Process Status: ps p. 173 Terminating Unruly Jobs: kill p. 175 Job-Control Summary p. 177 History: A System That Remembers p. 177 Initiating Your History Service p. 178
Repeating an Earlier Command: Event Identifiers p. 178 Adding to a History Command p. 180 Simple Command-Line Editing p. 180 Selecting Parts of a Command Line: Word Identifiers p. 182 Customizing UNIX: The Alias p. 185 Establishing a Simple Alias p. 185 Permanent Aliases p. 186 Aliases with Arguments p. 186 Aliases for Compound Commands p. 187 Making Aliases for Complex Commands: \!* p. 187 Aliases in Aliases p. 188 The Filename Completion Service p. 190 Shell Scripts p. 190 Multiple Commands p. 193 Command-Line Arguments for Shell Scripts p. 194 Shell Variables p. 196 Built-In Variables p. 196 Obtaining the Value of a Variable p. 198 Setting Shell Variables p. 199 Customizing Your Environment: Your.login and.cshrc Files p. 200 Shell Metacharacters p. 202 Neutralizing Metacharacters p. 202 File-Management Commands and Others: wc, sort, 1pr, and chmod p. 207 File-Management Commands p. 207 Word Counting: wc p. 207 File Checking: tail and head p. 209 Sorting: sort p. 210 Redundancy Elimination: uniq p. 213 Making a Printed Copy p. 215 1pr, 1pq, and 1prm p. 215 Choosing a Printer p. 216 Permissions: chmod p. 218 Messages: mesg p. 221 Commands for Your Terminal: tty and stty p. 222 Using the UNIX Clock: time and calendar p. 224 @@time p. 224 @@calendar p. 226 More Text Processing: join, sed, and nroff p. 229 UNIX Filters p. 229 Combining Files: join p. 230 Checking Your Spelling: spell p. 232
The sed Stream Editor p. 233 @@sed Basics p. 234 @@sed Editing Instructions p. 235 Specifying Lines p. 236 @@sed Command Highlights p. 237 Pattern Matching in sed p. 239 Simple sed Solutions p. 240 Multiple Commands p. 242 Tags p. 242 Shell Scripts and sed p. 243 Text Formatting with nroff and troff p. 243 @@nroff p. 244 @@mm Macros p. 247 Making a Report p. 248 Naked nroff p. 250 Formatting Helpmates: tbl and eqn p. 250 Information Processing: grep, find, and awk p. 253 Finding Stuff: grep and find p. 255 File Searching: grep p. 255 Finding Files: find p. 260 For Advanced Users: More Complex Forms of find p. 263 Revisiting sort: Using Fields p. 265 Fields and Field Separators p. 265 Using Fields with sort p. 266 Multiple Fields p. 267 Subdividing a Field p. 268 Flag Options and Fields p. 268 A Quick Peek at awk p. 269 Advanced Editing Techniques p. 275 The Last Command p. 276 Using Abbreviations for Faster Typing p. 276 Using the map Command to Create Macros p. 277 Editing Multiple Files p. 278 Running Shell Commands p. 280 Using Advanced Search-and-Replace Commands p. 282 Search and Replace with vi p. 286 Customizing the vi Editor p. 287 The.exrc File p. 290 ASCII Table p. 293 Glossary p. 299 Summary of UNIX Abbreviations p. 307
Shell Abbreviations for Files and Directories p. 307 Abbreviations Used by grep, ed, and edit p. 308 Abbreviations Used by the C-Shell History Function p. 308 References to Complete Events p. 309 References to Words within an Event p. 309 Some Additional Conventions p. 309 Shell-Script Abbreviations p. 310 @@awk Abbreviations p. 310 UNIX Command Reference p. 311 Starting Up p. 311 Manipulating Files and Directories p. 311 Communication p. 315 Housekeeping Utilities p. 317 Online Help p. 317 Text Processing and Formatting p. 318 Information Handling p. 319 Running Jobs and Programs p. 322 Adjusting Your Environment p. 323 @@vi Command Reference p. 325 Modes p. 325 Cursor-Movement Commands p. 325 Text-Entering Commands p. 326 Text-Deletion Commands p. 326 Text Alteration Commands p. 326 Search Commands p. 327 The Last Command p. 327 Text-Moving Commands p. 327 Scopes to Use with Commands p. 328 Saving Text and Quitting the Editor p. 328 Screen Enhancement Options p. 328 Entering and Exiting the UNIX Shell p. 329 Answers to Chapter Review Questions p. 331 Index p. 339 Table of Contents provided by Blackwell's Book Services and R.R. Bowker. Used with permission.