ورود به حساب

نام کاربری گذرواژه

گذرواژه را فراموش کردید؟ کلیک کنید

حساب کاربری ندارید؟ ساخت حساب

ساخت حساب کاربری

نام نام کاربری ایمیل شماره موبایل گذرواژه

برای ارتباط با ما می توانید از طریق شماره موبایل زیر از طریق تماس و پیامک با ما در ارتباط باشید


09117307688
09117179751

در صورت عدم پاسخ گویی از طریق پیامک با پشتیبان در ارتباط باشید

دسترسی نامحدود

برای کاربرانی که ثبت نام کرده اند

ضمانت بازگشت وجه

درصورت عدم همخوانی توضیحات با کتاب

پشتیبانی

از ساعت 7 صبح تا 10 شب

دانلود کتاب UNIX Power Tools

دانلود کتاب ابزار قدرت یونیکس

UNIX Power Tools

مشخصات کتاب

UNIX Power Tools

دسته بندی: سیستم های عامل
ویرایش: 1st 
نویسندگان:   
سری: Nutshell handbooks 
ISBN (شابک) : 9780553354027, 0553354027 
ناشر: Random House Information Group 
سال نشر: 1993 
تعداد صفحات: 1539 
زبان: English 
فرمت فایل : PDF (درصورت درخواست کاربر به PDF، EPUB یا AZW3 تبدیل می شود) 
حجم فایل: 6 مگابایت 

قیمت کتاب (تومان) : 52,000



ثبت امتیاز به این کتاب

میانگین امتیاز به این کتاب :
       تعداد امتیاز دهندگان : 12


در صورت تبدیل فایل کتاب UNIX Power Tools به فرمت های PDF، EPUB، AZW3، MOBI و یا DJVU می توانید به پشتیبان اطلاع دهید تا فایل مورد نظر را تبدیل نمایند.

توجه داشته باشید کتاب ابزار قدرت یونیکس نسخه زبان اصلی می باشد و کتاب ترجمه شده به فارسی نمی باشد. وبسایت اینترنشنال لایبرری ارائه دهنده کتاب های زبان اصلی می باشد و هیچ گونه کتاب ترجمه شده یا نوشته شده به فارسی را ارائه نمی دهد.


توضیحاتی در مورد کتاب ابزار قدرت یونیکس

انتشار کلاسیک در مورد "... بهترین نرم افزار رایگان برای کاربران قدرتمند یونیکس" با ابزارهای POSIX، ابزارهای 'bash' و 'tsch' بیشتر، اسکریپت ها و برنامه های به روز شده به روز شده و گسترش یافته است. نرم افزار برای پلتفرم های رایج یونیکس و لینوکس از پیش کامپایل شده است. این راهنمای کاربر و مرجع برنامه‌نویسی فشرده شما را از طریق پیشرفت منطقی ورود/خروج، سازماندهی فهرست خانه و راه‌اندازی پایانه راهنمایی می‌کند. در هر مورد اسکریپت ها، تکنیک ها، نشانگرهای بهینه سازی، کد، توضیحات بسیار خوب و منطق ارائه می شود. محیط پوسته، متغیرها و روابط را توضیح می دهد، نشان می دهد که پوسته ها چگونه ورودی شما را تفسیر می کنند، سپس شما را از طریق درخواست های پوسته بهینه و سفارشی راهنمایی می کند. شامل گسترده ترین بحث استفاده از خط فرمان و بهینه سازی است که تا به امروز دیده ایم. نام مستعار، کنترل شغل و تغییر مسیر I/O را بررسی می کند. تمرکز بسیار خوبی روی ناوبری سیستم فایل، کارت‌های وحشی، یافتن فایل‌ها با «یافتن»، تغییر نام، پیوند دادن، بایگانی کردن، پشتیبان‌گیری، و البته پاسخ به این سؤال ابدی، \"این را کجا گذاشتم؟\" یک فصل کامل به پرونده می‌پردازد. امنیت، مالکیت و اشتراک گذاری، بسیار خوب است. به تأکید بر مدیریت فایل با جستجو و تکنیک های تطبیق الگو (عبارات منظم)، مقایسه فایل ها و ابزارهای شمارش ادامه می دهد. نکات vi و تکنیک های دستوری سفارشی را ارائه می دهد، شامل Emacs، sed و ویرایش دسته ای است.


توضیحاتی درمورد کتاب به خارجی

The classic publication on "... the best free software for UNIX power users" has been updated and expanded with POSIX utilities, more 'bash' and 'tsch' tools, updated scripts and programs. Software is pre-compiled for common UNIX platforms and Linux. This densely packed user's guide and programming reference leads you through the logical progression of in/out logging, home directory organization and terminal setup. In each case provides scripts, techniques, optimization pointers, code, very good explanations and rationale. Explains the shell environment, variables and relationships, shows how shells interpret your input, then guides you through optimized and customized shell prompts. Includes the most extensive discussion of command line use and optimization we have seen to date. Examines aliasing, job control and I/O redirection. Very good focus on file system navigation, wild cards, finding files with 'find', renaming, linking, archiving, backup, and of course answers the eternal question, "Where did I put that?" One entire chapter deals with file security, ownership and sharing, very good. Continues to emphasize file management with searching and pattern matching techniques (regular expressions), file compare and count utilities. Provides vi tips and custom command techniques, includes Emacs, sed and batch editing.



فهرست مطالب

