man
Command
Unix does not have an online help facility like VMS; instead, it has a man command which will display a section from the Unix manuals on your screen. Since each command has its own manual page(s), the effect is very similar to that of HELP on VMS - except that you must know the name of the command before you can ask for the manual page for it! Also, note that when you display the manual page you get the full documentation for the command; thus, you can learn all about the system without having access to printed documentation. On the other hand, this also means that there are no subtopics you can ask for individually - you get everything there is to know about the command.
For example:
man cd
will display documentation on the cd command,
man man
will display documentation on man itself.
The man command will display one screen full of text, and then pause with the following message appearing at the bottom of the screen:
-- More --
At this point, you may type any of the following:
displays one more line and pauses again,
displays one more screen full and pauses again,
exits man and returns you to the command interpreter (shell),
moves forward half a screen full and pauses again.
Silicon Graphics workstations running IRIX have a complete set of documentation on line. This can be found by selecting Help in the Toolchest and further selecting one of the items listed there.
The following table shows some of the commands VMS users use frequently, together with the Unix equivalent. In all cases, full information about the Unix command can be obtained by using man. Boldface is used for actual Unix commands you type; normal typeface for parameters you must supply following the command. Some parameters are optional; these are enclosed in brackets. Numbers in parentheses after the Unix command refer to notes below:
VMS Command Unix equivalent
--- ------- ---- ----------
COPY fromfile tofile cp fromfile tofile
CREATE/DIRECTORY directory mkdir directory
DELETE file rm file
DELETE directory rmdir directory
DELETE [...]*.*;* rm -r directory (1)
(Delete all files in a directory,
including subdirectories and their
files.)
DIRECTORY [directory or file] ls [path] (2)
DIRECTORY/FULL [directory or file] ls -l [path] (2)
PRINT filename lp filename (3)
RENAME oldname newname mv oldname newname
RUN program program (4)
SET DEFAULT directory cd path
SHOW DEFAULT pwd
SET PASSWORD passwd
SET PROTECTION=protection file chmod protection file (5)
SET PROTECTION=protection/default umask protection (5)
SHOW PROTECTION umask (5)
SHOW USERS who
SHOW SYSTEM/SUBPROCESSES ps (6)
TYPE file cat file
Notes on the above:
The Unix command also deletes the directory - not just all the subdirectories and files.
The Unix path may name either a directory or a file. If it is a directory, its contents are listed; if a file, just information on that file is listed. If no path is specified, the contents of the current default directory are listed.
There are two different printing systems in the Unix world. The
version used by IRIX was originally supplied with the AT&T
version of Unix uses the lp
command to print files. The
other system, supplied with Berkeley Unix systems (and used in
Linux) uses the "lpr" command to print.
Note that almost all Unix commands do, in fact, run a program of the
name specified by the command - e.g. ls
runs the program
/bin/ls
; cat
runs /bin/cat
etc. The
shell maintains a list of directories it searches to try to find a
file with the name specified on the command line in order to run it.
This list includes a number of system directories, plus the bin
sub-directory of your home directory - which is where you should put
all of your private executable programs to facilitate access to them
regardless of what your current default directory is.
See the documentation for chmod for the format for specifying
protections. Note that umask always shows a protection in numeric
form, and requires you to specify it in this form as well. See the
manual page for chmod
for details, and note that there is
no manual page for umask
as a command (though there is one
for the umask
system service.) since it is built in to
bash
(the command interpreter), see the manual page for
bash
for more information.
By default, the ps
command lists only sub-processes
belonging to you; this can be overridden by command switches
described on the manual page for ps
.