Annotation of src/usr.bin/man/man.1, Revision 1.17
1.17 ! mickey 1: .\" $OpenBSD: man.1,v 1.16 2001/09/02 13:12:06 aaron 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.
14: .\" 3. All advertising materials mentioning features or use of this software
15: .\" must display the following acknowledgement:
16: .\" This product includes software developed by the University of
17: .\" California, Berkeley and its contributors.
18: .\" 4. Neither the name of the University nor the names of its contributors
19: .\" may be used to endorse or promote products derived from this software
20: .\" without specific prior written permission.
21: .\"
22: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32: .\" SUCH DAMAGE.
33: .\"
34: .\" @(#)man.1 8.2 (Berkeley) 1/2/94
35: .\"
1.4 millert 36: .Dd March 9, 1998
1.1 deraadt 37: .Dt MAN 1
1.4 millert 38: .Os
1.1 deraadt 39: .Sh NAME
40: .Nm man
41: .Nd display the on-line manual pages
42: .Sh SYNOPSIS
43: .Nm man
44: .Op Fl achw
45: .Op Fl C Ar file
46: .Op Fl M Ar path
47: .Op Fl m Ar path
1.4 millert 48: .Op Fl s Ar section
49: .Op Fl S Ar subsection
1.1 deraadt 50: .Op Ar section
1.8 aaron 51: .Ar name Op Ar ...
1.5 art 52: .Nm man
53: .Fl k Ar keyword
1.7 deraadt 54: .Nm man
1.6 deraadt 55: .Fl f Ar filename
1.1 deraadt 56: .Sh DESCRIPTION
57: The
1.9 aaron 58: .Nm
1.1 deraadt 59: utility
60: displays the
61: .Bx
62: manual pages entitled
63: .Ar name .
64: .Pp
65: The options are as follows:
1.13 aaron 66: .Bl -tag -width Ds
1.7 deraadt 67: .It Fl k
1.8 aaron 68: Locate man pages matching
1.7 deraadt 69: .Ar keyword
70: in much the same way as
71: .Xr apropos 1
72: works (in fact, it runs
73: .Xr apropos 1
74: for you).
75: This can be used to find which man page applies to a particular subsystem
76: you are interested in, for instance
77: .Pp
1.11 deraadt 78: .Nm man Fl k Em mount
1.7 deraadt 79: .Pp
80: will list all man-pages which contain your
81: .Ar keyword
82: in the
83: .Em NAME
1.11 deraadt 84: line of the man page;
85: in this case a list much like this:
86: .Bd -literal -offset xx
87: amd (8) - automatically mount file systems
88: amq (8) - automounter query tool
89: mount (8) - mount file systems
90: mount, unmount (2) - mount or dismount a filesystem
91: mount_ados (8) - mount an AmigaDOS file system
92: mount_cd9660 (8) - mount an ISO-9660 filesystem
93: mount_ext2fs (8) - mount a ext2fs file system
94: mount_fdesc (8) - mount the file-descriptor file system
95: mount_ffs, mount_ufs (8) - mount a Berkeley Fast File System
96: mount_kernfs (8) - mount the /kern file system
97: mount_procfs (8) - mount the process file system
98: mount_umap (8) - sample file system layer
99: mount_union (8) - mount union filesystems
100: mount_xfs (8) - mount the xfs filesystem
101: mountd (8) - service remote NFS mount requests
102: newfs, mount_mfs (8) - construct a new file system
103: umount (8) - unmount file systems
104: \&...
105: .Ed
1.1 deraadt 106: .It Fl a
107: Display all of the manual pages for a specified
108: .Ar section
109: and
110: .Ar name
111: combination.
112: (Normally, only the first manual page found is displayed.)
1.8 aaron 113: .It Fl C Ar file
1.9 aaron 114: Use the specified
1.1 deraadt 115: .Ar file
116: instead of the default configuration file.
117: This permits users to configure their own manual environment.
118: See
119: .Xr man.conf 5
120: for a description of the contents of this file.
121: .It Fl c
122: Copy the manual page to the standard output instead of using
123: .Xr more 1
124: to paginate it.
125: This is done by default if the standard output is not a terminal device.
126: .It Fl h
127: Display only the
128: .Dq Tn SYNOPSIS
129: lines of the requested manual pages.
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.9 aaron 142: is specified by the
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.9 aaron 163: is specified by the
164: .Dq _subdir
165: line in the
166: .Nm
1.1 deraadt 167: configuration file.
1.8 aaron 168: .It Fl s Ar section
1.4 millert 169: Another way of specifying the section, for compatibility with
1.9 aaron 170: .Nm
1.4 millert 171: on other operating systems.
1.8 aaron 172: .It Fl S Ar subsection
1.12 aaron 173: Specifies the machine-dependent subsection.
174: This overrides the
1.4 millert 175: .Ev MACHINE
1.12 aaron 176: environment variable.
177: See the
1.9 aaron 178: .Sx ENVIRONMENT
179: section below.
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.
1.6 deraadt 188: .It Fl f
1.8 aaron 189: Locate man pages matching the
1.6 deraadt 190: .Ar command
191: in much the same way
192: .Xr whatis 1
193: works.
1.1 deraadt 194: .El
195: .Pp
196: The optional
197: .Ar section
198: argument restricts the directories that
1.9 aaron 199: .Nm
1.1 deraadt 200: will search.
201: The
1.9 aaron 202: .Nm
1.1 deraadt 203: configuration file (see
204: .Xr man.conf 5 )
205: specifies the possible
206: .Ar section
207: values that are currently available.
208: If only a single argument is specified or if the first argument is
209: not a valid section,
1.9 aaron 210: .Nm
1.1 deraadt 211: assumes that the argument is the name of a manual page to be displayed.
212: .Sh ENVIRONMENT
213: .Bl -tag -width MANPATHX
214: .It Ev MACHINE
215: As some manual pages are intended only for specific architectures,
1.9 aaron 216: .Nm
1.1 deraadt 217: searches any subdirectories,
218: with the same name as the current architecture,
219: in every directory which it searches.
220: Machine specific areas are checked before general areas.
221: The current machine type may be overridden by setting the environment
222: variable
223: .Ev MACHINE
224: to the name of a specific architecture.
225: .It Ev MANPATH
226: The standard search path used by
1.9 aaron 227: .Nm
1.1 deraadt 228: may be overridden by specifying a path in the
229: .Ev MANPATH
230: environment
231: variable.
1.9 aaron 232: The format of the path is a colon
233: .Pq Ql \&:
234: separated list of directories.
1.1 deraadt 235: The subdirectories to be searched as well as their search order
1.9 aaron 236: is specified by the
237: .Dq _subdir
238: line in the
239: .Nm
1.1 deraadt 240: configuration file.
241: .It Ev PAGER
1.10 pjanzen 242: Any non-null value of the environment variable
1.1 deraadt 243: .Ev PAGER
244: will be used instead of the standard pagination program,
245: .Xr more 1 .
246: .El
247: .Sh FILES
248: .Bl -tag -width /etc/man.conf -compact
249: .It Pa /etc/man.conf
1.8 aaron 250: default man configuration file
1.1 deraadt 251: .El
252: .Sh SEE ALSO
253: .Xr apropos 1 ,
254: .Xr whatis 1 ,
255: .Xr whereis 1 ,
256: .Xr man.conf 5
257: .Sh HISTORY
258: A
259: .Nm
260: command appeared in
1.17 ! mickey 261: .At v3 .
1.14 aaron 262: .Sh BUGS
263: The on-line manual pages are, by necessity, forgiving toward stupid
264: display devices, causing a few manual pages to be not as nicely formatted
265: as their typeset counterparts.