By Grace Todino-Gonguet, John Strang, Jerry Peek
Cover | Table of Contents | Colophon
login:
login:
command option(s) filename(s)
;).
Commands entered this way are executed one after another by the shell.
%) inside.
If you enter a UNIX command (like date), it will run just as it would on
a non-window terminal.
_____________________________ Program to quit last
/).cat file(s)
% cat /etc/passwd root:x&k8KP30f;(:0:0:Root:/: daemon:*:1:1:Admin:/: . . . %
more file(s)
% more ch03 A file is the unit of storage in UNIX as in many other systems. A file can be anything: a program, . . . --More--(47%)
x) permission to
all of its parent directories, all the way up to the root.mail address1 address2 ...
username@hostname
PATH=/bin:/usr/bin:/usr/local/bin: export PATH /usr/games/fortune date umask 002 stty erase ^H intr ^C
set path = (/bin /usr/bin /usr/local/bin .) /usr/games date umask 002 stty erase ^H intr ^C
PATH= or set path = tells the shell
which directories to search for UNIX commands.
This saves you the trouble of typing the complete pathname for each program
you run.
(Notice that /usr/games isn't part of the path, so we had to use
the absolute pathname to get our daily dose of wisdom
from the fortune command.)rw-r--r--
(read-write by owner, but read-only by everyone else),
and 002 will produce rw-rw-r--
(read-write by owner and group, but read-only by everyone else).
If this file is a program or a directory, both umasks will also give
execute (x) permission to all users.
See one of the books in Appendix A or your UNIX documentation for details./, which is
reserved as the separator between files and directories in a pathname.
Filenames are usually made of upper- and lowercase letters, numbers,
"." (dot), and "_" (underscore). Other characters (including spaces)
are legal in a filename—but they can be hard to use because the shell
gives them special meanings. So we recommend using only letters,
numbers, dot, and underscore characters./, which is
reserved as the separator between files and directories in a pathname.
Filenames are usually made of upper- and lowercase letters, numbers,
"." (dot), and "_" (underscore). Other characters (including spaces)
are legal in a filename—but they can be hard to use because the shell
gives them special meanings. So we recommend using only letters,
numbers, dot, and underscore characters..) in
a filename; in fact, you can use as many as you want.
For instance, the filenames pizza and this.is.a.mess
are both legal.?
(question mark), and [ ] (square brackets). When used in a
filename given as an argument to a command:% ls chap10 chap2 chap5 cold chap1a.old chap3.old chap6 haha chap1b chap4 chap7 oldjunk % ls chap? chap2 chap5 chap7 chap4 chap6 % ls chap[5-8] chap5 chap6 chap7 % ls chap?? chap10 chap1b % ls *old chap1a.old chap3.old cold % ls *a*a* chap1a.old haha
mkdir dirname(s)
% mkdir spy boston.dine
cp old new
% cp /etc/passwd password %