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
31 .Nd display online manual documentation pages
39 .Op Fl m Ar arch Ns Op : Ns Ar machine
55 utility finds and displays online manual documentation pages.
60 restricts the search to the specific section of the manual.
62 The sections of the manual are:
63 .Bl -enum -offset indent -compact
66 General Commands Manual
72 Library Functions Manual
75 Kernel Interfaces Manual
84 Miscellaneous Information Manual
87 System Manager's Manual
90 Kernel Developer's Manual
96 .Bl -tag -width indent
98 Does a full text search in all manual pages.
100 is a regular expression as understood by
104 This is a slow operation.
106 Forces a specific colon separated manual path instead of the default
112 environment variable.
117 if color support is enabled, or
121 environment variable, which in turn overrides the
123 environment variable.
125 Restricts manual sections searched to the specified colon delimited list.
127 .Dq Li 1:8:2:3:3lua:n:4:5:6:7:9:l .
130 environment variable.
132 Display all manual pages instead of just the first found for each
136 Print extra debugging information.
137 Repeat for increased verbosity.
138 Does not display the manual page.
143 Display short help message and exit.
147 .It Fl m Ar arch Ns Op : Ns Ar machine
148 Override the default architecture and machine settings allowing lookup of
149 other platform specific manual pages.
151 .Sx IMPLEMENTATION NOTES
152 for how this option changes the default behavior.
157 environment variables.
159 Force use of non-localized manual pages.
161 .Sx IMPLEMENTATION NOTES
162 for how locale specific searches work.
164 .Ev LC_ALL , LC_CTYPE ,
167 environment variables.
169 Use the list of given preprocessors before running
170 .Xr nroff 1 Pq Pa ports/textproc/groff
172 .Xr troff 1 Pq Pa ports/textproc/groff .
173 Valid preprocessors arguments:
175 .Bl -tag -width indent -compact
177 .Xr eqn 1 Pq Pa ports/textproc/groff
179 .Xr pic 1 Pq Pa ports/textproc/groff
181 .Xr refer 1 Pq Pa ports/textproc/groff
183 .Xr tbl 1 Pq Pa ports/textproc/groff
190 environment variable.
192 Send manual page source through
193 .Xr troff 1 Pq Pa ports/textproc/groff
194 allowing transformation of the manual pages to other formats.
196 Display the location of the manual page instead of the contents of
199 .Sh IMPLEMENTATION NOTES
200 .Ss Locale Specific Searches
203 utility supports manual pages in different locales.
204 The search behavior is dictated by the first of three
205 environment variables with a nonempty string:
206 .Ev LC_ALL , LC_CTYPE ,
211 will search for locale specific manual pages using the following logic:
213 .Bl -item -offset indent -compact
215 .Va lang Ns _ Ns Va country Ns . Ns Va charset
217 .Va lang Ns . Ns Va charset
219 .Li en Ns . Ns Va charset
227 will search the following paths when considering section 1 manual pages in
230 .Bl -item -offset indent -compact
232 .Pa /usr/share/man/ja_JP.eucJP/man1
234 .Pa /usr/share/man/ja.eucJP/man1
236 .Pa /usr/share/man/en.eucJP/man1
238 .Pa /usr/share/man/man1
240 .Ss Platform Specific Searches
243 utility supports platform specific manual pages.
244 The search behavior is dictated by the
250 environment variables.
260 will search the following paths when considering section 4 manual pages in
263 .Bl -item -offset indent -compact
265 .Pa /usr/share/man/man4/aarch64
267 .Pa /usr/share/man/man4/arm64
269 .Pa /usr/share/man/man4
271 .Ss Displaying Specific Manual Files
274 utility also supports displaying a specific manual page if passed a path
275 to the file as long as it contains a
279 The following environment variables affect the execution of
281 .Bl -tag -width ".Ev MANROFFSEQ"
282 .It Ev LC_ALL , LC_CTYPE , LANG
283 Used to find locale specific manual pages.
284 Valid values can be found by running the
288 .Sx IMPLEMENTATION NOTES
293 .It Ev MACHINE_ARCH , MACHINE
294 Used to find platform specific manual pages.
295 If unset, the output of
296 .Dq Li "sysctl hw.machine_arch"
298 .Dq Li "sysctl hw.machine"
299 is used respectively.
301 .Sx IMPLEMENTATION NOTES
307 The standard search path used by
309 may be changed by specifying a path in the
311 environment variable.
312 Invalid paths, or paths without manual databases, are ignored.
317 begins with a colon, it is appended to the default list;
318 if it ends with a colon, it is prepended to the default list;
319 or if it contains two adjacent colons,
320 the standard search path is inserted between the colons.
321 If none of these conditions are met, it overrides the
322 standard search path.
324 Used to determine the preprocessors for the manual source before running
325 .Xr nroff 1 Pq Pa ports/textproc/groff
327 .Xr troff 1 Pq Pa ports/textproc/groff .
328 If unset, defaults to
329 .Xr tbl 1 Pq Pa ports/textproc/groff .
334 Restricts manual sections searched to the specified colon delimited list.
339 If set to a numeric value, used as the width manpages should be displayed.
340 Otherwise, if set to a special value
342 and output is to a terminal,
343 the pages may be displayed over the whole width of the screen.
345 If set, enables color support.
347 Program used to display files.
349 If unset, and color support is enabled,
353 If unset, and color support is disabled, then
356 If that has no value either,
361 .Bl -tag -width indent -compact
363 System configuration file.
364 .It Pa /usr/local/etc/man.d/*.conf
365 Local configuration files.
370 Show the manual page for
372 .Bd -literal -offset indent
376 Show all manual pages for
378 .Bd -literal -offset indent
382 List manual pages which match the regular expression either in the title or in
384 .Bd -literal -offset indent
385 $ man -k '\e<copy\e>.*archive'
388 Show the manual page for
393 .Bd -literal -offset indent
397 Show the location of the
400 .Bd -literal -offset indent
404 Show the location of manual pages in sections 1 and 8 which contain the word
406 .Bd -literal -offset indent
407 $ ./man -w -K '\e<arm\e>' -S 1:8