370 likes | 568 Views
10. UNIX and Linix Commands and Utilities. UNIX and Linux. UNIX Bell Labs, 1970s Ken Thompson and Dennis Ritchie Linux University of Helsinki Linus Torvald Kernel 1.0 released in 1994. Fig. 10.1: UNIX commands are processed by a shell. Bourne shell C shell Bourne Again shell.
E N D
10 UNIX and Linix Commands and Utilities
UNIX and Linux • UNIX • Bell Labs, 1970s • Ken Thompson and Dennis Ritchie • Linux • University of Helsinki • Linus Torvald • Kernel 1.0 released in 1994
Fig. 10.1: UNIX commands are processed by a shell. • Bourne shell • C shell • Bourne Again shell
Fig. 10.6: who displays the names of users currently logged on the system.
Fig. 10.7: UNIX file names. The UNIX file system allows you to save and retrieve files by name.
Directories • Root directory • The system’s lowest level directory • Home directory • The user’s initial directory • Working directory • The user’s current base directory
Fig. 10.9: You must specify a complete pathname to uniquely identify a file.
Fig. 10.12: The files in the referenced directory are listed in alphabetical order.
Fig. 10.18: The contents of the root directory and of directory users.
Fig. 10.20: The message displayed by the visual editor after it has created a file.
Fig. 10.21: Use the concatenate (cat) utility to display the contents of one or more files.
Fig. 10.22: Following a catcommand, the contents of all the files are displayed one after another.
Fig. 10.24: When a file is copied, its name appears in the new directory.
Fig. 10.25: The same file can be referenced in more than one directory by creating a link.
Wildcard Characters • ? • a single character • * • one or more (usually more) characters
Pipes, Filters, and Redirection • Redirection: dynamically changing the default input or output device • Filter: a command that reads the standard input device, filters (or modifies) the data, and writes to the standard output device. • Pipe: An operator that causes one command’s standard output to be used as the standard input to another command.
Fig. 10.29: With pipes, one utility’s standard output becomes another’s standard input.
Other Useful Commands • lpr contents of file to line printer • vi the visual editor • nroff format text • troff prepare output for phototypesetter • eqn set up equation • tbl format tables • spell spell checker