MAN(1) — USER COMMANDS
NAME
man − display reference manual pages; find reference pages by keyword
SYNOPSIS
man [−] [−t] [−M path] [−T macro-pkg] [[section] title ...] ...
man [−M path] −k keyword ...
man [−M path] −f filename ...
DESCRIPTION
man displays information from the reference manuals. It can display complete manual pages that you select by title. It can display one-line summaries selected either by keyword (−k), or by the name of an associated file (−f).
When neither −k nor −f is specified, man formats a specified set of manual pages by title. A section, when given, applies to the titles that follow it on the command line (up to the next section, if any). man looks in the indicated section of the manual for those titles. section is either a digit (perhaps followed by a single letter indicating the type of manual page), or one of the words ‘new,’ ‘local,’ ‘old,’ or ‘public.’ If section is omitted, man searches all reference sections (giving preference to commands over functions) and prints the first manual page it finds. If no manual page is located, man prints an error message.
If the standard output is not a terminal, or if the − flag is given, man pipes its output through cat(1). Otherwise, man pipes its output through more(1) to handle paging and underlining on the screen.
OPTIONS
−t man arranges for the specified manual pages to be troffed to a suitable raster output device (see troff(1) or vtroff(1)). If both the − and −t flags are given, man updates the troffed versions of each named title (if necessary), but does not display them.
−M path
Change the search path for manual pages. path is a colon-separated list of directories that contain manual page directory subtrees. For example, ‘/usr/man/u_man:/usr/man/a_man’ makes man search in the standard System V locations. When used with the −k or −f options, the −M option must appear first.
−T macro-pkg
man uses macro-pkg rather than the standard −man macros defined in /usr/lib/tmac/tmac.an for formatting manual pages.
−k keyword ...
man prints out one-line summaries from the whatis database (table of contents) that contain any of the given keywords.
−f filename ...
man attempts to locate manual pages related to any of the given files. It strips the leading pathname components from each filename, and then prints one-line summaries containing the resulting basename or names.
MANUAL PAGES
Manual pages are troff(1)/nroff(1) source files prepared with the −man macro package. Refer to man(7), or Formatting Documents on the Sun Workstation for more information.
When formatting a manual page, man examines the first line to determine whether it requires special processing.
Referring to Other Manual Pages
If the first line of the manual page is a reference to another manual page entry fitting the pattern:
.so man?∗/sourcefile
man processes the indicated file in place of the current one. The reference must be expressed as a pathname relative to to the root of the manual page directory subtree.
When the second or any subsequent line starts with .so, man ignores it; troff(1) or nroff(1) processes the request in the usual manner.
Preprocessing Manual Pages
If the first line is a string of the form:
´\" X
where X is separated from the the " by a single space and consists of any combination of characters in the following list, man pipes its input to troff(1) or nroff(1) through the corresponding preprocessors.
c cw(1), where available
e eqn(1), or neqn(1) for nroff
p pic(1), where available
r refer(1)
t tbl(1), and col(1) for nroff
v vgrind(1)
If eqn or neqn is invoked, it will automatically read the file /usr/pub/eqnchar (see eqnchar(7)).
FILES
/usr/man root of the standard manual page directory subtree
/usr/man/man?/∗ unformatted manual entries
/usr/man/cat?/∗ nroffed manual entries
/usr/man/fmt?/∗ troffed manual entries
/usr/man/whatis table of contents and keyword database
/usr/lib/tmac/tmac.an standard −man macro package
ENVIRONMENT
MANPATH If set, its value overrides /usr/man as the default search path. (The −M flag, in turn, overrides this value.)
PAGER A program to use for interactively delivering man’s output to the screen. If not set, more −s is used.
TCAT The name of the program to use to display troffed manual pages. If not set, lpr −t is used.
TROFF The name of the formatter to use when the −t flag is given. If not set, troff is used.
SEE ALSO
cat(1V), col(1V), eqn(1), more(1), nroff(1), tbl(1), troff(1), whatis(1), man(7), catman(8)
BUGS
The manual is supposed to be reproducible either on a phototypesetter or on an ASCII terminal. However, on a terminal some information (indicated by font changes, for instance) is necessarily lost.
Some dumb terminals cannot process the vertical motions produced by the e (eqn(1)) preprocessing flag. To prevent garbled output on these terminals, when you use e also use t, to invoke col(1) implicitly. This workaround has the disadvantage of eliminating superscripts and subscripts—even on those terminals that can display them. CTRL-Q will clear a terminal that gets confused by eqn(1) output.
Sun Release 3.5 — Last change: 11 July 1986