Annotation of src/usr.bin/man/man.1, Revision 1.19
1.19 ! jmc 1: .\" $OpenBSD: man.1,v 1.18 2003/06/03 02:56:12 millert 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.4 millert 44: .Op Fl s Ar section
45: .Op Fl S Ar subsection
1.1 deraadt 46: .Op Ar section
1.8 aaron 47: .Ar name Op Ar ...
1.5 art 48: .Nm man
49: .Fl k Ar keyword
1.7 deraadt 50: .Nm man
1.6 deraadt 51: .Fl f Ar filename
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.7 deraadt 63: .It Fl k
1.8 aaron 64: Locate man pages matching
1.7 deraadt 65: .Ar keyword
66: in much the same way as
67: .Xr apropos 1
68: works (in fact, it runs
69: .Xr apropos 1
70: for you).
71: This can be used to find which man page applies to a particular subsystem
72: you are interested in, for instance
73: .Pp
1.11 deraadt 74: .Nm man Fl k Em mount
1.7 deraadt 75: .Pp
1.19 ! jmc 76: will list all man pages which contain your
1.7 deraadt 77: .Ar keyword
78: in the
79: .Em NAME
1.11 deraadt 80: line of the man page;
81: in this case a list much like this:
1.19 ! jmc 82: .Bd -literal
! 83: amd (8) \- automatically mount file systems
! 84: amq (8) \- automounter query tool
! 85: mount (8) \- mount file systems
! 86: mount, unmount (2) \- mount or dismount a filesystem
! 87: mount_ados (8) \- mount an AmigaDOS file system
! 88: mount_cd9660 (8) \- mount an ISO-9660 filesystem
! 89: mount_ext2fs (8) \- mount a ext2fs file system
! 90: mount_fdesc (8) \- mount the file-descriptor file system
! 91: mount_ffs, mount_ufs (8) \- mount a Berkeley Fast File System
! 92: mount_kernfs (8) \- mount the /kern file system
! 93: mount_procfs (8) \- mount the process file system
! 94: mount_umap (8) \- sample file system layer
! 95: mount_union (8) \- mount union filesystems
! 96: mount_xfs (8) \- mount the xfs filesystem
! 97: mountd (8) \- service remote NFS mount requests
! 98: newfs, mount_mfs (8) \- construct a new file system
! 99: umount (8) \- unmount file systems
1.11 deraadt 100: \&...
101: .Ed
1.1 deraadt 102: .It Fl a
103: Display all of the manual pages for a specified
104: .Ar section
105: and
106: .Ar name
107: combination.
108: (Normally, only the first manual page found is displayed.)
1.8 aaron 109: .It Fl C Ar file
1.9 aaron 110: Use the specified
1.1 deraadt 111: .Ar file
112: instead of the default configuration file.
113: This permits users to configure their own manual environment.
114: See
115: .Xr man.conf 5
116: for a description of the contents of this file.
117: .It Fl c
118: Copy the manual page to the standard output instead of using
119: .Xr more 1
120: to paginate it.
121: This is done by default if the standard output is not a terminal device.
122: .It Fl h
123: Display only the
124: .Dq Tn SYNOPSIS
125: lines of the requested manual pages.
1.8 aaron 126: .It Fl M Ar path
1.1 deraadt 127: Override the list of standard directories which
1.9 aaron 128: .Nm
1.1 deraadt 129: searches for manual pages.
130: The supplied
131: .Ar path
1.9 aaron 132: must be a colon
133: .Pq Ql \&:
134: separated list of directories.
1.1 deraadt 135: This search path may also be set using the environment variable
136: .Ev MANPATH .
137: The subdirectories to be searched, and their search order,
1.9 aaron 138: is specified by the
139: .Dq _subdir
140: line in the
141: .Nm
1.1 deraadt 142: configuration file.
1.8 aaron 143: .It Fl m Ar path
1.1 deraadt 144: Augment the list of standard directories which
1.9 aaron 145: .Nm
1.1 deraadt 146: searches for manual pages.
147: The supplied
148: .Ar path
1.9 aaron 149: must be a colon
150: .Pq Ql \&:
151: separated list of directories.
1.1 deraadt 152: These directories will be searched before the standard directories or
153: the directories specified using the
154: .Fl M
155: option or the
156: .Ev MANPATH
157: environment variable.
158: The subdirectories to be searched, and their search order,
1.9 aaron 159: is specified by the
160: .Dq _subdir
161: line in the
162: .Nm
1.1 deraadt 163: configuration file.
1.8 aaron 164: .It Fl s Ar section
1.4 millert 165: Another way of specifying the section, for compatibility with
1.9 aaron 166: .Nm
1.4 millert 167: on other operating systems.
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.1 deraadt 176: .It Fl w
177: List the pathnames of the manual pages which
1.9 aaron 178: .Nm
1.1 deraadt 179: would display for the specified
180: .Ar section
181: and
182: .Ar name
183: combination.
1.6 deraadt 184: .It Fl f
1.8 aaron 185: Locate man pages matching the
1.6 deraadt 186: .Ar command
187: in much the same way
188: .Xr whatis 1
189: works.
1.1 deraadt 190: .El
191: .Pp
192: The optional
193: .Ar section
194: argument restricts the directories that
1.9 aaron 195: .Nm
1.1 deraadt 196: will search.
1.19 ! jmc 197: The currently available sections are:
! 198: .Pp
! 199: .Bl -tag -width "3p " -offset indent -compact
! 200: .It 1
! 201: General commands
! 202: .Pq tools and utilities .
! 203: .It 2
! 204: System calls and error numbers.
! 205: .It 3
! 206: Libraries.
! 207: .It 3p
! 208: .Xr perl 1
! 209: programmer's reference guide.
! 210: .It 4
! 211: Device drivers.
! 212: .It 5
! 213: File formats.
! 214: .It 6
! 215: Games.
! 216: .It 7
! 217: Miscellaneous.
! 218: .It 8
! 219: System maintenance and operation commands.
! 220: .It 9
! 221: Kernel internals.
! 222: .El
! 223: .Pp
1.1 deraadt 224: The
1.9 aaron 225: .Nm
1.1 deraadt 226: configuration file (see
227: .Xr man.conf 5 )
228: specifies the possible
229: .Ar section
1.19 ! jmc 230: values, and their search order.
1.1 deraadt 231: If only a single argument is specified or if the first argument is
232: not a valid section,
1.9 aaron 233: .Nm
1.1 deraadt 234: assumes that the argument is the name of a manual page to be displayed.
235: .Sh ENVIRONMENT
236: .Bl -tag -width MANPATHX
237: .It Ev MACHINE
238: As some manual pages are intended only for specific architectures,
1.9 aaron 239: .Nm
1.1 deraadt 240: searches any subdirectories,
241: with the same name as the current architecture,
242: in every directory which it searches.
243: Machine specific areas are checked before general areas.
244: The current machine type may be overridden by setting the environment
245: variable
246: .Ev MACHINE
247: to the name of a specific architecture.
248: .It Ev MANPATH
249: The standard search path used by
1.9 aaron 250: .Nm
1.1 deraadt 251: may be overridden by specifying a path in the
252: .Ev MANPATH
253: environment
254: variable.
1.9 aaron 255: The format of the path is a colon
256: .Pq Ql \&:
257: separated list of directories.
1.1 deraadt 258: The subdirectories to be searched as well as their search order
1.9 aaron 259: is specified by the
260: .Dq _subdir
261: line in the
262: .Nm
1.1 deraadt 263: configuration file.
264: .It Ev PAGER
1.10 pjanzen 265: Any non-null value of the environment variable
1.1 deraadt 266: .Ev PAGER
267: will be used instead of the standard pagination program,
268: .Xr more 1 .
269: .El
270: .Sh FILES
271: .Bl -tag -width /etc/man.conf -compact
272: .It Pa /etc/man.conf
1.8 aaron 273: default man configuration file
1.1 deraadt 274: .El
275: .Sh SEE ALSO
276: .Xr apropos 1 ,
1.19 ! jmc 277: .Xr intro 1 ,
1.1 deraadt 278: .Xr whatis 1 ,
279: .Xr whereis 1 ,
1.19 ! jmc 280: .Xr intro 2 ,
! 281: .Xr intro 3 ,
! 282: .Xr intro 4 ,
! 283: .Xr intro 5 ,
! 284: .Xr man.conf 5 ,
! 285: .Xr intro 6 ,
! 286: .Xr intro 7 ,
! 287: .Xr intro 8 ,
! 288: .Xr intro 9
1.1 deraadt 289: .Sh HISTORY
290: A
291: .Nm
292: command appeared in
1.17 mickey 293: .At v3 .
1.14 aaron 294: .Sh BUGS
295: The on-line manual pages are, by necessity, forgiving toward stupid
296: display devices, causing a few manual pages to be not as nicely formatted
297: as their typeset counterparts.