Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / gnu / usr.bin / man / man / man.man
1 .\" Man page for man
2 .\"
3 .\" Copyright (c) 1990, 1991, John W. Eaton.
4 .\"
5 .\" You may distribute under the terms of the GNU General Public
6 .\" License as specified in the README file that comes with the man 1.0
7 .\" distribution.  
8 .\"
9 .\" John W. Eaton
10 .\" jwe@che.utexas.edu
11 .\" Department of Chemical Engineering
12 .\" The University of Texas at Austin
13 .\" Austin, Texas  78712
14 .\"
15 .\" $FreeBSD: src/gnu/usr.bin/man/man/man.man,v 1.10.2.8 2002/06/25 00:02:55 eric Exp $
16 .\" $DragonFly: src/gnu/usr.bin/man/man/man.man,v 1.2 2003/06/17 04:25:46 dillon Exp $
17 .\"
18 .Dd January 5, 1991
19 .Dt MAN 1
20 .Os
21 .Sh NAME
22 .Nm man
23 .Nd format and display the on-line manual pages
24 .Sh SYNOPSIS
25 .Nm
26 .Op Fl adfhkotw
27 .Op Fl m Ar machine
28 .Op Fl p Ar string
29 .Op Fl M Ar path
30 .Op Fl P Ar pager
31 .Op Fl S Ar list
32 .Op Ar section
33 .Ar name ...
34 .Sh DESCRIPTION
35 .Nm Man
36 formats and displays the on-line manual pages.  This version knows
37 about the
38 .Ev MANPATH
39 and
40 .Ev PAGER
41 environment variables, so you can have
42 your own set(s) of personal man pages and choose whatever program you
43 like to display the formatted pages.  If section is specified,
44 .Nm
45 only looks in that section of the manual.  You may also specify the
46 order to search the sections for entries and which preprocessors to
47 run on the source files via command line options or environment
48 variables.  If enabled by the system administrator, formatted man
49 pages will also be compressed with the `%compress%' command to save
50 space.
51 .Pp
52 The options are as follows:
53 .Bl -tag -width Fl
54 .It Fl M Ar path
55 Specify an alternate manpath.
56 By default,
57 .Nm
58 uses
59 .Xr manpath 1
60 (which is built into the
61 .Nm
62 binary)
63 to determine the path to search.  This option overrides the
64 .Ev MANPATH
65 environment variable.
66 .It Fl P Ar pager
67 Specify which pager to use.
68 By default,
69 .Nm
70 uses
71 .Nm %pager% .
72 This option overrides the
73 .Ev PAGER
74 environment variable.
75 .It Fl S Ar list
76 List is a colon separated list of manual sections to search.
77 This option overrides the
78 .Ev MANSECT
79 environment variable.
80 .It Fl a
81 By default,
82 .Nm
83 will exit after displaying the first manual page it
84 finds.  Using this option forces
85 .Nm
86 to display all the manual pages
87 that match
88 .Ar name ,
89 not just the first.
90 .It Fl d
91 Don't actually display the man pages, but do print gobs of debugging
92 information.
93 .It Fl f
94 Equivalent to
95 .Nm whatis .
96 .It Fl h
97 Print a help message and exit.
98 .It Fl k
99 Equivalent to
100 .Nm apropos .
101 .It Fl m Ar machine
102 As some manual pages are intended only for specific architectures,
103 .Nm
104 searches any subdirectories,
105 with the same name as the current architecture,
106 in every directory which it searches.
107 Machine specific areas are checked before general areas.
108 The current machine type may be overridden using this option
109 or by setting the environment variable
110 .Ev MACHINE
111 to the name of a specific architecture.
112 This option overrides the
113 .Ev MACHINE
114 environment variable.
115 .It Fl o
116 Look for original, non-localized manpages only.
117 .Pp
118 By default,
119 .Nm
120 searches for a localized manpage
121 in a set of locale subdirectories of each
122 .Xr manpath 1
123 component.
124 .Pp
125 Locale name is taken from the first of three environment variables
126 with a nonempty value:
127 .Ev LC_ALL , LC_CTYPE ,
128 or
129 .Ev LANG ,
130 in the specified order.
131 .Pp
132 If the value could not be determined, or is not a valid locale name,
133 then only non-localized manpage will be looked up.
134 .Pp
135 Otherwise,
136 .Nm
137 will search in the following subdirectories, in the order of precedence:
138 .Pp
139 .Bl -item -offset indent -compact
140 .Sm off
141 .It
142 .Pa <lang> _ <country> . <charset>
143 .It
144 .Pa <lang> . <charset>
145 .It
146 .Pa en . <charset>
147 .Sm on
148 .El
149 .Pp
150 For example, for
151 .Dq de_DE.ISO8859-1
152 locale,
153 .Nm
154 will search in the following subdirectories of the
155 .Pa /usr/share/man
156 manpath component:
157 .Pp
158 .Bl -item -offset indent -compact
159 .It
160 .Pa /usr/share/man/de_DE.ISO8859-1
161 .It
162 .Pa /usr/share/man/de.ISO8859-1
163 .It
164 .Pa /usr/share/man/en.ISO8859-1
165 .El
166 .Pp
167 Finally,
168 if the search of localized manpage fails,
169 it will be looked up in the default
170 .Pa /usr/share/man
171 directory.
172 .It Fl p Ar string
173 Specify the sequence of preprocessors to run before nroff or troff.
174 Not all installations will have a full set of preprocessors.
175 Some of the preprocessors and the letters used to designate them are: 
176 eqn (e), grap (g), pic (p), tbl (t), vgrind (v), refer (r).
177 This option overrides the
178 .Ev MANROFFSEQ
179 environment variable.
180 .It Fl t
181 Use
182 .Nm %troff%
183 to format the manual page, passing the output to stdout.
184 The output from
185 .Nm %troff%
186 may need to be passed through some filter or another before being
187 printed.
188 .It Fl w
189 Don't actually display the man pages, but do print the location(s) of
190 the files that would be formatted or displayed.
191 .El
192 .Sh ENVIRONMENT
193 .Bl -tag -width MANROFFSEQ
194 .It Ev LC_ALL , LC_CTYPE , LANG
195 These variables specify the preferred language for manual pages.
196 (See the
197 .Fl o
198 option above.)
199 .It Ev MACHINE
200 If
201 .Ev MACHINE
202 is set, its value is used to override the current machine type
203 when searching machine specific subdirectories.
204 .It Ev MANPATH
205 If
206 .Ev MANPATH
207 is set, its value is used as the path to search for manual pages.
208 .It Ev MANROFFSEQ
209 If
210 .Ev MANROFFSEQ
211 is set, its value is used to determine the set of preprocessors run
212 before running nroff or troff.  By default, pages are passed through
213 the table preprocessor before nroff.
214 .It Ev MANSECT
215 If
216 .Ev MANSECT
217 is set, its value is used to determine which manual sections to search.
218 .It Ev PAGER
219 If
220 .Ev PAGER
221 is set, its value is used as the name of the program to use to display
222 the man page.  By default,
223 .Nm %pager%
224 is used.
225 .El
226 .Sh EXAMPLES
227 .Pp
228 Normally, to look at the relevant manpage information for getopt,
229 one would use:
230 .Pp
231 .Dl man getopt
232 .Pp
233 However, when referring to a specific section of the manual,
234 such as
235 .Xr getopt 3 ,
236 one would use:
237 .Pp
238 .Dl man 3 getopt
239 .Sh SEE ALSO
240 .Xr apropos 1 ,
241 .Xr groff 1 ,
242 .Xr manpath 1 ,
243 .Xr more 1 ,
244 .Xr whatis 1 ,
245 .Xr man 7 ,
246 .Xr mdoc 7
247 .Sh BUGS
248 The
249 .Fl t
250 option only works if the
251 .Xr troff 1 Ns -like
252 program is installed.