Changed find(1) primaries to more logical evaluation.
[unix-history] / usr / src / usr.bin / man / man.conf.5
CommitLineData
eadcc84a 1.\" Copyright (c) 1989, 1991 The Regents of the University of California.
882cb044
KS
2.\" All rights reserved.
3.\"
eadcc84a 4.\" %sccs.include.redist.roff%
882cb044 5.\"
b6c2c24a 6.\" @(#)man.conf.5 5.7 (Berkeley) %G%
882cb044 7.\"
eadcc84a
CL
8.Dd
9.Dt MAN.CONF 5
b6c2c24a 10.Os
eadcc84a
CL
11.Sh NAME
12.Nm man.conf
13.Nd configuration file for
14.Xr man 1
15.Sh DESCRIPTION
16The
17.Xr man 1 ,
18.Xr apropos 1 ,
011519cd 19and
eadcc84a
CL
20.Xr whatis 1
21commands
011519cd 22search for manual pages or their database files as specified by the
eadcc84a 23.Nm man.conf
011519cd
KB
24file.
25Manual pages are expected to be preformatted (see
eadcc84a 26.Xr nroff 1 )
011519cd 27and named with a trailing ``.0''.
eadcc84a 28.Pp
882cb044 29The
eadcc84a 30.Nm man.conf
011519cd 31file contains two types of lines.
eadcc84a 32.Pp
011519cd
KB
33The first type of line is a ``section'' line, which contains a
34section name followed by a directory path.
35Lines in this format specify that manual pages for the section
36may be found in the directory.
eadcc84a 37.Pp
011519cd
KB
38Directories named with a trailing slash character (``/'') are expected
39to contain subdirectories (see the keyword ``_subdir'' below) instead
40of manual pages.
41These subdirectories are searched instead of the directory.
eadcc84a 42.Pp
011519cd
KB
43All directories (either explicitly specified or named with a trailing
44slash) may contain subdirectories.
eadcc84a
CL
45The
46.Xr man 1
47command
011519cd
KB
48automatically searches any subdirectory with the same name as the
49current machine type before the directory is searched.
50No specification of these subdirectories is necessary in the
eadcc84a 51.Nm man.conf
011519cd 52file.
eadcc84a 53.Pp
011519cd
KB
54Section names are unrestricted except for the reserved words specified
55below; in general, however, it is best to avoid anything beginning with
56an underscore (``_'') in order to avoid future incompatibilities.
eadcc84a 57.Pp
011519cd
KB
58The section named ``_default'' is the list of directories to be
59searched if no section is specified.
eadcc84a 60.Pp
011519cd
KB
61The second type of line is preceded with a ``keyword''.
62The possible keywords and their meanings are as follows:
eadcc84a 63.Pp
b6c2c24a 64.Bl -tag -width "_version"
eadcc84a 65.It _subdir
011519cd 66The list (in search order) of subdirectories which will be searched in
a201b3c4 67any directory named with a trailing slash (``/'') character. This
eadcc84a
CL
68list is also used when a path is specified by the
69.Ev MANPATH
70environment
71variable or the
72.Fl M
73option.
74.It _version
011519cd 75The version of the configuration file.
eadcc84a 76.It _whatdb
011519cd
KB
77The full pathname (not just a directory path) for a database to be used
78by the
eadcc84a 79.Xr apropos 1
011519cd 80and
eadcc84a 81.Xr whatis 1
011519cd 82commands.
eadcc84a
CL
83.El
84.Pp
1e76b432
KB
85Multiple specifications for all types of lines (except for ``_version'')
86are cumulative and the entries are used in the order listed in the file;
87multiple entries may be listed per line, as well.
eadcc84a 88.Pp
011519cd
KB
89Empty lines or lines whose first non-whitespace character is a hash
90mark (``#'') are ignored.
eadcc84a 91.Sh EXAMPLES
011519cd 92Given the following
eadcc84a
CL
93.Nm man.conf
94file:
95.Bd -literal -offset indent
96_version BSD.1
011519cd 97_subdir cat1 cat2 cat3
eadcc84a 98_default /usr/share/man/
011519cd 99sect3 /usr/share/man/cat3
eadcc84a
CL
100.Ed
101.Pp
011519cd 102The default
eadcc84a
CL
103.Xr mktemp 3
104manual page should be stored in
105.Dq Pa /usr/share/man/cat3/mktemp.0 .
106Any
107.Tn VAX
108architecture specific version of it should be stored in
109.Dq Pa cat3/vax/mktemp.0 .
110.Pp
111The command
112.Dq Li man mktemp
113would search the subdirectories
114.Dq Pa cat1
115.Dq Pa cat2 ,
116and
117.Dq Pa cat3 ,
118in
119.Dq Pa /usr/share/man ,
120in that order, for
121.Dq Pa mktemp.0''.
011519cd
KB
122If a subdirectory with the same name as the current machine type
123existed in any of them, it would be searched as well.
eadcc84a
CL
124.Pp
125The command
126.Dq Li man sect3 mktemp
127would only search
128.Dq Li /usr/share/man/cat3
011519cd 129and any possible per machine subdirectory.
eadcc84a
CL
130.Sh FILES
131.Bl -tag -width /etc/man.conf -compact
132.It Pa /etc/man.conf
133Standard manual directory search path.
134.El
135.Sh SEE ALSO
136.Xr apropos 1 ,
137.Xr machine 1 ,
138.Xr man 1 ,
139.Xr whatis 1 ,
140.Xr whereis 1
141.Sh HISTORY
142The
143.Nm
b6c2c24a 144file format is
eadcc84a 145.Ud .