summaryrefslogtreecommitdiffstats
path: root/usr.bin/man/man.1
blob: 7517a64cb21c3b53e2d6bc16ff5201dbc9929676 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
.\"-
.\"  Copyright (c) 2010 Gordon Tetlow
.\"  All rights reserved.
.\"
.\"  Redistribution and use in source and binary forms, with or without
.\"  modification, are permitted provided that the following conditions
.\"  are met:
.\"  1. Redistributions of source code must retain the above copyright
.\"     notice, this list of conditions and the following disclaimer.
.\"  2. Redistributions in binary form must reproduce the above copyright
.\"     notice, this list of conditions and the following disclaimer in the
.\"     documentation and/or other materials provided with the distribution.
.\"
.\"  THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\"  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\"  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\"  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\"  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\"  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\"  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\"  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\"  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\"  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\"  SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd September 26, 2014
.Dt MAN 1
.Os
.Sh NAME
.Nm man
.Nd display online manual documentation pages
.Sh SYNOPSIS
.Nm
.Op Fl adho
.Op Fl t | w
.Op Fl M Ar manpath
.Op Fl P Ar pager
.Op Fl S Ar mansect
.Op Fl m Ar arch Ns Op : Ns Ar machine
.Op Fl p Op Ar eprtv
.Op Ar mansect
.Ar page ...
.Nm
.Fl f
.Ar keyword ...
.Nm
.Fl k
.Ar keyword ...
.Sh DESCRIPTION
The
.Nm
utility finds and displays online manual documentation pages.
If
.Ar mansect
is provided,
.Nm
restricts the search to the specific section of the manual.
.Pp
The sections of the manual are:
.Bl -enum -offset indent -compact
.It
.Fx General Commands Manual
.It
.Fx System Calls Manual
.It
.Fx Library Functions Manual
.It
.Fx Kernel Interfaces Manual
.It
.Fx File Formats Manual
.It
.Fx Games Manual
.It
.Fx Miscellaneous Information Manual
.It
.Fx System Manager's Manual
.It
.Fx Kernel Developer's Manual
.El
.Pp
Options that
.Nm
understands:
.Bl -tag -width indent
.It Fl M Ar manpath
Forces a specific colon separated manual path instead of the default
search path.
See
.Xr manpath 1 .
Overrides the
.Ev MANPATH
environment variable.
.It Fl P Ar pager
Use specified pager.
Defaults to
.Dq Li "less -sR"
if color support is enabled, or
.Dq Li "more -s" .
Overrides the
.Ev MANPAGER
environment variable, which in turn overrides the
.Ev PAGER
environment variable.
.It Fl S Ar mansect
Restricts manual sections searched to the specified colon delimited list.
Defaults to
.Dq Li 1:8:2:3:n:4:5:6:7:9:l .
Overrides the
.Ev MANSECT
environment variable.
.It Fl a
Display all manual pages instead of just the first found for each
.Ar page
argument.
.It Fl d
Print extra debugging information.
Repeat for increased verbosity.
Does not display the manual page.
.It Fl f
Emulate
.Xr whatis 1 .
.It Fl h
Display short help message and exit.
.It Fl k
Emulate
.Xr apropos 1 .
.It Fl m Ar arch Ns Op : Ns Ar machine
Override the default architecture and machine settings allowing lookup of
other platform specific manual pages.
See
.Sx IMPLEMENTATION NOTES
for how this option changes the default behavior.
Overrides the
.Ev MACHINE_ARCH
and
.Ev MACHINE
environment variables.
.It Fl o
Force use of non-localized manual pages.
See
.Sx IMPLEMENTATION NOTES
for how locale specific searches work.
Overrides the
.Ev LC_ALL , LC_CTYPE ,
and
.Ev LANG
environment variables.
.It Fl p Op Cm eprtv
Use the list of given preprocessors before running
.Xr nroff 1
or
.Xr troff 1 .
Valid preprocessors arguments:
.Pp
.Bl -tag -width indent -compact
.It Cm e
.Xr eqn 1
.It Cm p
.Xr pic 1
.It Cm r
.Xr refer 1
.It Cm t
.Xr tbl 1
.It Cm v
.Xr vgrind 1
.El
.Pp
Overrides the
.Ev MANROFFSEQ
environment variable.
.It Fl t
Send manual page source through
.Xr troff 1
allowing transformation of the manual pages to other formats.
.It Fl w
Display the location of the manual page instead of the contents of
the manual page.
.El
.Sh IMPLEMENTATION NOTES
.Ss Locale Specific Searches
The
.Nm
utility supports manual pages in different locales.
The search behavior is dictated by the first of three
environment variables with a nonempty string:
.Ev LC_ALL , LC_CTYPE ,
or
.Ev LANG .
If set,
.Nm
will search for locale specific manual pages using the following logic:
.Pp
.Bl -item -offset indent -compact
.It
.Va lang Ns _ Ns Va country Ns . Ns Va charset
.It
.Va lang Ns . Ns Va charset
.It
.Li en Ns . Ns Va charset
.El
.Pp
For example, if
.Ev LC_ALL
is set to
.Dq Li ja_JP.eucJP ,
.Nm
will search the following paths when considering section 1 manual pages in
.Pa /usr/share/man :
.Pp
.Bl -item -offset indent -compact
.It
.Pa /usr/share/man/ja_JP.eucJP/man1
.It
.Pa /usr/share/man/ja.eucJP/man1
.It
.Pa /usr/share/man/en.eucJP/man1
.It
.Pa /usr/share/man/man1
.El
.Ss Platform Specific Searches
The
.Nm
utility supports platform specific manual pages.
The search behavior is dictated by the
.Fl m
option or the
.Ev MACHINE_ARCH
and
.Ev MACHINE
environment variables.
For example, if
.Ev MACHINE_ARCH
is set to
.Dq Li i386
and
.Ev MACHINE
is set to
.Dq Li pc98 ,
.Nm
will search the following paths when considering section 4 manual pages in
.Pa /usr/share/man :
.Pp
.Bl -item -offset indent -compact
.It
.Pa /usr/share/man/man4/pc98
.It
.Pa /usr/share/man/man4/i386
.It
.Pa /usr/share/man/man4
.El
.Ss Displaying Specific Manual Files
The
.Nm
utility also supports displaying a specific manual page if passed a path
to the file as long as it contains a
.Ql /
character.
.Sh ENVIRONMENT
The following environment variables affect the execution of
.Nm :
.Bl -tag -width ".Ev MANROFFSEQ"
.It Ev LC_ALL , LC_CTYPE , LANG
Used to find locale specific manual pages.
Valid values can be found by running the
.Xr locale 1
command.
See
.Sx IMPLEMENTATION NOTES
for details.
Influenced by the
.Fl o
option.
.It Ev MACHINE_ARCH , MACHINE
Used to find platform specific manual pages.
If unset, the output of
.Dq Li "sysctl hw.machine_arch"
and
.Dq Li "sysctl hw.machine"
is used respectively.
See
.Sx IMPLEMENTATION NOTES
for details.
Corresponds to the
.Fl m
option.
.It Ev MANPATH
Used to find the location of the manual files.
See
.Xr manpath 1
for additional information.
Corresponds to the
.Fl M
option.
.It Ev MANROFFSEQ
Used to determine the preprocessors for the manual source before running
.Xr nroff 1
or
.Xr troff 1 .
If unset, defaults to
.Xr tbl 1 .
Corresponds to the
.Fl p
option.
.It Ev MANSECT
Restricts manual sections searched to the specified colon delimited list.
Corresponds to the
.Fl S
option.
.It Ev MANWIDTH
If set to a numeric value, used as the width manpages should be displayed.
Otherwise, if set to a special value
.Dq Li tty ,
and output is to a terminal,
the pages may be displayed over the whole width of the screen.
.It Ev MANCOLOR
If set, enables color support.
.It Ev MANPAGER
Program used to display files.
.Pp
If unset, and color support is enabled,
.Dq Li "less -sR"
is used.
.Pp
If unset, and color support is disabled, then
.Ev PAGER
is used.
If that has no value either,
.Dq Li "more -s"
is used.
.El
.Sh FILES
.Bl -tag -width indent -compact
.It Pa /etc/man.conf
System configuration file.
.It Pa /usr/local/etc/man.d/*.conf
Local configuration files.
.El
.Sh SEE ALSO
.Xr apropos 1 ,
.Xr intro 1 ,
.Xr intro 2 ,
.Xr intro 3 ,
.Xr intro 4 ,
.Xr intro 5 ,
.Xr intro 6 ,
.Xr intro 7 ,
.Xr intro 8 ,
.Xr intro 9 ,
.Xr locale 1 ,
.Xr manpath 1 ,
.Xr nroff 1 ,
.Xr troff 1 ,
.Xr whatis 1 ,
.Xr man.conf 5
OpenPOWER on IntegriCloud