MAN(1MAN) COMMAND REFERENCE MAN(1MAN)
NAME
man - find and print manual entries
SYNOPSIS
man [ -a ] [ -b separator ] [ -i ignoresecs ] [ -n ] [ -o ]
[ -r ] [ -s ] [ section ] title ...
man [ -k (apropos(1man) options) ]
man [ -f (whatis(1man) options) ]
DESCRIPTION
When called with the -k option, the utility apropos is
executed with the remaining arguments.
When called with the -f option, the utility whatis is
executed with the remaining arguments.
Normally, man searches a set of directories named in the
file /usr/lib/man/directories for a formatted manual page
entry file and either prints the name or the file contents.
Each manual page file has a name of the form
`title.section'. A `section' is a number followed by zero
or more alphabetic characters. For example, this document
is contained in the file `man.1'. The `title' to be
searched for is given on the command line. An ordered list
of known `section' names is found in the file
/usr/lib/man/sections.
By default, all known sections are searched for manual
entries. If the section argument is given, only that
section or set of sections is printed. If the section
argument is of the form `#+', all sections that begin with
the number specified by `#' are searched. If the -i option
is given, the sections in ignoresecs are ignored. The
ignoresecs argument is a list of section names separated by
commas, spaces, and/or tabs.
The default search method takes each section and searches
for matching pages in all directories. The alternate
method, which takes each directory and searches for matching
pages in all sections, is available by specifying the -s
option.
By default, if the standard output is a terminal, the output
is piped through more(1). If the standard output is not a
terminal, the output is printed with no processing. All
pages are printed together, separated by a separator, which
is described later. This line serves to separate the pages
on the lineprinter or within more, where it can also be used
to search for the beginning of the next page in a series.
Printed 10/17/86 1
MAN(1MAN) COMMAND REFERENCE MAN(1MAN)
Man searches for manual pages in subdirectories of the
directories specified in /usr/lib/man/directories. Each
entry in this file has a corresponding command directory.
The environment variable PATH is used to order the manual
page directories. This means that if /bin is in the search
path before /usr/local , manual pages corresponding to the
commands in /bin are searched before those corresponding to
/usr/local. In order to tailor the actions of the man
command, the file $HOME/.manrc may be set up. This file may
contain one of each of the following entries, except for
personal:, of which there may be up to 20:
options: options where options is a list of command
line options not including -f, -k,
and -i.
ignore: sections where sections is a list of section
names to ignore separated by
commas, spaces, and/or tabs. This
entry is ignored if the -i option
is given or if a section to search
is specified on the command line.
output: command where command is a command line
which is run by the shell. The
command must be able to read from
the standard input.
personal: directory where directory is the name of a
directory which contains
subdirectories as described in
man(5man). These directories are
searched in the order they appear
in the manrc file for manual pages
before any other directories. If
directory begins with the sequence
$HOME/ , the $HOME is replaced by
the value of the HOME environment
variable.
sections: sections where sections is an ordered list
of sections separated by commas,
spaces, and/or tabs. This list may
include `+' sections as well as
specific sections. For example,
the list ``1sh, 1+, 2+, 3+, 3f, 4+,
5+, 7+, 8+'' specifies that section
`1sh' is to be searched before any
other sections beginning with a 1,
and section `3f' is to be searched
after all other sections beginning
with 3.
Printed 10/17/86 2
MAN(1MAN) COMMAND REFERENCE MAN(1MAN)
tty-sep: separator where separator is text to be
printed between manual page entries
when the output is going to a
terminal. The text is taken from
the first non-whitespace character
to the end of the line. The
following special escaped
characters are processed as in
echo(1sh): \n (newline), \f
(formfeed), \r (carriage return),
\b (backspace), (tab), \\
(backslash), and \c (inhibit final
newline). Unless the line contains
a \c or ends with a backslash
(except for \\), a newline is added
to the separator.
notty-sep: separator where separator is text to be
printed between manual page entries
when the output is not going to a
terminal.
OPTIONS
-a Print information for all manual pages. Normally, only
the first page is used.
-b separator
Print the given separator between manual page entries.
Backslashes in the separator string are processed as
described above under the $HOME/.manrc ``tty-sep''
entry. This option overrides the ``tty-sep'' and
``notty-sep'' entries in the $HOME/.manrc file. An
empty separator causes nothing to be printed between
manual entries.
-f Execute the command whatis with the remaining arguments.
-i ignoresecs
Ignore the sections in the ignoresecs list. This option
overrides the
-k Execute the command apropos with the remaining
arguments.
-n Print only the pathnames of the files containing the
matching pages.
-o Print output with no processing even if standard output
is a terminal.
-r Ignore the ``options:'' entry in $HOME/.manrc.
Printed 10/17/86 3
MAN(1MAN) COMMAND REFERENCE MAN(1MAN)
-s Use the alternate search method (by directory).
EXAMPLES
The following invocation will print the manual page for the
subroutine exit in any of the subsections of section 3, if
it exists.
man 3+ exit
FILES
/usr/lib/man/sections Known manual page sections.
/usr/lib/man/directories Manual page search directory
information.
$HOME/.manrc Man command control information.
VARIABLES
PATH The user's execution path.
HOME The user's home directory.
RETURN VALUE
[NO_ERRS] Command completed without error.
[USAGE] Incorrect command line syntax. Execution
terminated.
[NP_WARN] An error warranting a warning message
occurred. Execution continues.
[NP_ERR] An error occurred that was not a system
error. Execution terminated.
[P_WARN] A system error occurred. Execution continues.
See intro(2) for more information on system
errors.
[NP_WARN] An error warranting a warning message
occurred. Execution continues.
CAVEATS
There is no way to specify which directories to search other
than in the PATH variable.
Since output is piped to another process, the message
``Broken pipe'' may appear if the output command is
terminated before the entire manual page is processed.
Printed 10/17/86 4
MAN(1MAN) COMMAND REFERENCE MAN(1MAN)
Man is insensitive to the case of section names. For
example, section `1c' is the same as `1C'.
If the -k option or the -f option is used, that option must
be the first option. Options appearing before the -k or -f
will be ignored, with the exception of arguments that are
invalid to man.
The man command knows how to avoid the index format data (if
there is any) at the bottom of the formatted manual page
entry, so it is best to always use man to access manual page
entries.
SEE ALSO
apropos(1man), buildif(1man), echo(1sh), help(1man),
makewhatis(1man), manintro(1man), more(1), section(1man),
whatis(1man), man(5man), manindex(5man), whatis(5man),
catman(8man).
Printed 10/17/86 5
%%index%%
na:72,71;
sy:143,537;
de:680,2369;3193,3565;6902,1400;
op:8302,1302;9748,70;
ex:9818,237;
fi:10055,374;
va:10429,160;
rv:10589,729;
ca:11318,326;11788,658;
se:12446,541;
%%index%%000000000203