Annotation of src/usr.bin/man/man.1, Revision 1.23
1.23 ! fgsch 1: .\" $OpenBSD: man.1,v 1.22 2005/04/15 23:35:01 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.4 millert 32: .Dd March 9, 1998
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.7 deraadt 107: .Ar keyword
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
113: amd (8) \- automatically mount file systems
114: amq (8) \- automounter query tool
115: mount (8) \- mount file systems
116: mount, unmount (2) \- mount or dismount a filesystem
117: mount_ados (8) \- mount an AmigaDOS file system
118: mount_cd9660 (8) \- mount an ISO-9660 filesystem
119: mount_ext2fs (8) \- mount a ext2fs file system
120: mount_fdesc (8) \- mount the file-descriptor file system
121: mount_ffs, mount_ufs (8) \- mount a Berkeley Fast File System
122: mount_kernfs (8) \- mount the /kern file system
123: mount_procfs (8) \- mount the process file system
124: mount_xfs (8) \- mount the xfs filesystem
125: mountd (8) \- service remote NFS mount requests
126: newfs, mount_mfs (8) \- construct a new file system
127: umount (8) \- unmount file systems
1.11 deraadt 128: \&...
129: .Ed
1.8 aaron 130: .It Fl M Ar path
1.1 deraadt 131: Override the list of standard directories which
1.9 aaron 132: .Nm
1.1 deraadt 133: searches for manual pages.
134: The supplied
135: .Ar path
1.9 aaron 136: must be a colon
137: .Pq Ql \&:
138: separated list of directories.
1.1 deraadt 139: This search path may also be set using the environment variable
140: .Ev MANPATH .
141: The subdirectories to be searched, and their search order,
1.21 jmc 142: are specified by the
1.9 aaron 143: .Dq _subdir
144: line in the
145: .Nm
1.1 deraadt 146: configuration file.
1.8 aaron 147: .It Fl m Ar path
1.1 deraadt 148: Augment the list of standard directories which
1.9 aaron 149: .Nm
1.1 deraadt 150: searches for manual pages.
151: The supplied
152: .Ar path
1.9 aaron 153: must be a colon
154: .Pq Ql \&:
155: separated list of directories.
1.1 deraadt 156: These directories will be searched before the standard directories or
157: the directories specified using the
158: .Fl M
159: option or the
160: .Ev MANPATH
161: environment variable.
162: The subdirectories to be searched, and their search order,
1.21 jmc 163: are specified by the
1.9 aaron 164: .Dq _subdir
165: line in the
166: .Nm
1.1 deraadt 167: configuration file.
1.8 aaron 168: .It Fl S Ar subsection
1.12 aaron 169: Specifies the machine-dependent subsection.
170: This overrides the
1.4 millert 171: .Ev MACHINE
1.12 aaron 172: environment variable.
173: See the
1.9 aaron 174: .Sx ENVIRONMENT
175: section below.
1.21 jmc 176: .It Fl s Ar section
177: Another way of specifying the section, for compatibility with
178: .Nm
179: on other operating systems.
1.1 deraadt 180: .It Fl w
181: List the pathnames of the manual pages which
1.9 aaron 182: .Nm
1.1 deraadt 183: would display for the specified
184: .Ar section
185: and
186: .Ar name
187: combination.
188: .El
189: .Pp
190: The optional
191: .Ar section
192: argument restricts the directories that
1.9 aaron 193: .Nm
1.1 deraadt 194: will search.
1.19 jmc 195: The currently available sections are:
196: .Pp
197: .Bl -tag -width "3p " -offset indent -compact
198: .It 1
199: General commands
200: .Pq tools and utilities .
201: .It 2
202: System calls and error numbers.
203: .It 3
204: Libraries.
205: .It 3p
206: .Xr perl 1
207: programmer's reference guide.
208: .It 4
209: Device drivers.
210: .It 5
211: File formats.
212: .It 6
213: Games.
214: .It 7
215: Miscellaneous.
216: .It 8
217: System maintenance and operation commands.
218: .It 9
219: Kernel internals.
220: .El
221: .Pp
1.1 deraadt 222: The
1.9 aaron 223: .Nm
1.1 deraadt 224: configuration file (see
225: .Xr man.conf 5 )
226: specifies the possible
227: .Ar section
1.19 jmc 228: values, and their search order.
1.21 jmc 229: If only a single argument is specified, or if the first argument is
1.1 deraadt 230: not a valid section,
1.9 aaron 231: .Nm
1.1 deraadt 232: assumes that the argument is the name of a manual page to be displayed.
1.22 jmc 233: .Pp
234: Guidelines for
235: .Ox
236: man pages can be found in
237: .Xr mdoc 7 .
238: A full tutorial for writing man pages is provided in
239: .Xr mdoc.samples 7 .
1.1 deraadt 240: .Sh ENVIRONMENT
241: .Bl -tag -width MANPATHX
242: .It Ev MACHINE
243: As some manual pages are intended only for specific architectures,
1.9 aaron 244: .Nm
1.1 deraadt 245: searches any subdirectories,
246: with the same name as the current architecture,
247: in every directory which it searches.
248: Machine specific areas are checked before general areas.
249: The current machine type may be overridden by setting the environment
250: variable
251: .Ev MACHINE
252: to the name of a specific architecture.
1.20 millert 253: .It Ev MANPAGER
254: Any non-null value of the environment variable
255: .Ev MANPAGER
256: will be used instead of the standard pagination program,
257: .Xr more 1 .
1.1 deraadt 258: .It Ev MANPATH
259: The standard search path used by
1.9 aaron 260: .Nm
1.1 deraadt 261: may be overridden by specifying a path in the
262: .Ev MANPATH
263: environment
264: variable.
1.9 aaron 265: The format of the path is a colon
266: .Pq Ql \&:
267: separated list of directories.
1.21 jmc 268: The subdirectories to be searched, as well as their search order,
269: are specified by the
1.9 aaron 270: .Dq _subdir
271: line in the
272: .Nm
1.1 deraadt 273: configuration file.
274: .It Ev PAGER
1.20 millert 275: Specifies the pagination program to use when
276: .Ev MANPAGER
277: is not defined.
1.1 deraadt 278: .El
279: .Sh FILES
280: .Bl -tag -width /etc/man.conf -compact
281: .It Pa /etc/man.conf
1.8 aaron 282: default man configuration file
1.1 deraadt 283: .El
284: .Sh SEE ALSO
285: .Xr apropos 1 ,
1.19 jmc 286: .Xr intro 1 ,
1.1 deraadt 287: .Xr whatis 1 ,
288: .Xr whereis 1 ,
1.19 jmc 289: .Xr intro 2 ,
290: .Xr intro 3 ,
291: .Xr intro 4 ,
292: .Xr intro 5 ,
293: .Xr man.conf 5 ,
294: .Xr intro 6 ,
295: .Xr intro 7 ,
1.22 jmc 296: .Xr mdoc 7 ,
297: .Xr mdoc.samples 7 ,
1.19 jmc 298: .Xr intro 8 ,
299: .Xr intro 9
1.1 deraadt 300: .Sh HISTORY
301: A
302: .Nm
303: command appeared in
1.17 mickey 304: .At v3 .
1.14 aaron 305: .Sh BUGS
306: The on-line manual pages are, by necessity, forgiving toward stupid
307: display devices, causing a few manual pages to be not as nicely formatted
308: as their typeset counterparts.