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