Copyrighted Material
Total Page:16
File Type:pdf, Size:1020Kb
4354indx.fm Page 427 Wednesday, October 20, 2004 10:58 AM Index Note to the reader: Throughout this index boldfaced page numbers indicate primary discussions of a topic. Italicized page numbers indicate illustrations. Symbols A Applications folder, 161 - (dash), in file names, 51 absolute mode for chmod command, 299 utilities subfolder, 1 !$ shortcut, for substituting arguments, 140 changing permissions, 300–301 apropos command, 41 !! command, 140 and sticky bit, 304 man page for, 44 ! (exclamation point) absolute paths, 53–55 overview, 42 for negating commands, 194 for cd command, 77 archives as shortcut for commands, 144 for symbolic links, 114 adding multiple files to, 264 # symbol for comments accented characters, in file names, 52 disk images for, 270–275 in /etc/sudoers file, 315 active memory, 363 finding text in compressed, 185 in crontab file, 418 Activity Monitor, 367 tar to create, 267–269 in .tcshrc file, 411 administrator accounts, 278–279 arguments for commands, 4, 35, 38–39 $ (prompt character), 2, 13 password for cloning Mac OS X command editing to change, 141 % prompt, 13 startup volume, 126 shortcut for substituting, 140 * (asterisk) as wildcard, 52, 192–193 and sudo command, 306 arrow key shortcuts, 150 cp (copy) command with, 100 –101 administrator processes, 361 asr (Apple Software Restore) command, 393 in find command, 172 Aladdin’s StuffIt, 261, 269 asterisk (*) as wildcard, 52, 192–193 in ls listing, 64 alerts, bell or flashing window as, 17 cp (copy) command with, 100 –101 in wc command, 212 aliases, 112–118 in find command, 172 . (dot) for combining commands, 420–421 in ls listing, 64 for current directory, 7 and command line, 114–115 in wc command, 212 as initial directory file, 79, 81 with open command, 156 attributes for files leading, in file names, 53, 64 properties and usage, 117 GetFileInfo command to return, .. (dot dot), as initial directory file, 79, 81 removing, 416 397–398 .. (parent directory), 8, 55 for rm command, 109 SetFile command for, 398 moving to, 81 setting shell, 414–416 audible bell, 17 opening in Finder, 154 for Terminal, 10 autodiskmount utility, 125 / (slash), 50 for users, in /etc/sudoers file, autolist variable (tsch), 135, 136 in ls listing, 64 315–316 automating commands, 418–424 : (colon) viewing listing, 416 with AppleScript, 422–423 and file names, 50 Alsoft Disk Warrior, 386 combining commands, 420–421 in Terminal window, 45 anti-aliasing, 21 creating double-clickable command ? (question mark) as wildcard, 193 appending files, 421–422 for special characters in file names, 52 command output to file, 89 B [ ] (brackets) as wildcards, 193–194 concatenated files to another file, backups \ (backslash) as escape character, 196 201–202 across network, 123 \! (not) operator, for find command, 177 Apple Developer Connection, 394 ditto command for, 119, 121–122 ^ (caret) Apple Developer Tools. See Developer COPYRIGHTED MATERIALof NetInfo database, 282–283 for Control key, 228 Tools rsync command for, 329 for typing corrections, 152 Apple Software Restore (asr) command, Bash Reference Manual, 402 _ (underscore), in file names, 52 393 bash shell, 9, 11, 401 { } characters as wildcards, 194–195 AppleCare protection, 386 CDPATH variable, 81 ~ (home) directory, 4 AppleDouble files, 119 command completion, 136–138 ~ (tilde) AppleScript, 422–423 command history, 85, 138, 144–146 in file names, 51 applications environment variables for, 406–410 for navigation shortcuts, 78 ditto command to copy, 120–121 escaping non-ASCII characters, 17 < (input redirection operator), 89–90 open command for, 155–156 history file, 147 > (output redirection operator), 75, 89 report on, 376 information about, 151 4354indx.fm Page 428 Wednesday, October 20, 2004 10:58 AM 428 .BASH_LOGIN FILE • COMMANDS noclobber variable, 90 C closing Terminal windows, 26 prompt, 61 cancel command, 253–254 collating printed documents, 248 setting default editor, 234 overview, 254 colon (:) shutdown process, 404 Carbon Copy Cloner, 124 and file names, 50 startup process, 402–403 caret (^), for typing corrections, 152 in Terminal window, 45 turning off case sensitivity for filename carriage returns, newlines as, 17 color output, from ls command, 73 completion, 133 case sensitivity, 131 color settings for Terminal display, 22 .bash_login file, bash shell use of, 403 of command options, 5, 35 .command extension, 421 .bash_profile file, 406 for filename completion, 131 command history, 138–150 bash shell use of, 403 turning off, 133 with bash, 144–146 HISTCONTROL variable, 147 of grep command, 181 fc command, 145–146 history search shortcut setup, 145 of locate command, 167 quick search, 145 HISTSIZE variable, 147 symbolic links and, 118 clearing, 148–149 settings for ls command color display, cat (concatenate) command, 6, 201–203 displaying, 143 73 overview, 202 editing commands, 140–142 shell aliases in, 414 cd (change directory) command, 5–6, 8, modifying commands, 140 BBEdit, 227 38–39, 75–86 numbers for short list, 149 and grep, 185 with ftp, 337 running specific command, 144 setting as default editor, 234 navigation shortcuts, 77–83 shortcut, 139 BBEdit Lite, 227 to home directory, 77–78 variable, 147–148 bell as alert, 17 moving back and forth, 79 command-line interface, 10 binary files, file command and, 200 moving up and down, 79, 81 alias and, 114–115 bind command (bash), 150 overview, 82 commands from within AppleScripts, bindings. See keyboard shortcuts in CDPATH variable for bash shell, 81 422 Terminal cdpath variable for tcsh shell, 81 compiling AppleScripts from, 422 bindkey command (tcsh), 150 character classes for file management, 98 “bit-bucket” directory, sending error in grep, 187 for printer management, 255 messages to, 172 in tr command, 220–221 for quitting processes, 371–373 bless command, 386–387 character set encoding, 21 for user account creation, 280–281 overview, 387 characters command mode in vi, 235 blinking cursor, 20 replacing, 219–221 “Command not found” error message, 50 blinking text, 21 wc command to count, 212 commands block cursor, 19 chmod command, 299, 424 aliases for shortcuts, 414 Bombich, Mike, 124 absolute mode, 300–301 arguments for, 38–39 boot process, 384 overview, 302 required, 36 in single user mode, 385 recursive permission changes, 301 automating, 418–424 boot volume, mounted position, 59 symbolic mode, 299–300 with AppleScript, 422–423 bracket expressions in grep, 187 chown (change owner) command, combining commands, 420–421 brackets ([ ]) as wildcards, 193–194 296–298 creating double-clickable BrickHouse, 358 overview, 298 command files, 421–422 buffer in Terminal chsh command, 13, 406 with cron, 418–420 clearing, 151 classes completion, 136–138 printing, 258 in grep, 187 grouping, 39 settings, 17–19, 18 in tr command, 220–221 listing all, 138 builtin man page, 46 Classic Environment, 155 options for, 37–38 bunzip2 command, 266 open command for applications, 155 parts, 35 overview, 266 starting and stopping from command piping results to pager, 210 byte count, from wc command, 211, 212 line, 373 printing results, 255 .bz2 file extension, 265 clearing command history, 148–149 running single remotely, 324–325 bzgrep command, 185 cloning, startup volume, for Mac OS X file shell processing of, 11–12 bzip2 command, 265–266 system, 124–127 syntax, 4, 35–39 overview, 266 Close Window alert, 16, 16 .term files to run, 33–34 without options, 35–36 4354indx.fm Page 429 Wednesday, October 20, 2004 10:58 AM COMMON UNIX PRINTING SYSTEM (CUPS) • DO SHELL SCRIPT COMMAND 429 Common Unix Printing System (CUPS), cursor ditto command to copy, 119–123 245 display settings, 19–20 execute permission for, 302 web browser interface, 256–257 moving in command line, 17 hierarchy of, 58 compiling AppleScripts, 422 cut and paste in Pico, 228, 230 limiting users to commands in specific, complete-ignore-case variable (bash), 136 316 complete variable (tsch), 136 D in Mac OS X home directory, 161, compress command, 269 dash (-) in file names, 51 162 compressed archives, finding text in, 185 data fork, 98, 395 moving, 104–105 compressed files, 261–262 database names, 50–51 with bzip2 command, 265–266 for locate command, 168–169 open command for, 154 decompressing, 266 periodic weekly command to opening current working in Finder, 81 decompressing, with gunzip, 264 create and update, 387 permissions, 303, 303–304 disk images, 272–273 for whatis command, building, 42 reading contents, 4–5 with gzip, 262–265 decompressing sticky bit, 304 using wildcards with commands, 267 disk images, 273 synchronizing, 123, 329–332 variations, 262 zip archives, 264 for .term files, 32 concatenating files, 201–202 default shell, 13 in Unix file system, 60 Connect to server dialog, 30, 30 opening in new window, 26 viewing contents. See ls (list directory) control characters, 50 deleting command copy and paste in Terminal, 31 directories, 107–108 dirs command, 85 copying. See also cp (copy) command files and directories, 7–8 overview, 86 applications with ditto, 120–121 groups, 293 disk images for archives, 270–275 directories with ditto, 119–123 user accounts, 284–285 compressing and uncompressing, files across network, 326–328 Desktop, 161 272–273 Courier font for Terminal display, 20 Developer Tools, 394–399 creating from directory, 272 cp (copy) command, 99–104 command-line interface, 394–395 Internet-enabled, 275 and changing file name, 101–102 CpMac command, 98, 119, 394, mounting and unmounting, 272 to copy directories, 102 395–396 sparse, 271 overview, 102 GetFileInfo command, 394, 397–398 Disk Utility, 270, 380