MAN(1) MAN(1)
NAME
man - print entries from the on-line reference manuals; find manual
entries by keyword
SYNOPSIS
man [-cdwWtpr] [-M path] [-T macropackage] [section] title ...
man [-M path] -k keyword ...
man [-M path] -f filename ...
DESCRIPTION
man locates and prints the titleed entries from the on-line reference
manuals. man also prints summaries of manual entries selected by keyword
or by associated filename.
If a section is given, only that particular section is searched for the
specified title. The current list of valid sections are any single digit
[0-9], the letter 'D', plus the sections local, public, new, and old,
corresponding to the sections l, p, n, and o, respectively. When a
section name of this form is given, the first character is used to form
the directory, thus "local", will cause directories ending in "manl" to
be searched. To find a man page with the name of one of these sections,
it is necessary to first give a dummy name, such as "man junk local",
which is unfortunate.
If no section is given, all sections of the on-line reference manuals are
searched and all occurrences of title are printed. The default sections
are searched in this order: 1nl6823457poD
Manual entries are retrieved in the following order: for each root
directory in the search path, language specific directories are searched
first (see discussion of the LANG environment variable below), followed
by generic directories. Within each of those searches, local additions
are searched first, followed by the standard manual directories. In each
leaf directory, there may be actual pages or subdirectories. If the
subdirectory name has the format cat[1-8lnopD] then the pages in that
subdirectory are treated as pre-formatted "cat" manual entries. If the
subdirectory name has the format man[1-8lnopD] then the pages in that
subdirectory are treated as unformatted nroff(1) source manual entries.
Unformatted manual entries will be processed by neqn(1), tbl(1),
nroff(1), and col(1). (See the CAVEATS section concerning formatting
unformatted manual pages.) These must be installed with a standard
suffix, such as .1m, in order for the man command to find them (i.e.,
name, period, suffix). The "cat" manual entries are be compressed to
save disk space using pack(1) or compress(1); all pre-formatted man pages
must be compressed with one of the abvoe in order for the man command to
find them. man will automatically uncompress compressed "cat" manual
entries using pcat(1) and zcat(1) respectively.
After the local additions are searched, the standard pre-formatted manual
entries in /usr/share/catman/[agpu]_man are searched.
After searching /usr/share/catman, man will search /usr/share/man ,
/usr/catman , then /usr/man , for manual pages. The user may override
these default root directories for manual entries with the environment
variable MANPATH or with the command-line options -M and -d. (See
discussion below.)
IRIX is derived from four main sources: AT&T, Berkeley, MIPS Computer
Systems, and Sun Microsystems. Because development at these sources is
more or less independent, in several cases programs have been given the
same name but have vastly different functionality. The manual entries
for such programs have been distinguished by giving them suffixes: _att,
_bsd, _mips, or _sun. You do not need to give the suffixes. If man is
given an un-suffixed title title for which suffixed entries exist, it
will display all of them.
Searches for titles, keywords, and filenames are case-insensitive. For
example, the manual entry RGBcolor(3G) can be gotten by the command-line:
man rgbcolor
Also, titles, keywords, and filenames may contain special characters
allowing manual pages to looked up by only specifying partial names in
much the same way that sh(1) and csh(1) match file names. For example,
the summaries of manual entries pertaining to RGB writemasks may be
searched by the command-line:
man -k 'rgb*mask'
The complete set of special characters is as follows:
* Match any sequence of characters, including none-at-all.
? Match any single character.
[...] Matches any of the set of characters between the brackets. A pair
of characters separated by - matches any one of the characters
which comes between the two characters, including the two
characters, based on ASCII character encoding (see ascii(5)).
man also supports a more sophisticated means for looking up manual pages
using regular expressions. To use regular expressions to lookup manual
pages, you must use the -r option discussed below.
OPTIONS
-M path Use path as the search path for manual entries. path is a
colon-separated list of directories where manual
subdirectories may be found. The default path is
/usr/share/catman:/usr/share/man:/usr/catman:/usr/man. -M
is useful for searching locations other than the standard
manual directories for manual entries. These locations
Page 2
MAN(1) MAN(1)
could be personal manual page trees or NFS mounted BSD style
manual page trees from another system. For example, the
standard manual directories could be augmented with personal
manual pages by specifying the path:
/usr/share/catman:/usr/share/man:/usr/catman:/usr/man:$HOME/man
-M must be given before -k and -f. -M will override the
environment variable MANPATH. -M and -d are mutually
exclusive. At most 100 directories may be specified; if
more are specified, the rest will be ignored.
-c Copy the manual page to the standard output instead of using
more(1) or the user specified PAGER or MANPAGER.
-d Use the direct path specified for finding the manual page
title. The -d option uses the full path name of the
specified title as the manual page to print, formatting it
if necessary. Since -d does no searching, any suffixes like
".1" must be specified otherwise the manual page will not be
found. If no leading path is specified, the current
directory (.) is assumed. -d is useful for formatting
manual page sources you are editing as part of your software
development. The -t option may be used in conjunction with
-d to format a manual page source file and send it to the
printer. -d will ignore the environment variable MANPATH.
-d and -M are mutually exclusive.
-p Print on standard output the commands that would be executed
to format and display the specified manual pages instead of
actually executing the commands.
-w Print only the pathname of each entry matching the given
title. The actual matching entry will not be printed, only
its path is given.
-t Typeset each titled manual entry and send the result to the
printer. In the case of the preformatted "cat" manual pages
which come standard with IRIX, the entry is unpacked using
pcat(1) and then sent to the default printer using lp(1).
If, however, the manual entry is a locally added,
unformatted nroff(1) source, the entry will be formatted
using psroff(1) and sent to the printer. The environment
variable TROFF may be used to specify another formatting
program other than psroff (see the discussion on ENVIRONMENT
below. If the BSD lpr(1) printing facility is used, the
TCAT and NCAT environment variables should be set to send
the output to lpr instead of lp.
-T macropackage
The given nroff(1) macro package will be used for formatting
unformatted manual entries. By default,
Page 3
MAN(1) MAN(1)
/usr/lib/tmac/tmac.an is used.
-k keyword Print the manual entry summaries which contain the given
keywords. The summaries are gotten from the whatis
database. (See also apropos(1).)
-f filename Print the manual entry summaries which might pertain to the
given filenames. Any leading pathname components are
stripped from the filename before the filename is matched
against the summaries. The summaries are gotten from the
whatis database. (See also whatis(1).)
-W is normally used only by the makewhatis(1m) command to build
the whatis and apropos databases.
-r Treat specified names as regular expressions for searches.
The regular expressions handled are those supported by
regex(3X).
ENVIRONMENT
MANPATH If set, MANPATH overrides the default manual entry search path.
MANPATH is a colon-separated list of directories where manual
subdirectories may be found. (See the discussion of -M.) -M
and -d will override MANPATH.
LANG If set, then for each directory to be searched (as determined by
the -M option, the MANPATH variable, or the default search
path), an additional directory is constructed and searched which
has the value of the LC_MESSAGES locale catagory appended to it.
These language specific directories are searched before the
corresponding generic directory. LC_MESSAGES may be set either
in the environment or will automatically be set based on the
setting of the LANG variable (see environ(5)).
PAGER and MANPAGER
If set, PAGER and MANPAGER specify a program for interactively
displaying the output from man. MANPAGER will override PAGER so
a program other than the user's standard paging program may be
used for displaying man output. If neither PAGER or MANPAGER
are set, the command "ul -b | more -s -f" is used. See ul(1)
and more(1) for details on these options.
TCAT may be used to specify the command for printing or displaying
unformatted (nroff/troff source) manual pages when the -t option
is selected. If TCAT is not set, the command "lp" is used. For
systems using the BSD lpr(1) printing facility, TCAT should be
set to "lpr". If a troff formatting program which does not
output PostScript is used, TCAT should be set to "lpr