| Introduction | Getting Started | Using Unix | Your Environment |
On-line help for UNIX system commands and utilities is in the form of
man pages (man stands for manual) which consist of an on-line
version of the UNIX documentation set (often called the UNIX Programmer's
Reference Manual). You access the man pages with the man command.
Note that the man pages differ in many instances between UNIX platforms. Also note that to access the man pages for ups products, you may have to setup the product first.
The man Command | Manipulating man Pages | Printing man Pages | Finding Commands | Vendor Documentation
When you need help on a known command, use the general man command format:
% man [part] topic
where topic is generally a UNIX command. man is really the on-line manual which is divided into several parts. part is a digit between 0 and 9. If you know in advance which part contains the information you want, you can speed the search by specifying it. More often than not you will just enter:
% man topic
The word print in man entries usually means display on
the screen. Don't be confused by this. Several options are available with
the man utility, described under man man. The man command normally displays complete manual pages that you select by name.
One-line summaries can be selected by either by keyword (-k option), or by the name of an associated file (-f).
A typical initial man screen can be seen by issuing the command:
% man ls
where ls is the UNIX command to list files in a directory.
Man pages are typically formatted with the UNIX text processing
utility nroff (or groff). These utilities are covered in most
UNIX texts. If you find that the man page is unformatted, run setup groff, and then rerun the man
command.
Note that built-in shell commands are described under the topic
corresponding to their shell. For example, to get information on the command alias for your current shell, you would enter man shell (e.g., man bash) and search there for information on
alias using the /pattern function described below.
There is an alternate, "quick and dirty" method to verify the format of
a command and get a listing of its options. It doesn't work with all commands,
but is usually worth a try. Simply enter the command with an illegal option
(try / or ? or .). For example,
% ls -/
will produce the output:
ls: illegal option -- / usage: ls -RadCLHxmnlogrtucpFbqisf [files]
Normally, man gives you one page at a time and lets you enter commands
at the prompt to control what it does after each page. For example, you page
forward with the Spacebar and page backward using b.
Once in the man environment, you can search for patterns by
entering the /pattern option at the command line. The first instance of the string
pattern will appear in the top line of the screen. To find
additional instances of the pattern in the text, simply enter a slash (/).
To exit from man enter q (for quit).
To print a man page, you can use the pipe feature (|) along with recommended print formatting and printing commands. As a
suggestion, pipe the output of the man command to a2ps -m (to convert man pages to PostScript format) and then pipe that
output to the print command flpr:
% man command | a2ps -m | flpr [options]
This formats the output nicely in landscape, two pages to a sheet.
If you don't know exactly what command you need, try the -k option with a keyword.
% man -k keyword
This displays the man page name, the section number in the UNIX documentation, and a short description for each man page whose name line contains keyword. For example to find a search utility, enter:
% man -k search
Some UNIX systems have an additional utility, apropos, which can be used to locate commands by keyword lookup:
% apropos keyword
apropos is equivalent to man -k
The -f filename option for man prints the manual entry summaries which might pertain to the given
filename(s). Any leading pathname components are stripped from the filename
before the filename is matched against the summaries. Here is an example using
the -f option, followed by the output:
% man -f /etc/passwdpasswd (1) - change login password and password attributespasswd (4) - password file
Most vendor product documentation is now available on-line, viewable with an X-terminal or workstation.
Platform: Command:
AIX info
IRIX insight
OSF1 dxbook
| d0web-support@fnal.gov | |
| Security, Privacy, Legal | |
| Last modified: May 07, 2004 11:20:15 AM CDT | |