Annotation of src/usr.bin/man/man.1, Revision 1.28
1.28 ! jmc 1: .\" $OpenBSD: man.1,v 1.27 2005/12/07 12:02:08 jmc Exp $
1.3 deraadt 2: .\"
1.1 deraadt 3: .\" Copyright (c) 1989, 1990, 1993
4: .\" The Regents of the University of California. All rights reserved.
5: .\"
6: .\" Redistribution and use in source and binary forms, with or without
7: .\" modification, are permitted provided that the following conditions
8: .\" are met:
9: .\" 1. Redistributions of source code must retain the above copyright
10: .\" notice, this list of conditions and the following disclaimer.
11: .\" 2. Redistributions in binary form must reproduce the above copyright
12: .\" notice, this list of conditions and the following disclaimer in the
13: .\" documentation and/or other materials provided with the distribution.
1.18 millert 14: .\" 3. Neither the name of the University nor the names of its contributors
1.1 deraadt 15: .\" may be used to endorse or promote products derived from this software
16: .\" without specific prior written permission.
17: .\"
18: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28: .\" SUCH DAMAGE.
29: .\"
30: .\" @(#)man.1 8.2 (Berkeley) 1/2/94
31: .\"
1.28 ! jmc 32: .Dd May 19, 2007
1.1 deraadt 33: .Dt MAN 1
1.4 millert 34: .Os
1.1 deraadt 35: .Sh NAME
36: .Nm man
37: .Nd display the on-line manual pages
38: .Sh SYNOPSIS
39: .Nm man
40: .Op Fl achw
41: .Op Fl C Ar file
42: .Op Fl M Ar path
43: .Op Fl m Ar path
1.21 jmc 44: .Op Fl S Ar subsection
1.4 millert 45: .Op Fl s Ar section
1.1 deraadt 46: .Op Ar section
1.8 aaron 47: .Ar name Op Ar ...
1.5 art 48: .Nm man
1.21 jmc 49: .Fl f Ar command
50: .Nm man
1.5 art 51: .Fl k Ar keyword
1.1 deraadt 52: .Sh DESCRIPTION
53: The
1.9 aaron 54: .Nm
1.1 deraadt 55: utility
56: displays the
57: .Bx
58: manual pages entitled
59: .Ar name .
60: .Pp
61: The options are as follows:
1.13 aaron 62: .Bl -tag -width Ds
1.21 jmc 63: .It Fl a
64: Display all of the manual pages for a specified
65: .Ar section
66: and
67: .Ar name
68: combination.
69: (Normally, only the first manual page found is displayed.)
70: .It Fl C Ar file
71: Use the specified
72: .Ar file
73: instead of the default configuration file.
74: This permits users to configure their own manual environment.
75: See
76: .Xr man.conf 5
77: for a description of the contents of this file.
78: .It Fl c
79: Copy the manual page to the standard output instead of using
80: .Xr more 1
81: to paginate it.
82: This is done by default if the standard output is not a terminal device.
83: .It Fl f Ar command
84: Locate man pages matching the
85: .Ar command
86: in much the same way
87: .Xr whatis 1
88: works.
89: .It Fl h
90: Display only the
91: .Dq SYNOPSIS
92: lines of the requested manual pages.
93: .It Fl k Ar keyword
1.8 aaron 94: Locate man pages matching
1.7 deraadt 95: .Ar keyword
96: in much the same way as
97: .Xr apropos 1
98: works (in fact, it runs
1.21 jmc 99: .Xr apropos 1 ) .
1.7 deraadt 100: This can be used to find which man page applies to a particular subsystem
1.21 jmc 101: you are interested in.
102: For instance:
1.7 deraadt 103: .Pp
1.21 jmc 104: .Dl $ man -k mount
1.7 deraadt 105: .Pp
1.21 jmc 106: will list all man pages which contain
1.27 jmc 107: .Dq mount
1.7 deraadt 108: in the
1.21 jmc 109: .Dq NAME
1.11 deraadt 110: line of the man page;
111: in this case a list much like this:
1.19 jmc 112: .Bd -literal
1.27 jmc 113: amd (8) \(en automatically mount file systems
114: amq (8) \(en automounter query tool
115: domountroothooks (9) \(en run all mountroot hooks
116: exports (5) \(en define remote mount points for NFS mount requests
117: getfsstat (2) \(en get list of all mounted file systems
118: getmntinfo (3) \(en get information about mounted file systems
119: mount (8) \(en mount file systems
120: mount, unmount (2) \(en mount or dismount a filesystem
121: mount_ados (8) \(en mount an AmigaDOS file system
122: mount_cd9660 (8) \(en mount an ISO-9660 filesystem
123: mount_ext2fs (8) \(en mount an ext2fs file system
124: mount_ffs (8) \(en mount a Berkeley Fast File System
125: mount_msdos (8) \(en mount an MS-DOS file system
126: mount_nfs (8) \(en mount NFS file systems
127: mount_ntfs (8) \(en mount an NTFS file system
128: mount_portal (8) \(en mount the portal daemon
129: mount_procfs (8) \(en mount the process file system
130: mount_udf (8) \(en mount a UDF filesystem
131: mount_xfs (8) \(en mount the xfs filesystem
132: mountd (8) \(en service remote NFS mount requests
1.11 deraadt 133: \&...
134: .Ed
1.8 aaron 135: .It Fl M Ar path
1.1 deraadt 136: Override the list of standard directories which
1.9 aaron 137: .Nm
1.1 deraadt 138: searches for manual pages.
139: The supplied
140: .Ar path
1.9 aaron 141: must be a colon
142: .Pq Ql \&:
143: separated list of directories.
1.1 deraadt 144: This search path may also be set using the environment variable
145: .Ev MANPATH .
146: The subdirectories to be searched, and their search order,
1.21 jmc 147: are specified by the
1.9 aaron 148: .Dq _subdir
149: line in the
150: .Nm
1.1 deraadt 151: configuration file.
1.8 aaron 152: .It Fl m Ar path
1.1 deraadt 153: Augment the list of standard directories which
1.9 aaron 154: .Nm
1.1 deraadt 155: searches for manual pages.
156: The supplied
157: .Ar path
1.9 aaron 158: must be a colon
159: .Pq Ql \&:
160: separated list of directories.
1.1 deraadt 161: These directories will be searched before the standard directories or
162: the directories specified using the
163: .Fl M
164: option or the
165: .Ev MANPATH
166: environment variable.
167: The subdirectories to be searched, and their search order,
1.21 jmc 168: are specified by the
1.9 aaron 169: .Dq _subdir
170: line in the
171: .Nm
1.1 deraadt 172: configuration file.
1.8 aaron 173: .It Fl S Ar subsection
1.28 ! jmc 174: Restricts the directories that
! 175: .Nm
! 176: will search to those of a specific machine architecture.
! 177: Overrides the
1.4 millert 178: .Ev MACHINE
1.12 aaron 179: environment variable.
1.28 ! jmc 180: See also the
1.9 aaron 181: .Sx ENVIRONMENT
182: section below.
1.21 jmc 183: .It Fl s Ar section
184: Another way of specifying the section, for compatibility with
185: .Nm
186: on other operating systems.
1.1 deraadt 187: .It Fl w
188: List the pathnames of the manual pages which
1.9 aaron 189: .Nm
1.1 deraadt 190: would display for the specified
191: .Ar section
192: and
193: .Ar name
194: combination.
195: .El
196: .Pp
197: The optional
198: .Ar section
199: argument restricts the directories that
1.9 aaron 200: .Nm
1.28 ! jmc 201: will search to a specific section.
1.19 jmc 202: The currently available sections are:
203: .Pp
204: .Bl -tag -width "3p " -offset indent -compact
205: .It 1
206: General commands
207: .Pq tools and utilities .
208: .It 2
209: System calls and error numbers.
210: .It 3
211: Libraries.
212: .It 3p
213: .Xr perl 1
214: programmer's reference guide.
215: .It 4
216: Device drivers.
217: .It 5
218: File formats.
219: .It 6
220: Games.
221: .It 7
222: Miscellaneous.
223: .It 8
224: System maintenance and operation commands.
225: .It 9
226: Kernel internals.
227: .El
228: .Pp
1.1 deraadt 229: The
1.9 aaron 230: .Nm
1.28 ! jmc 231: configuration file,
! 232: .Xr man.conf 5 ,
1.1 deraadt 233: specifies the possible
234: .Ar section
1.19 jmc 235: values, and their search order.
1.28 ! jmc 236: Additional sections may also be specified.
1.22 jmc 237: .Pp
238: Guidelines for
239: .Ox
240: man pages can be found in
241: .Xr mdoc 7 .
242: A full tutorial for writing man pages is provided in
243: .Xr mdoc.samples 7 .
1.1 deraadt 244: .Sh ENVIRONMENT
245: .Bl -tag -width MANPATHX
246: .It Ev MACHINE
247: As some manual pages are intended only for specific architectures,
1.9 aaron 248: .Nm
1.1 deraadt 249: searches any subdirectories,
250: with the same name as the current architecture,
251: in every directory which it searches.
252: Machine specific areas are checked before general areas.
253: The current machine type may be overridden by setting the environment
254: variable
255: .Ev MACHINE
1.28 ! jmc 256: to the name of a specific architecture,
! 257: or with the
! 258: .Fl S
! 259: option.
1.20 millert 260: .It Ev MANPAGER
261: Any non-null value of the environment variable
262: .Ev MANPAGER
263: will be used instead of the standard pagination program,
264: .Xr more 1 .
1.1 deraadt 265: .It Ev MANPATH
266: The standard search path used by
1.9 aaron 267: .Nm
1.1 deraadt 268: may be overridden by specifying a path in the
269: .Ev MANPATH
270: environment
271: variable.
1.9 aaron 272: The format of the path is a colon
273: .Pq Ql \&:
274: separated list of directories.
1.21 jmc 275: The subdirectories to be searched, as well as their search order,
276: are specified by the
1.9 aaron 277: .Dq _subdir
278: line in the
279: .Nm
1.1 deraadt 280: configuration file.
281: .It Ev PAGER
1.20 millert 282: Specifies the pagination program to use when
283: .Ev MANPAGER
284: is not defined.
1.1 deraadt 285: .El
286: .Sh FILES
287: .Bl -tag -width /etc/man.conf -compact
288: .It Pa /etc/man.conf
1.8 aaron 289: default man configuration file
1.1 deraadt 290: .El
291: .Sh SEE ALSO
292: .Xr apropos 1 ,
1.19 jmc 293: .Xr intro 1 ,
1.1 deraadt 294: .Xr whatis 1 ,
295: .Xr whereis 1 ,
1.19 jmc 296: .Xr intro 2 ,
297: .Xr intro 3 ,
298: .Xr intro 4 ,
299: .Xr intro 5 ,
300: .Xr man.conf 5 ,
301: .Xr intro 6 ,
302: .Xr intro 7 ,
1.22 jmc 303: .Xr mdoc 7 ,
304: .Xr mdoc.samples 7 ,
1.19 jmc 305: .Xr intro 8 ,
306: .Xr intro 9
1.1 deraadt 307: .Sh HISTORY
308: A
309: .Nm
310: command appeared in
1.17 mickey 311: .At v3 .
1.14 aaron 312: .Sh BUGS
313: The on-line manual pages are, by necessity, forgiving toward stupid
314: display devices, causing a few manual pages to be not as nicely formatted
315: as their typeset counterparts.