The man
, apropos
and whatis
commands search
for manual pages or their database files as specified by the
`man.conf' file. Manual pages are normally expected to be
preformatted (see nroff(1)
) and named with a trailing `.0'.
The `man.conf' file contains two types of lines.
The first type of line is a `section' line, which contains a section name followed by one or more directory paths. The directory paths may contain the normal shell globbing characters, including curly braces (`{}'); to escape a shell globbing character, precede it with a backslash (`\'). Lines in this format specify that manual pages for the section may be found in the following directories.
Directories named with a trailing slash character (`/') are expected to contain subdirectories of manual pages, (see the keyword `_subdir' below) instead of manual pages. These subdirectories are searched instead of the directory.
Before searching any directory for a manual page, the `man(1)' command always searches the subdirectory with the same name as the current machine type, if it exists. No specification of these subdirectories is necessary in the `man.conf' file.
Section names are unrestricted except for the reserved words specified below; in general, you should avoid anything with a leading underscore (`_') to avoid future incompatibilities.
The section named `_default' is the list of directories that will be searched if no section is specified by the user.
The second type of line is preceded with a `keyword'. The possible keywords and their meanings are as follows:
Multiple specifications for all types of lines are cumulative and the entries are used in the order listed in the file; multiple entries may be listed per line, as well.
Empty lines or lines whose first non-whitespace character is a hash mark (`#') are ignored.
Examples: given the following `man.conf' file:
_version BSD.2 _subdir cat[123] _suffix .0 _build .[1-9] nroff -man %s _build .tbl tbl %s | nroff -man _default /usr/share/man/ sect3 /usr/share/man/{old/,}cat3
By default, the command man mktemp
will search for
`mktemp.<any_digit>' and `mktemp.tbl' in the directories
/usr/share/man/cat1
, /usr/share/man/cat2
and
/usr/share/man/cat3
. If on a machine of type `vax', the
subdirectory `vax' in each directory would be searched as well,
before the directory was searched.
If `mktemp.tbl' was found first, the command
tbl <manual page> | nroff -man
would be run to build a man
page for display to the user.
The command man sect3 mktemp
would search the directories
/usr/share/man/old/cat3
and /usr/share/man/cat3
,
in that order, for the mktemp manual page. If a subdirectory with
the same name as the current machine type existed in any of them,
it would be searched as well, before each of them were searched.
Go to the first, previous, next, last section, table of contents.