Table of Contents......Page 2
BookmarkTitle:......Page 42
1.1 What's Special About UNIX?......Page 43
1.2 Who Listens to What You Type?......Page 45
1.3 Programs Are Designed to Work Together......Page 47
1.4 Using Pipes to Create a New Tool......Page 48
1.5 Anyone Can Program the Shell......Page 50
1.6 Power Tools for Editing......Page 52
1.7 Power Grows on You......Page 53
1.8 There Are Many Shells......Page 55
1.9 Which Shell Am I Running?......Page 57
1.10 Internal and External Commands......Page 58
1.11 How the Shell Executes Other Commands......Page 59
1.12 What Makes a Shell Script?......Page 60
1.13 Why Fundamentals Are Important......Page 61
1.14 The Kernel and Daemons......Page 62
1.15 Filenames......Page 64
1.16 Wildcards......Page 66
1.17 Filename Extensions......Page 68
1.18 Who Handles Wildcards?......Page 70
1.19 The Tree Structure of the Filesystem......Page 72
1.20 Your Home Directory......Page 75
1.21 Making Pathnames......Page 76
1.22 How UNIX Keeps Track of Files: Inodes......Page 78
1.23 File Access Permissions......Page 80
1.24 The Superuser (Root)......Page 83
1.25 Access to Directories......Page 84
1.26 What a Multiuser System Can Do for You......Page 85
1.27 How Background Processing Works......Page 86
1.28 Some Gotchas with Background Processing......Page 87
1.29 When Is a File Not a File?......Page 89
1.30 Redirecting Input and Output......Page 90
1.31 The X Window System......Page 91
1.32 One Big Hole......Page 92
1.33 UNIX Networking and Communications......Page 93
1.34 What's Wrong with UNIX......Page 95
BookmarkTitle:......Page 96
2.1 Customizing the Shell......Page 97
2.2.2 C Shell......Page 98
2.2.5 tcsh......Page 99
2.3 What Goes in Shell Setup Files?......Page 100
2.4 Tip for Changing Account Setup: Keep a Shell Ready......Page 102
2.5.1 Quick Login......Page 103
2.5.3 Once-a-Day Setup......Page 104
2.6 Use Absolute Pathnames in Shell Setup Files......Page 106
2.7 C Shell Setup Files Aren't Read When You Want Them to Be?......Page 107
2.8 Identifying Login Shells......Page 109
2.9 Speeding Up Your C Shell with set prompt Test......Page 110
2.10 Gotchas in set prompt Test......Page 111
2.11 Faster ksh and bash Startup with $- Test......Page 113
2.12 Automatic Setups for Different Terminals......Page 114
2.13 A .cshrc.$HOST File for Per Host Setup......Page 117
2.14 motd.diff: Show New Lines in Login Messages......Page 118
2.15 Unclutter Logins: Show Login Messages Just Once......Page 120
2.16 Approved Shells: Using Unapproved Login Shell......Page 121
BookmarkTitle:......Page 124
3.1 Running Commands When You Log Out......Page 125
3.2 Running Commands at Bourne/Korn Shell Logout......Page 127
3.3 Electronic Fortune Cookies......Page 128
3.4 Automatic File Cleanup......Page 129
3.5 Stop Accidental C Shell Logouts......Page 130
3.6 Stop Accidental Bourne Shell Logouts......Page 131
3.7 Detaching a Session with screen......Page 132
3.8 What tty Am I On?......Page 133
BookmarkTitle:......Page 134
4.1 What? Me, Organized?......Page 135
4.2 A bin Directory for Your Programs and Scripts......Page 136
4.3 Organizing Nonexecutable Scripts......Page 137
4.4 Directories for Emacs Hacks......Page 138
4.5 Private (Personal) Directories......Page 139
4.6 Naming Files......Page 140
4.7 Make More Directories!......Page 141
4.8 Making Directories Made Easier......Page 143
4.9 Setting Up vi with the .exrc File......Page 145
4.10 Find All Command Versions with whereiz......Page 146
BookmarkTitle:......Page 148
5.1 There's a Lot to Know About Terminals......Page 149
5.2 The Idea of a Terminal Database......Page 150
5.3 Setting the Terminal Type When You Log In......Page 152
5.4 Setting the TERMCAP Variable with tset......Page 155
5.5 Querying Your Terminal Type: qterm......Page 156
5.6 Checklist: Terminal Hangs When I Log In......Page 159
5.7 What termcap and terminfo Do and Don't Control......Page 161
5.8 Terminal Escape Sequences......Page 162
5.9 Setting Your Erase, Kill, and Interrupt Characters......Page 164
5.10 Finding What Terminal Names You Can Use......Page 166
5.11 Initializing the Terminal with tset......Page 168
5.12 Initializing the Terminal with tput......Page 169
BookmarkTitle:......Page 171
6.1 What Environment Variables Are Good For......Page 172
6.2 Parent-Child Relationships......Page 174
6.3 Predefined Environment Variables......Page 175
6.4 The PATH Environment Variable......Page 177
6.5 PATH and path......Page 179
6.6 The TZ Environment Variable......Page 180
6.7 What Time Is It in Japan?......Page 181
6.8 Shell Variables......Page 182
6.9 Special C Shell Variables......Page 184
6.10 Running a Command with a Temporarily Different Environment......Page 187
BookmarkTitle:......Page 188
7.1 Why Change Your Prompt?......Page 189
7.2 Basics of Setting the Prompt......Page 190
7.3 C Shell Prompt Causes Problems in vi, rsh, etc.......Page 191
7.4 Faster Prompt Setting with Built-Ins......Page 192
7.5 Multiline Shell Prompts......Page 194
7.6 Session Information in Your Terminal's Status Line......Page 196
7.7 A "Menu Prompt" for Naive Users......Page 198
7.8 Highlighting in Shell Prompts......Page 199
7.9 Show Subshell Level with $SHLVL......Page 201
7.10 What Good Is a Blank Shell Prompt?......Page 203
7.11 dirs in Your Prompt: Better than $cwd......Page 204
7.12 External Commands Send Signals to Set Variables......Page 206
7.13 Pre-Prompt Commands in bash......Page 208
BookmarkTitle:......Page 210
8.1 What the Shell Does......Page 211
8.2 Introduction to bash......Page 213
8.3 Introduction to tcsh......Page 215
8.4 Command Evaluation and Accidentally Overwriting Files......Page 217
8.5 Command-Line Evaluation......Page 218
8.6.1 Portability......Page 221
8.6.2 Making Error Messages......Page 222
8.7.1 Setting Path in Shell Setup Files......Page 223
8.7.2 Changing Path on the Command Line......Page 224
8.8 A Directory for Commands You Shouldn't Run......Page 225
8.9 Wildcards Inside of Aliases......Page 227
8.10 eval: When You Need Another Chance......Page 228
8.11 Which One Will bash Use?......Page 230
8.12 Which One Will the C Shell Use?......Page 232
8.13 Is It "2>&1 file" or "> file 2>&1"? Why?......Page 234
8.14.2 How Quoting Works......Page 235
8.14.4 Multiline Quoting......Page 237
8.15.2 How Quoting Works......Page 239
8.16 Quoting Handles Special Characters in Filenames......Page 241
8.17 verbose and echo Variables Show Quoting......Page 242
8.18 Here Documents......Page 243
8.19 "Special" Characters and Operators......Page 245
8.20 How Many Backslashes?......Page 248
BookmarkTitle:......Page 250
9.1 What's Special About the UNIX Command Line......Page 251
9.2 Fix a Line Faster with Line-Kill and Word-Erase......Page 253
9.3 Reprinting Your Command Line with CTRL-r......Page 254
9.4 Use Wildcards to Create Files?......Page 255
9.5 Build Strings with { }......Page 256
9.6 String Editing (Colon) Operators......Page 258
9.7 String Editing in ksh and bash......Page 261
9.8 Filename Completion: Faster Filename Typing......Page 263
9.9 Don't Match Useless Files in Filename Completion......Page 265
9.10 Filename Completion Isn't Always the Answer......Page 266
9.11 Repeating a Command with a foreach Loop......Page 267
9.12 The Bourne Shell for Loop......Page 269
9.13 Multiline Commands, Secondary Prompts......Page 271
9.14 Using Here Documents for Form Letters, etc.......Page 273
9.15 Throwaway Scripts for Complicated Commands......Page 274
9.16 Command Substitution......Page 275
9.17 Handling Lots of Text with Temporary Files......Page 277
9.18.1 bash Process Substitution......Page 278
9.18.2 Automatic Temporary Files with !......Page 279
9.19 For the Impatient: Type-Ahead......Page 281
9.20 Too Many Files for the Command Line......Page 283
9.21 Handle Too-Long Command Lines with xargs......Page 285
9.22 xargs: Problems with Spaces and Newlines......Page 287
9.23 Workaround for "Arguments too long" Error......Page 289
9.24.1 What Files Have I Just Edited?......Page 290
9.24.2 Search for Text with grep......Page 291
9.25 The C Shell repeat Command......Page 293
9.26.1 Dialback......Page 295
9.26.2 Automating /bin/passwd......Page 296
9.26.4 Other Problems......Page 297
BookmarkTitle:......Page 298
10.1 Creating Custom Commands......Page 299
10.2.2 Using More Complex Aliases......Page 300
10.2.3 Setting Aliases Automatically, Unsetting Aliases......Page 301
10.3 C Shell Aliases with Command-Line Arguments......Page 303
10.4 Aliases in ksh and bash......Page 305
10.5 Sourceable Scripts......Page 306
10.6 Avoiding C Shell Alias Loops......Page 308
10.7 How to Put if-then-else in a C Shell Alias......Page 310
10.8 Fix Quoting in csh Aliases with makealias and quote......Page 311
10.9 Shell Functions......Page 312
10.10 Simulated Bourne Shell Functions and Aliases......Page 313
BookmarkTitle:......Page 314
11.1 The Lessons of History......Page 315
11.2 History in a Nutshell......Page 317
11.3 My Favorite Is !$......Page 319
11.4 My Favorite Is !:n*......Page 320
11.5 My Favorite Is ^^......Page 321
11.6 Using !$ for Safety with Wildcards......Page 322
11.7 History Substitutions......Page 323
11.8 Repeating a Cycle of Commands......Page 328
11.9 Running a Series of Commands on a File......Page 329
11.10 Check Your History First with :p......Page 330
11.11.1 bash and ksh......Page 331
11.11.2 C Shell......Page 332
11.12 Pass History to Another Shell......Page 333
11.13 Shell Command-Line Editing......Page 334
11.14.1 In the C Shell: redo......Page 336
11.14.2 In ksh and bash: fc......Page 337
11.15 Changing C Shell History Characters with histchars......Page 338
11.16 Instead of Changing History Characters......Page 339
BookmarkTitle:......Page 340
12.1.1 Foreground and Background......Page 341
12.2 Other Ways to Refer to Jobs......Page 344
12.3 The "Current Job" Isn't Always What You Expect......Page 346
12.4 Job Control and autowrite: Real Time Savers!......Page 347
12.5 System Overloaded? Try Stopping Some Jobs......Page 348
12.6 Notification When Jobs Change State......Page 349
12.7 Stop Background Output with stty tostop......Page 350
12.8 Job Control in a Nutshell......Page 351
12.9 Running Multiple Shell Sessions with screen......Page 353
BookmarkTitle:......Page 355
13.1 Using Standard Input and Output......Page 356
13.2 One Argument with a cat Isn't Enough......Page 359
13.3 Send (only) Standard Error Down a Pipe......Page 360
13.4 Problems Piping to a Pager......Page 361
13.5 Redirection in C Shell: Capture Errors, Too?......Page 363
13.6 Safe I/O Redirection with noclobber......Page 364
13.7.2 Temporary Change of Directory and Environment......Page 366
13.8 Using {list} to Group Bourne Shell Commands......Page 368
13.9 Send Output Two or More Places with tee......Page 370
13.10 How to tee Several Commands Into One File......Page 371
13.11 tpipe-Redirecting stdout to More than One Place......Page 372
13.12 Writing to Multiple Terminals for Demonstrations......Page 374
13.13 The "Filename" -......Page 375
13.14 What Can You Do with an Empty File?......Page 376
13.15 What to Do with a Full Bit Bucket :-)......Page 378
13.16 Store and Show Errors with logerrs......Page 380
BookmarkTitle:......Page 381
14.1 Getting Around the Filesystem......Page 382
14.2 Using Relative and Absolute Pathnames......Page 384
14.3 What Good Is a Current Directory?......Page 387
14.4 How Does UNIX Find Your Current Directory?......Page 389
14.5 Saving Time When You Change Directories: cdpath......Page 391
14.6 The Shells' pushd and popd Commands......Page 393
14.7 Nice Aliases for pushd......Page 395
14.8 Quick cds with Aliases......Page 396
14.9 cd by Directory Initials......Page 397
14.10 Variables Help You Find Directories and Files......Page 399
14.11 Finding (Anyone's) Home Directory, Quickly......Page 401
14.12 Marking Your Place with a Shell Variable......Page 402
14.13 Which Directory Am I in, Really?......Page 403
14.14 Automatic Setup When You Enter/Exit a Directory......Page 405
BookmarkTitle:......Page 407
15.1 File Naming Wildcards......Page 408
15.2 Filename Wildcards in a Nutshell......Page 410
15.3 Adding { } Operators to Korn (and Bourne) Shells......Page 412
15.4 What if a Wildcard Doesn't Match?......Page 413
15.5 Matching All "Dot Files" with Wildcards......Page 414
15.6 Maybe You Shouldn't Use Wildcards in Pathnames......Page 415
15.7 Getting a List of Matching Files with grep -l......Page 416
15.8 Getting a List of Non-Matching Files with grep -c......Page 417
15.9 nom: List Files that Don't Match a Wildcard......Page 419
15.10 Wildcards that Match Only Directories......Page 421
BookmarkTitle:......Page 423
16.1 Everything but the find Command......Page 424
16.2 Finding Oldest or Newest Files with ls -t and ls -u......Page 426
16.3 Reordering ls Listings......Page 428
16.4 List All Subdirectories with ls -R......Page 430
16.5 The Three UNIX File Times......Page 431
16.6 clf, cls: "Compressed" ls Listings......Page 432
16.7 ls Shortcuts: ll, lf, lg, etc.......Page 434
16.8 The ls -d Option......Page 436
16.9 An Alias to List Recently Changed Files......Page 437
16.10 findcmd: Find a Command in Your Search Path......Page 438
16.11 Showing Hidden Files with ls -A and -a......Page 439
16.12 Useful ls Aliases......Page 440
16.13 Can't Access a File? Look for Spaces in the Name......Page 442
16.14 Showing Non-Printable Characters in Filenames......Page 443
16.15 Script with a :-) for UNIX Converts: dir, ..., .........Page 445
16.16 Picking a Unique Filename Automatically......Page 446
16.17 Getting Directory Name from a File's Pathname......Page 447
16.18 Listing Files You've Created/Edited Today......Page 448
16.19 stree: Simple Directory Tree......Page 449
16.20 The vtree Visual Directory Tree Programs......Page 451
16.21 Finding All Directories with the Same Name......Page 452
16.22 Comparing Two Directory Trees with dircmp......Page 453
16.23 Comparing Filenames in Two Directory Trees......Page 455
16.24 Counting Files by Types......Page 456
16.25 Listing Files by Age and Size......Page 457
16.26 Finding Text Files with findtext......Page 458
16.27 newer: Print the Name of the Newest File......Page 461
16.28 oldlinks: Find Unconnected Symbolic Links......Page 462
16.29 sls: Super ls with Format You Can Choose......Page 463
BookmarkTitle:......Page 465
17.1 The find Command Is Great; The Problem Is Finding How to Use It......Page 466
17.2 Delving Through a Deep Directory Tree......Page 469
17.3 Don't Forget -print......Page 471
17.4 Looking for Files with Particular Names......Page 472
17.5 Searching for Old Files......Page 473
17.6 Be an Expert on find Search Operators......Page 474
17.7 The Times that find Finds......Page 476
17.8 Exact File Time Comparisons......Page 477
17.9 Problems with -newer......Page 478
17.10 Running Commands on What You Find......Page 479
17.11 Using -exec to Create Custom Tests......Page 481
17.12 Finding Many Things with One Command......Page 482
17.13 Searching for Files by Type......Page 484
17.14 Searching for Files by Size......Page 485
17.15 Searching for Files by Permission......Page 486
17.16 Searching by Owner and Group......Page 488
17.17 Duplicating a Directory Tree (No Pathnames with find {} Operator)......Page 489
17.18 Using "Fast find"......Page 490
17.19 Finding Files (Much) Faster with a find Database......Page 493
17.20 grepping a Directory Tree (and a Gotcha)......Page 495
17.21 lookfor: Which File Has that Word?......Page 496
17.22 Finding the Links to a File......Page 498
17.23 Finding Files with -prune......Page 499
17.24 Skipping Some Parts of a Tree in find (A More Selective -prune)......Page 501
17.25 Keeping find From Searching Networked Filesystems......Page 502
BookmarkTitle:......Page 503
18.1 What's So Complicated About Copying Files?......Page 504
18.2 What's Really in a Directory......Page 506
18.3 Files with Two or More Names......Page 508
18.4.1 Differences Between Hard and Symbolic Links......Page 510
18.4.2 Links to a Directory......Page 511
18.5 Creating and Removing Links......Page 513
18.6 Stale Symbolic Links......Page 515
18.7 Linking Directories......Page 517
18.8 Showing the Actual Filenames for Symbolic Links......Page 519
18.9 Renaming, Copying, or Comparing a Set of Files......Page 520
18.10 There's More than One Way to Do It......Page 521
18.11 Renaming Files with ren......Page 523
18.12 Renaming a List of Files Interactively......Page 525
18.13 One More Way to Do It......Page 526
18.14 Relinking Multiple Symbolic Links......Page 527
18.15 Copying Directory Trees with cp -r......Page 528
18.16 Copying Directory Trees with (tar | tar)......Page 531
BookmarkTitle:......Page 533
19.1 Packing Up and Moving......Page 534
19.2 Introduction to Shell Archives......Page 535
19.3 unshar: Unarchive a Shell Archive......Page 537
19.4 A Simple Version of unshar......Page 538
19.5 Using tar to Create and Unpack Archives......Page 539
19.6 GNU tar Sampler......Page 541
19.7 Extracting Files from a Compressed Archive......Page 542
19.8 Problems with Verbose tar......Page 543
19.9 A System V Tape Archiver: cpio......Page 544
BookmarkTitle:......Page 546
20.1 tar in a Nutshell......Page 547
20.2 Make Your Own Backups......Page 549
20.3.1 Syntax of the tar Command......Page 551
20.3.3 More on Tape Names......Page 552
20.4.1 Restoring a Few Files......Page 554
20.4.2 Remote Restoring......Page 555
20.5 Using tar to a Remote Tape Drive......Page 556
20.6 Writing a Tape Drive on a Remote Machine......Page 557
20.7 Creating a Timestamp File for Selective Backups......Page 559
20.8 Telling tar Which Files to Exclude or Include......Page 560
20.8.2 Type Pathnames Exactly......Page 561
20.8.3 Exclude the Archive File!......Page 562
20.9 When a Program Doesn't Understand Wildcards......Page 563
20.10 Avoid Absolute Paths with tar......Page 564
20.11 Getting tar's Arguments in the Right Order......Page 566
20.12 Protecting Files with SCCS or RCS......Page 567
20.13 SCCS Basics......Page 568
20.14 RCS Basics......Page 570
20.15 List RCS Revision Numbers with rcsrevs......Page 572
BookmarkTitle:......Page 573
21.1 A Grab-Bag......Page 574
21.2 A Better Place for Temporary Files: /tmp......Page 575
21.3 Unique Names for Temporary Files......Page 576
21.4 Why Both /tmp and /usr/tmp?......Page 578
21.5 What Good Is a File's Last Access Time?......Page 579
21.6 A File's Inode Change (not "Creation"!) Time......Page 580
21.7 Setting File Modification Time with touch......Page 581
21.8.1 For C Shell Users......Page 583
21.8.2 For Bourne Shell Users......Page 584
21.9 Keep File Printouts Up-to-Date Automatically with make......Page 586
21.10 Keep a Directory Listing at Top of the Screen: dirtop......Page 587
21.11 Safer Removing, Moving, and Copying......Page 589
21.12 Copying Files to a Directory......Page 590
21.13 Read an Inode with stat......Page 591
21.14 Automatically Appending the Date to a Filename......Page 592
BookmarkTitle:......Page 593
22.1 Introduction to File Ownership and Security......Page 594
22.2.1 User, Group, and World......Page 595
22.2.2 Which Group is Which?......Page 597
22.3 Who Will Own a New File?......Page 599
22.4 Setting an Exact umask......Page 601
22.5 Group Permissions in a Directory with the setgid Bit......Page 602
22.6 Protecting Files with the Sticky Bit......Page 603
22.7 Using chmod to Change File Permission......Page 604
22.8 The Handy chmod = Operator......Page 606
22.9 Protect Important Files: Make Them Unwritable......Page 607
22.10 cx, cw, c-w: Quick File Permission Changes......Page 608
22.11 A Loophole: Modifying Files Without Write Access......Page 609
22.12 A Directory that People Can Access but Can't List......Page 610
22.13 Groups and Group Ownership......Page 612
22.14 Add Users to a Group to Deny Permission......Page 614
22.15 Juggling Permissions......Page 615
22.16 Copying Permissions with cpmod......Page 617
22.17 Ways of Improving the Security of crypt......Page 618
22.18 Clear Your Terminal for Security, to Stop Burn-in......Page 620
22.19 Shell Scripts Must be Readable and (Usually) Executable......Page 621
22.20 Why Can't You Change File Ownership Under BSD UNIX?......Page 622
22.21 How to Change File Ownership Without chown......Page 623
22.22.1 Ending or Suspending......Page 624
22.22.3 Problems You Might Have......Page 625
22.22.5 Other su Features......Page 626
BookmarkTitle:......Page 627
23.1 The Cycle of Creation and Destruction......Page 628
23.2 rm and Its Dangers......Page 629
23.3 Tricks for Making rm Safer......Page 631
23.4 Answer "Yes" or "No" Forever with yes......Page 632
23.5 Remove Some, Leave Some......Page 633
23.6 A Faster Way to Remove Files Interactively......Page 634
23.7 Safer File Deletion in Some Directories......Page 635
23.8 Safe Delete: Pros and Cons......Page 636
23.9 delete: Protecting Files from Accidental Deletion......Page 637
23.10 Deletion with Prejudice: rm -f......Page 640
23.11 Deleting Files with Odd Names......Page 641
23.12 Using Wildcards to Delete Files with Strange Names......Page 642
23.13 Deleting Files with the Null Name......Page 643
23.14 Handling a Filename Starting with a Dash (-)......Page 644
23.15 Using unlink to Remove a File with a Strange Name......Page 645
23.16 Removing a Strange File by its I-number......Page 647
23.17 Problems Deleting Directories......Page 648
23.18 How Making and Deleting Directories Works......Page 650
23.19 Deleting (BSD) Manual Pages that Aren't Read......Page 651
23.20 Deleting Stale Files......Page 652
23.21 Removing Every File but One......Page 654
23.22 Using find to Clear Out Unneeded Files......Page 655
BookmarkTitle:......Page 656
24.1 Instead of Removing a File, Empty It......Page 657
24.2 Save Space with Bit Bucket Log Files and Mailboxes......Page 659
24.3 Unlinking Open Files Isn't a Good Idea......Page 660
24.4 Save Space with a Link......Page 661
24.5 Limiting File Sizes......Page 662
24.6 Save Space with Tab Characters......Page 663
24.7 Compressing Files to Save Space......Page 664
24.8 Save Space: tar and compress a Directory Tree......Page 666
24.9 How Much Disk Space?......Page 668
24.10 zloop: Run a Command on Compressed Files......Page 670
24.11 Edit Compressed Files with zvi, zex, and zed......Page 672
24.12 Compressing a Directory Tree: Fine-Tuning......Page 674
24.13 Save Space in Executable Files with strip......Page 676
24.14 Don't Use strip Carelessly......Page 677
24.15 Trimming a Directory......Page 678
24.16 Trimming a Huge Directory......Page 679
24.17 Disk Quotas......Page 681
24.18 Huge Files Might Not Take a Lot of Disk Space......Page 682
BookmarkTitle:......Page 683
25.1 Cracking the Nut......Page 684
25.2 Four Ways to Skin a cat......Page 686
25.3 Using more to Page Through Files......Page 688
25.4 The "less" Pager: More than "more"......Page 690
25.5 Page Through Compressed, RCS, Unprintable Files......Page 691
25.6 What's in That White Space?......Page 693
25.7 Show Non-Printing Characters with cat -v or od -c......Page 694
25.8 Finding File Types......Page 697
25.9 Adding and Deleting White Space......Page 699
25.10 Squash Extra Blank Lines......Page 700
25.11 crush: A cat that Skips all Blank Lines......Page 701
25.12 Double Space, Triple Space .........Page 702
25.13 pushin: Squeeze Out Extra White Space......Page 703
25.14 How to Look at the End of a File: tail......Page 704
25.15 Finer Control on tail......Page 705
25.16 How to Look at a File as It Grows......Page 706
25.17 An Alias in Case You Don't Have tail......Page 707
25.18 Watching Several Files Grow......Page 708
25.19 Reverse Lines in Long Files with flip......Page 710
25.20 Printing the Top of a File......Page 711
25.21 Numbering Lines......Page 712
BookmarkTitle:......Page 713
26.1 That's an Expression......Page 714
26.2 Don't Confuse Regular Expressions with Wildcards......Page 716
26.3 Understanding Expressions......Page 717
26.4.1 The Anchor Characters: ^ and $......Page 719
26.4.4 Specifying a Range of Characters with [...]......Page 720
26.4.6 Repeating Character Sets with *......Page 721
26.4.8 Matching Words with \ < and \ >......Page 722
26.4.11 Extended Regular Expressions......Page 723
26.5 Getting Regular Expressions Right......Page 725
26.6 Just What Does a Regular Expression Match?......Page 727
26.7 Limiting the Extent of a Match......Page 729
26.8 I Never Meta Character I Didn't Like......Page 730
26.9 Valid Metacharacters for Different UNIX Programs......Page 732
26.10 Pattern Matching Quick Reference with Examples......Page 734
26.10.1 Examples of Searching......Page 735
26.10.2 Examples of Searching and Replacing......Page 736
BookmarkTitle:......Page 737
27.1 Different Versions of grep......Page 738
27.2 Searching for Text with grep......Page 740
27.3 Finding Text That Doesn't Match......Page 742
27.4 Finding a Pattern Only When It's a Word......Page 743
27.5 Extended Searching for Text with egrep......Page 744
27.6 Fast grep Isn't......Page 745
27.7 grepping for a List of Patterns......Page 747
27.8 glimpse and agrep......Page 748
27.9 New greps Are Much Faster......Page 750
27.10.2 rcsegrep.fast......Page 751
27.11 A Multiline Context grep Using sed......Page 753
27.12 Make Custom grep Commands (etc.) with perl......Page 754
27.13 More grep-like Programs Written in Perl......Page 755
27.14 Compound Searches......Page 756
27.15 Narrowing a Search Quickly......Page 758
27.16 Faking Case-Insensitive Searches......Page 759
27.17 Finding a Character in a Column......Page 760
27.18 Fast Searches and Spelling Checks with "look"......Page 761
27.19 Finding Words Inside Binary Files......Page 762
27.20 A Highlighting grep......Page 763
BookmarkTitle:......Page 764
28.1 Checking Differences with diff......Page 765
28.2 Comparing Three Different Versions with diff3......Page 767
28.3 Context diffs......Page 769
28.4 Side-by-Side diffs: sdiff......Page 771
28.5 Comparing Files Alongside One Another......Page 772
28.6 Choosing Sides with sdiff......Page 773
28.7 diff for Very Long Files: bdiff......Page 774
28.8 More Friendly diff Output......Page 775
28.9 ex Scripts Built by diff......Page 776
28.10 Problems with diff and Tabstops......Page 779
28.11 cmp and diff......Page 780
28.12 Comparing Two Files with comm......Page 781
28.13 make Isn't Just for Programmers!......Page 783
28.14 Even More Uses for make......Page 785
28.15 Show Changes in a troff File with diffmk......Page 786
BookmarkTitle:......Page 788
29.1 The UNIX spell Command......Page 789
29.2 Check Spelling Interactively with ispell......Page 791
29.3 How Do I Spell That Word?......Page 793
29.4 Inside spell......Page 794
29.5 Adding Words to ispell's Dictionary......Page 796
29.6 Counting Lines, Words, and Characters: wc......Page 798
29.7 Count How Many Times Each Word Is Used......Page 801
29.8 Find a a Doubled Word......Page 803
29.9 Looking for Closure......Page 804
29.10 Just the Words, Please......Page 806
BookmarkTitle:......Page 807
30.1 The vi and ex Editors: Why So Much Material?......Page 808
30.2 What We Cover......Page 810
30.3 Mice vs. vi......Page 811
30.4 Editing Multiple Files with vi......Page 813
30.5 Edits Between Files......Page 815
30.6 Local Settings for vi and ex......Page 817
30.7 Using Buffers to Move or Copy Text......Page 818
30.8 Get Back What You Deleted with Numbered Buffers......Page 819
30.9.1 Global Searches......Page 820
30.10 Confirming Substitutions in ex and vi......Page 822
30.11 Keep Your Original File, Write to a New File......Page 824
30.12 Saving Part of a File......Page 825
30.13 Appending to an Existing File......Page 826
30.14 Moving Blocks of Text by Patterns......Page 827
30.15 Useful Global Commands (with Pattern Matches)......Page 829
30.16 Counting Occurrences; Stopping Search Wraps......Page 831
30.17 Capitalizing Every Word on a Line......Page 832
30.18 Setting vi Options Automatically for Individual Files......Page 833
30.19 Modelines: Bug or Feature?......Page 834
30.20 Multiple Editor Setup Files; Starting with a Search......Page 836
30.21 Per File Setups in Separate Files......Page 837
30.22.2 Filtering Text with vi......Page 838
30.23 Safer vi Filter-Throughs......Page 841
30.24 vi/ex File Recovery vs. Networked Filesystems......Page 843
30.25 vi -r May not Write Recovered Buffer When You Exit......Page 844
30.26 Shell Escapes: Running One UNIX Command While Using Another......Page 845
30.27 vi Compound Searches......Page 847
30.28 Keep Track of Functions and Included Files with ctags and tags......Page 849
30.29 Setting Multiple tags Files......Page 851
30.30 vi Outsmarts Dual-Function Function Keys......Page 852
30.31 vi Word Abbreviation......Page 853
30.32 Using vi Abbreviations as Commands (Cut and Paste Between vi's)......Page 855
30.33 Fixing Typos with vi Abbreviations......Page 856
30.34 vi Line Commands vs. Character Commands......Page 857
30.35 Out of Temporary Space? Use Another Directory......Page 859
30.36 The ex Open Mode Can Be Handy......Page 860
30.37 Neatening Lines......Page 863
30.38 Finding Your Place with Undo......Page 864
BookmarkTitle:......Page 865
31.1 Why Type More Than You Have To?......Page 866
31.2.1 Command Mode Maps......Page 868
31.2.2 Text-Input Mode Maps......Page 869
31.3 What You Lose When You Use map!......Page 871
31.4.1 Defining and Using Simple @-Functions......Page 872
31.4.4 Newlines in an @-Function......Page 873
31.5 Keymaps for Pasting into a Window Running vi......Page 875
31.6 Protecting Keys from Interpretation by ex......Page 876
31.7 Maps for Repeated Edits......Page 878
31.8 More Examples of Mapping Keys in vi......Page 880
31.9 Good Stuff for Your .exrc File......Page 882
31.10 Repeating a vi Keymap......Page 886
31.11 Typing in Uppercase Without CAPS LOCK......Page 887
31.12 Text-Input Mode Cursor Motion with No Arrow Keys......Page 888
31.13 Making Cursor Keys Work in vi Text-input Mode......Page 890
31.14 Don't Lose Important Functions with vi Maps: Use noremap......Page 891
31.15 Fooling vi into Allowing Complex Macros......Page 892
31.16 vi Macro for Splitting Long Lines......Page 893
BookmarkTitle:......Page 894
32.1 Emacs: The Other Editor......Page 895
32.2 Emacs Features: A Laundry List......Page 896
32.3 Customizations and How to Avoid Them......Page 898
32.4 Backup and Auto-Save Files......Page 899
32.5 Putting Emacs in Overwrite Mode......Page 901
32.6 Command Completion......Page 902
32.7 Mike's Favorite Time Savers......Page 903
32.8 Rational Searches......Page 904
32.9 Unset PWD Before Using Emacs......Page 906
32.10 Inserting Binary Characters into Files......Page 907
32.11.2 Making Word Abbreviations Part of Your Startup......Page 908
32.12 Getting Around Emacs Flow Control Problems......Page 910
32.13 An Absurd Amusement......Page 911
BookmarkTitle:......Page 912
33.1 Why Line Editors Aren't Dinosaurs......Page 913
33.2 Writing Editing Scripts......Page 915
33.3 Line Addressing......Page 917
33.4 Useful ex Commands......Page 919
33.5 Running Editing Scripts Within vi......Page 922
33.6 Change Many Files by Editing Just One......Page 923
33.7 ed/ex Batch Edits: Avoid Errors When No Match......Page 925
33.8 Batch Editing Gotcha: Editors Bomb on Big Files......Page 926
33.9 patch: Generalized Updating of Files that Differ......Page 927
33.10 Quick Globals from the Command Line with qsubst......Page 929
33.11.2 Patterns and Procedures......Page 930
33.11.5 Variables and Array Assignments......Page 933
33.11.7 Alphabetical Summary of Commands......Page 934
33.12 Versions of awk......Page 939
BookmarkTitle:......Page 940
34.1 Two Things You Must Know About sed......Page 941
34.2 Invoking sed......Page 943
34.3.1 checksed......Page 944
34.3.2 runsed......Page 945
34.4 sed Addressing Basics......Page 946
34.5 Order of Commands in a Script......Page 948
34.6 One Thing at a Time......Page 949
34.7 Delimiting a Regular Expression......Page 950
34.8 Newlines in a sed Replacement......Page 951
34.9 Referencing the Search String in a Replacement......Page 953
34.10 Referencing Portions of a Search String......Page 954
34.11 Search & Replacement: One Match Among Many......Page 955
34.12 Transformations on Text......Page 956
34.13 Hold Space: The Set-Aside Buffer......Page 957
34.14 Transforming Part of a Line......Page 960
34.15 Making Edits Across Line Boundaries......Page 962
34.16 The Deliberate Scrivener......Page 965
34.17 Searching for Patterns Split Across Lines......Page 967
34.18 Multiline Delete......Page 969
34.19 Making Edits Everywhere Except.........Page 971
34.20 The sed Test Command......Page 973
34.21 Uses of the sed Quit Command......Page 975
34.22 Dangers of the sed Quit Command......Page 976
34.23 sed Newlines, Quoting, and Backslashes in a Shell Script......Page 977
34.24.1 Syntax of sed Commands......Page 978
34.24.3 Alphabetical Summary of sed Commands......Page 979
BookmarkTitle:......Page 987
35.1 And Why Not?......Page 988
35.2 Neatening Text with fmt......Page 990
35.3 Alternatives to fmt......Page 992
35.4 recomment: Clean Up Program Comment Blocks......Page 993
35.5 Remove Mail/News Headers with behead......Page 995
35.6 Low-Level File Butchery with dd......Page 996
35.7 offset: Indent Text......Page 997
35.8 Centering Lines in a File......Page 999
35.9 Splitting Files at Fixed Points: split......Page 1000
35.10 Splitting Files by Context: csplit......Page 1003
35.11 Hacking on Characters with tr......Page 1006
35.12 Converting Between ASCII and EBCDIC......Page 1008
35.13 Other Conversions with dd......Page 1010
35.14 Cutting Columns or Fields with cut......Page 1011
35.15 Cutting Columns with colrm......Page 1012
35.16 Make Columns Automatically with cols......Page 1013
35.17.3 Order Lines Across Columns with -l......Page 1015
35.18 Pasting Things in Columns......Page 1017
35.19 Joining Lines with join......Page 1019
35.20 Quick Reference: uniq......Page 1021
35.21 Using IFS to Split Strings......Page 1022
35.22 Straightening Jagged Columns......Page 1024
35.23 Rotating Text......Page 1026
BookmarkTitle:......Page 1027
36.1 Putting Things in Order......Page 1028
36.2 Sort Fields: How sort Sorts......Page 1030
36.3 Changing the Field Delimiter......Page 1032
36.4 Confusion with White Space Field Delimiters......Page 1033
36.5 Alphabetic and Numeric Sorting......Page 1035
36.6.4 Dictionary Order......Page 1036
36.6.6 Reverse Sort......Page 1037
36.7 Sorting Multiline Entries......Page 1038
36.8 lensort: Sort Lines by Length......Page 1040
36.9 Sorting a List of People by Last Name......Page 1041
BookmarkTitle:......Page 1042
37.1 What We Do and Don't Tell You About Perl......Page 1043
37.2 Why Learn Perl? #1......Page 1044
37.3 Three Great Virtues of a Programmer......Page 1046
37.4 Why Learn Perl? #2......Page 1047
37.5 And Now, Perl 5......Page 1050
BookmarkTitle:......Page 1052
38.1 What's in This Chapter......Page 1053
38.2 fork and exec......Page 1055
38.3 Managing Processes: Overall Concepts......Page 1056
38.4 Subshells......Page 1058
38.5 The ps Command......Page 1060
38.6 The Controlling Terminal......Page 1063
38.7 Why ps Prints Some Commands in Parentheses......Page 1064
38.8 What Are Signals?......Page 1065
38.9 Killing Foreground Jobs......Page 1067
38.10 Destroying Processes with kill......Page 1068
38.11 Printer Queue Watcher: A Restartable Daemon Shell Script......Page 1070
38.12 Killing All Your Processes......Page 1072
38.13 Interactively Kill Processes Matching a Pattern......Page 1073
38.14 Processes Out of Control? Just STOP Them......Page 1075
38.15 Cleaning Up an Unkillable Process......Page 1076
38.16 Why You Can't Kill a Zombie......Page 1077
38.17 Automatically Kill Background Processes on Logout in csh......Page 1078
38.18 nohup......Page 1079
BookmarkTitle:......Page 1080
39.1 Which Time Is It?......Page 1081
39.2 Timing Programs......Page 1082
39.3 The csh time variable......Page 1084
39.4 Average Command Runtimes with runtime......Page 1087
39.5 Why Is the System So Slow?......Page 1088
39.6 lastcomm: What Commands Are Running and How Long Do They Take?......Page 1091
39.7 Checking System Load: uptime......Page 1093
39.8 A Big Environment Can Slow You Down......Page 1094
39.9 Know When to Be "nice" to OTher Users...and When Not to......Page 1096
39.9.3 System V C Shell nice......Page 1097
39.9.4 System V Standalone nice......Page 1098
39.10 A nice Gotcha......Page 1099
39.11 Changing a Job's Priority Under BSD UNIX......Page 1100
39.12.1 The CPU......Page 1101
39.12.4 User Communities......Page 1102
BookmarkTitle:......Page 1104
40.1 Off-Peak Job Submission......Page 1105
40.2 Waiting a Little While: sleep......Page 1107
40.3 The at Command......Page 1109
40.4 Choosing the Shell Run (We Hope) by at......Page 1110
40.5 Avoiding Other at and cron Jobs......Page 1112
40.6 System V.4 Batch Queues......Page 1113
40.7 Making Your at Jobs Quiet......Page 1114
40.8 Automatically Restarting at Jobs......Page 1115
40.9 Checking and Removing Jobs......Page 1116
40.10 nextday, nextweekday: Tomorrow or Next Weekday......Page 1117
40.11 Send Yourself Reminder Mail......Page 1118
40.12.1 Execution Scheduling......Page 1120
40.13 Adding crontab Entries......Page 1123
40.14 Including Standard Input Within a cron Entry......Page 1124
40.15 crontab Script Makes crontab Editing Easier/Safer......Page 1125
BookmarkTitle:......Page 1126
41.1 Delving a Little Deeper......Page 1127
41.2.1 How We Made It This Far (Back?)......Page 1129
41.2.2 Handling Most Characters......Page 1131
41.2.4 Flow Control (We Hope)......Page 1132
41.2.5 Then What?......Page 1133
41.3 Find Out Terminal Settings with stty......Page 1134
41.4.1 TAB Is Just Another Character to UNIX......Page 1135
41.4.2 Telling UNIX to Expand TABs......Page 1137
41.11.2 Encoding Arguments......Page 1138
41.5 Why Some Systems Backspace over Prompts......Page 1139
41.6 Using sleep to Keep Port Settings......Page 1140
41.7 Reading Verrrry Long Lines from the Terminal......Page 1141
41.8 ptys and Window Systems......Page 1142
41.9 Commands to Adjust Your Terminal......Page 1144
41.10 Using terminfo Capabilities in Shell Programs......Page 1145
BookmarkTitle:......Page 1148
41.11 How termcap and terminfo Describe Terminals......Page 1149
41.12 Finding Out What Characters Your Terminal's Special Keys Send......Page 1150
BookmarkTitle:......Page 1152
42.1 Making Sense Out of the Terminal Mess......Page 1153
42.2.4 Stalled Data Connection?......Page 1156
42.2.5 Aborting Programs......Page 1157
42.3 Why Changing TERM Sometimes Doesn't Work......Page 1159
42.4 Checklist for Resetting a Messed Up Terminal......Page 1160
42.5 Checklist: Screen Size Messed Up?......Page 1163
42.6.2 Screen Width and Height: screensize......Page 1166
42.6.3 Set Width, Test Line Wrapping: longlines......Page 1167
42.7 termtest: Send Repeated Characters to Terminal......Page 1169
42.8 Errors Erased Too Soon? Try These Workarounds......Page 1170
BookmarkTitle:......Page 1172
43.1 Introduction to Printing......Page 1173
43.2.1 System V Printing Commands......Page 1176
43.2.2 Berkeley Printing Commands......Page 1177
43.3 Printer Control with lpc......Page 1178
43.4 Using Different Printers......Page 1180
43.5 Using Symbolic Links for Spooling......Page 1182
43.6 Printing to a Terminal Printer......Page 1183
43.7 Quick-and-Dirty Formatting Before Printing......Page 1184
43.8 Fixing Margins with pr and fold......Page 1186
43.9 Indenting Text for Printing......Page 1187
43.10 Filename Headers Above Files Without pr......Page 1188
43.11 Big Letters: banner......Page 1190
43.12.2 TeX......Page 1191
43.12.4 WYSIWYG Document Processors......Page 1192
43.13 The Text Formatters nroff, troff, ditroff, .........Page 1194
43.14 nroff/troff and Macro Packages......Page 1196
43.15 From a Source File to the Printer......Page 1197
43.16 groff......Page 1199
43.17 Don't Have nroff? Try gnroff or awf......Page 1200
43.18 How nroff Makes Bold and Underline; How to Remove It......Page 1201
43.19 Removing Leading Tabs and Other Trivia......Page 1203
43.20 Displaying a troff Macro Definition......Page 1205
43.21 Preprocessing troff Input with sed......Page 1207
43.22 Converting Text Files to PostScript......Page 1209
43.23 psselect: Print Some Pages from a PostScript file......Page 1211
43.24 Other PostScript Utilities......Page 1213
43.25 The Portable Bitmap Package......Page 1215
BookmarkTitle:......Page 1220
44.1 Everyone Should Learn Some Shell Programming......Page 1221
44.2 Writing a Simple Shell Program......Page 1224
44.3.4 Shell Search Paths......Page 1227
44.3.5 Bourne Shell Used Here......Page 1228
44.4 Testing How Your System Executes Files......Page 1229
44.5 Test String Values with Bourne Shell case......Page 1231
44.6 Pattern Matching in case Statements......Page 1232
44.7 Exit Status of UNIX Processes......Page 1233
44.8 Test Exit Status with the if Statement......Page 1234
44.9 Testing Your Success......Page 1236
44.10.2 Looping Until a Command Fails......Page 1237
44.11 Set Exit Status of a Shell (Script)......Page 1239
44.12 Trapping Exits Caused by Interrupts......Page 1240
44.13 read: Reading from the Keyboard......Page 1242
44.14 Putting awk, sed, etc., Inside Shell Scripts......Page 1243
44.15.2 With a Loop......Page 1245
44.15.3 Counting Arguments with $#......Page 1246
44.16 Handling Command-Line Arguments with a for Loop......Page 1247
44.17 Handling Arguments with while and shift......Page 1249
44.18 Standard Command-Line Parsing......Page 1251
44.19 The Bourne Shell set Command......Page 1253
44.20 test: Testing Files and Strings......Page 1255
44.21 Picking a Name for a New Command......Page 1257
44.22 Finding a Program Name; Multiple Program Names......Page 1258
44.23 Reading Files with the . and source Commands......Page 1259
BookmarkTitle:......Page 1260
45.1 Beyond the Basics......Page 1261
45.2 The Story of : # #!......Page 1264
45.3 Don't Need a Shell for Your Script? Don't Use One......Page 1265
45.4 Fun with #!......Page 1267
45.5 A File That Shows Itself... and What #! Does......Page 1269
45.6 Making Sure Your Script Runs with Bourne Shell, Without #!......Page 1271
45.7 The exec Command......Page 1272
45.8 Handling Signals to Child Processes......Page 1273
45.9 The Unappreciated Bourne Shell ":" Operator......Page 1275
45.10 Removing a File Once It's Opened - for Security and Easy Cleanup......Page 1277
45.11 The Multipurpose jot Command......Page 1279
45.12 Parameter Substitution......Page 1283
45.13 Save Disk Space and Programming: Multiple Names for a Program......Page 1285
45.14 Finding the Last Command-Line Argument......Page 1287
45.15 How to Unset all Command-Line Parameters......Page 1288
45.16 Standard Input to a for Loop......Page 1289
45.17 Making a for Loop with Multiple Variables......Page 1290
45.18.2 Use with Loops......Page 1291
45.19 A while Loop with Several Loop Control Commands......Page 1293
45.20 Overview: Open Files and File Descriptors......Page 1294
45.21 n>&m: Swap Standard Output and Standard Error......Page 1296
45.22 Handling Files Line-by-Line......Page 1300
45.23 The Ins and Outs of Redirected I/O Loops......Page 1304
45.24 A Shell Can Read a Script from its Standard Input, But.........Page 1306
45.25 Shell Scripts On-the-Fly from Standard Input......Page 1307
45.26 Quoted hereis Document Terminators: sh vs. csh......Page 1309
45.27 Turn Off echo for "Secret" Answers......Page 1310
45.28 Quick Reference: expr......Page 1311
45.28.1 Examples......Page 1312
45.29 Testing Characters in a String with expr......Page 1314
45.30.2 Using echo with awk, colrm, or cut......Page 1315
45.30.4 Using sed......Page 1316
45.31 Nested Command Substitution......Page 1318
45.32 A Better read Command: grabchars......Page 1320
45.33 Testing Two Strings with One case Statement......Page 1322
45.34 Arrays in the Bourne Shell......Page 1323
45.35.2 With tr and echo......Page 1324
45.36 Shell Lockfile......Page 1326
BookmarkTitle:......Page 1328
46.1.1 Use -xv......Page 1329
46.1.5 Line Numbers Reset Inside Redirected Loops......Page 1330
46.2 Quoting Trouble? Think, Then Use echo......Page 1331
46.3 Bourne Shell Debugger Shows a Shell Variable......Page 1333
46.4 Stop Syntax Errors in Numeric Tests......Page 1334
46.5 Stop Syntax Errors in String Tests......Page 1335
46.6 Watch Out for Bourne Shell -e Bug......Page 1336
46.7 Quoting and Command-Line Parameters......Page 1337
46.8 Test Built-In Commands for Failure......Page 1340
46.9 If Command Doesn't Return a Status, Test the Error Messages......Page 1341
46.10 A Portable echo Command......Page 1343
BookmarkTitle:......Page 1345
47.1 Why Not?......Page 1346
47.2.1 File Descriptors......Page 1347
47.2.2 Command Orthogonality......Page 1348
47.2.4 Quoting......Page 1350
47.2.6 Expression Evaluation......Page 1351
47.2.8 Random Bugs......Page 1352
47.3 Conditional Statements with if......Page 1354
47.4.3 Operators......Page 1355
47.4.4 Examples......Page 1357
47.5 Using C Shell Arrays......Page 1358
47.6 Quick Reference: C Shell switch Statement......Page 1360
BookmarkTitle:......Page 1361
48.1 Well, What Else Could We Call It?......Page 1362
48.2 Online Phone and Address Lists......Page 1363
48.3 A Scratchpad on Your Screen......Page 1365
48.4.1 How calendar Works......Page 1366
48.4.3 Automating Your Own Calendar......Page 1367
48.5 leave: A Maddening Aid to Quitting on Time......Page 1369
48.6 Get Calendar for Any Month or Year: cal......Page 1371
48.7 cal That Marks Today's Date......Page 1372
48.8 Calendar for 132-Column Terminals or Printers......Page 1374
48.9 PostScript Calendars with pcal......Page 1375
48.10 Working with Names and Addresses......Page 1378
48.11 The index Database Program......Page 1383
48.12 Using index with a Filter......Page 1386
BookmarkTitle:......Page 1388
49.1 bc: Simple Math at the Shell Prompt......Page 1389
49.2 bc: Hexadecimal or Binary Conversion......Page 1391
49.3 Gotchas in Base Conversion......Page 1392
49.4 bc's Sine and Cosine Are in Radians......Page 1393
49.5 Base Conversion Using cvtbase......Page 1394
49.6 Quick Arithmetic with expr......Page 1395
49.7 Total a Column with addup......Page 1396
49.8 It's Great to Have a Spreadsheet......Page 1397
49.9 Business Graphics with ipl......Page 1398
BookmarkTitle:......Page 1399
50.1 UNIX Online Documentation......Page 1400
50.2 The apropos Command......Page 1402
50.3 apropos on Systems Without apropos......Page 1403
50.4 whatis: One-Line Command Summaries......Page 1405
50.5 whereis: Finding Where a Command Is Located......Page 1406
50.6 Searching Online Manual Pages......Page 1407
50.7 How UNIX Systems Remember Their Name......Page 1409
50.8 Which Version Am I Using?......Page 1410
50.9 Reading a Permuted Index......Page 1412
50.10 Make Your Own Man Pages Without Learning troff......Page 1414
50.11 Writing a Simple Man Page with the -man Macros......Page 1417
50.12 Common UNIX Error Messages......Page 1419
BookmarkTitle:......Page 1422
51.1 We Are Finally Getting to the Bottom of the Bucket......Page 1423
51.2 How UNIX Keeps Time......Page 1424
51.3 ASCII Characters: Listing and Getting Values......Page 1425
51.4 Who's On?......Page 1427
51.5 Copy What You Do with script......Page 1428
51.6 Cleaning script Files......Page 1429
51.7 When You Get Impatient......Page 1430
51.8 Type Bang Splat. Don't Forget the Rabbit Ears......Page 1431
51.9 Making a "Login" Shell......Page 1432
51.10 The date Command......Page 1434
51.11 Making an Arbitrary-Size File for Testing......Page 1435
51.12 You Don't Have Enough Smileys?......Page 1436
BookmarkTitle:......Page 1438
52.1 Introduction......Page 1439
52.2 Where Does Free Software End and UNIX Begin?......Page 1441
52.3 Shrink-Wrapped Software for UNIX......Page 1442
52.4 Quick Descriptions of What's on the Disc......Page 1444
52.5.1 CD-ROM Formats......Page 1459
52.5.2 Mounting the CD-ROM......Page 1460
52.5.3 Installing Pre-Compiled Binaries......Page 1461
52.5.5 What to Do if You Have Problems......Page 1469
52.6 Don't Have a CD-ROM Drive?......Page 1470
52.7.2 Online Archive......Page 1471
52.8.1 Running the Build Scripts......Page 1474
52.8.2 Compiling Source Code......Page 1476
52.9 Software Support from RTR......Page 1486
Index......Page 1487
Table of Contents......Page 1488
Part VI: Managing Processes......Page 1497
BookmarkTitle:......Page 1498
BookmarkTitle:......Page 1500
Part I: Making Yourself at Home......Page 1501
BookmarkTitle:......Page 1502
Part II: Let the Computer Do the Dirty Work......Page 1503
BookmarkTitle:......Page 1504
Part III: Working with the Filesystem......Page 1505
BookmarkTitle:......Page 1507
Part IV: Looking Inside Files......Page 1508
BookmarkTitle:......Page 1509
Part V: Text Editing......Page 1510
BookmarkTitle:......Page 1511
Part VI: Managing Processes......Page 1512
BookmarkTitle:......Page 1513
Part VII: Terminals and Printers......Page 1514
BookmarkTitle:......Page 1515
Part VIII: Shell Programming......Page 1516
BookmarkTitle:......Page 1517
Part IX: Miscellaneous......Page 1518
BookmarkTitle:......Page 1519
A Book for Browsing......Page 1520
Like an Almanac......Page 1521
Like a News Magazine......Page 1522
Like a Hypertext Database......Page 1523
Programs on the CD-ROM......Page 1524
About UNIX Versions......Page 1525
Cross-References......Page 1526
What's New in the Second Edition......Page 1527
Typefaces and Other Conventions......Page 1528
The Authors......Page 1530
The Fine Print......Page 1534
Request for Comments......Page 1535
Acknowledgments......Page 1536
Acknowledgments for the Second Edition......Page 1539




نظرات کاربران