2 .\" Copyright (c) 2010 Gordon Tetlow
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 .Nd display online manual documentation pages
41 .Op Fl m Ar arch Ns Op : Ns Ar machine
57 utility finds and displays online manual documentation pages.
62 restricts the search to the specific section of the manual.
64 The sections of the manual are:
65 .Bl -enum -offset indent -compact
68 General Commands Manual
74 Library Functions Manual
77 Kernel Interfaces Manual
86 Miscellaneous Information Manual
89 System Manager's Manual
92 Kernel Developer's Manual
98 .Bl -tag -width indent
100 Does a full text search in all manual pages.
102 is a regular expression as understood by
106 This is a slow operation.
108 Forces a specific colon separated manual path instead of the default
114 environment variable.
119 if color support is enabled, or
123 environment variable, which in turn overrides the
125 environment variable.
127 Restricts manual sections searched to the specified colon delimited list.
129 .Dq Li 1:8:2:3:3lua:n:4:5:6:7:9:l .
132 environment variable.
134 Display all manual pages instead of just the first found for each
138 Print extra debugging information.
139 Repeat for increased verbosity.
140 Does not display the manual page.
145 Display short help message and exit.
149 .It Fl m Ar arch Ns Op : Ns Ar machine
150 Override the default architecture and machine settings allowing lookup of
151 other platform specific manual pages.
153 .Sx IMPLEMENTATION NOTES
154 for how this option changes the default behavior.
159 environment variables.
161 Force use of non-localized manual pages.
163 .Sx IMPLEMENTATION NOTES
164 for how locale specific searches work.
166 .Ev LC_ALL , LC_CTYPE ,
169 environment variables.
171 Use the list of given preprocessors before running
172 .Xr nroff 1 Pq Pa ports/textproc/groff
174 .Xr troff 1 Pq Pa ports/textproc/groff .
175 Valid preprocessors arguments:
177 .Bl -tag -width indent -compact
179 .Xr eqn 1 Pq Pa ports/textproc/groff
181 .Xr pic 1 Pq Pa ports/textproc/groff
183 .Xr refer 1 Pq Pa ports/textproc/groff
185 .Xr tbl 1 Pq Pa ports/textproc/groff
192 environment variable.
194 Send manual page source through
195 .Xr troff 1 Pq Pa ports/textproc/groff
196 allowing transformation of the manual pages to other formats.
198 Display the location of the manual page instead of the contents of
201 .Sh IMPLEMENTATION NOTES
202 .Ss Locale Specific Searches
205 utility supports manual pages in different locales.
206 The search behavior is dictated by the first of three
207 environment variables with a nonempty string:
208 .Ev LC_ALL , LC_CTYPE ,
213 will search for locale specific manual pages using the following logic:
215 .Bl -item -offset indent -compact
217 .Va lang Ns _ Ns Va country Ns . Ns Va charset
219 .Va lang Ns . Ns Va charset
221 .Li en Ns . Ns Va charset
229 will search the following paths when considering section 1 manual pages in
232 .Bl -item -offset indent -compact
234 .Pa /usr/share/man/ja_JP.eucJP/man1
236 .Pa /usr/share/man/ja.eucJP/man1
238 .Pa /usr/share/man/en.eucJP/man1
240 .Pa /usr/share/man/man1
242 .Ss Platform Specific Searches
245 utility supports platform specific manual pages.
246 The search behavior is dictated by the
252 environment variables.
262 will search the following paths when considering section 4 manual pages in
265 .Bl -item -offset indent -compact
267 .Pa /usr/share/man/man4/aarch64
269 .Pa /usr/share/man/man4/arm64
271 .Pa /usr/share/man/man4
273 .Ss Displaying Specific Manual Files
276 utility also supports displaying a specific manual page if passed a path
277 to the file as long as it contains a
281 The following environment variables affect the execution of
283 .Bl -tag -width ".Ev MANROFFSEQ"
284 .It Ev LC_ALL , LC_CTYPE , LANG
285 Used to find locale specific manual pages.
286 Valid values can be found by running the
290 .Sx IMPLEMENTATION NOTES
295 .It Ev MACHINE_ARCH , MACHINE
296 Used to find platform specific manual pages.
297 If unset, the output of
298 .Dq Li "sysctl hw.machine_arch"
300 .Dq Li "sysctl hw.machine"
301 is used respectively.
303 .Sx IMPLEMENTATION NOTES
309 The standard search path used by
311 may be changed by specifying a path in the
313 environment variable.
314 Invalid paths, or paths without manual databases, are ignored.
319 begins with a colon, it is appended to the default list;
320 if it ends with a colon, it is prepended to the default list;
321 or if it contains two adjacent colons,
322 the standard search path is inserted between the colons.
323 If none of these conditions are met, it overrides the
324 standard search path.
326 Used to determine the preprocessors for the manual source before running
327 .Xr nroff 1 Pq Pa ports/textproc/groff
329 .Xr troff 1 Pq Pa ports/textproc/groff .
330 If unset, defaults to
331 .Xr tbl 1 Pq Pa ports/textproc/groff .
336 Restricts manual sections searched to the specified colon delimited list.
341 If set to a numeric value, used as the width manpages should be displayed.
342 Otherwise, if set to a special value
344 and output is to a terminal,
345 the pages may be displayed over the whole width of the screen.
347 If set, enables color support.
349 Program used to display files.
351 If unset, and color support is enabled,
355 If unset, and color support is disabled, then
358 If that has no value either,
363 .Bl -tag -width indent -compact
365 System configuration file.
366 .It Pa /usr/local/etc/man.d/*.conf
367 Local configuration files.
372 Show the manual page for
374 .Bd -literal -offset indent
378 Show all manual pages for
380 .Bd -literal -offset indent
384 List manual pages which match the regular expression either in the title or in
386 .Bd -literal -offset indent
387 $ man -k '\e<copy\e>.*archive'
390 Show the manual page for
395 .Bd -literal -offset indent
399 Show the location of the
402 .Bd -literal -offset indent
406 Show the location of manual pages in sections 1 and 8 which contain the word
408 .Bd -literal -offset indent
409 $ ./man -w -K '\e<arm\e>' -S 1:8