By Jerry Peek, Grace Todino-Gonguet, John Strang
Price: $19.95 USD
£13.95 GBP
Cover | Table of Contents | Colophon
command option(s) filename(s)
-,
also called "hyphen" or "minus")
and set off by any
number of spaces or tabs.
Multiple options in one command line can be set off individually
(such as -a -b).
In some cases, you can combine them after a single dash
(such as -ab)—but most commands'
documentation doesn't tell you whether this will work; you'll have to
try it.
http://www.xfree86.org/current/manindex1.html.
_____________________________ Program to quit last
pico
report, the
Pico editor is started on a file named report in your working
directory.
But if you type a command such as
pico
less option(s) file(s)
$ less ch03
A file is the unit of storage in Unix, as in most other systems.
A file can hold anything: text (a report you're writing,
.
.
.
:
:)—although, for the first screenful,
less displays the file's name as
a prompt.
The cursor sits to the right of this prompt as a signal for you to
enter a less command to tell
less what to do.
M (without a dash) in your shell setup file.
See Section 3.7, later in this chapter.)
$ cp /etc/pa TAB (beep) TAB pam.d paper.config passwd passwd- passwd.OLD $ cp /etc/pa
/etc/passwd.
PATH='/bin:/usr/bin:/usr/local/bin:' LESS='eMq' export PATH LESS /usr/games/fortune date umask 002
set path = (/bin /usr/bin /usr/local/bin .) setenv LESS 'eMq' /usr/games/fortune date umask 002
PATH= or set path =
tells the shell which directories to search for Unix programs.
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 program.)
The export PATH is needed in the
.profile, but not in
.login.
LESS= or setenv LESS
tells the less program which options you
want to set every time you use it.
This saves you the trouble of typing the options on every less command line.
The export LESS line is needed in the
.profile, but not in .login.
/, which is
reserved as the separator between files and directories in a pathname.
Filenames are usually made of upper- and lowercase letters, numbers,
"." (dots), and "_" (underscores).
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, dots, and underscore
characters.
You can also use "-" (dashes), as long as they aren't the first character
of a filename, which can make a program think the filename is an
option.
$ ls -l total 2 -rw-r--r-- 1 jpeek users 0 Oct 23 11:23 a confusing name -rw-r--r-- 1 jpeek users 1674 Oct 23 11:23 ch01 $ rm a confusing name rm: a: no such file or directory rm: confusing: no such file or directory rm: name: no such file or directory $ rm "a confusing name" $
.) 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.