Annotation of src/usr.bin/man/man.1, Revision 1.14
1.14 ! aaron 1: .\" $OpenBSD: man.1,v 1.13 2000/11/09 17:52:22 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: mount_xfs (8) - mount the xfs filesystem.
102: mountd (8) - service remote NFS mount requests
103: newfs, mount_mfs (8) - construct a new file system
104: umount (8) - unmount file systems
105: \&...
106: .Ed
1.1 deraadt 107: .It Fl a
108: Display all of the manual pages for a specified
109: .Ar section
110: and
111: .Ar name
112: combination.
113: (Normally, only the first manual page found is displayed.)
1.8 aaron 114: .It Fl C Ar file
1.9 aaron 115: Use the specified
1.1 deraadt 116: .Ar file
117: instead of the default configuration file.
118: This permits users to configure their own manual environment.
119: See
120: .Xr man.conf 5
121: for a description of the contents of this file.
122: .It Fl c
123: Copy the manual page to the standard output instead of using
124: .Xr more 1
125: to paginate it.
126: This is done by default if the standard output is not a terminal device.
127: .It Fl h
128: Display only the
129: .Dq Tn SYNOPSIS
130: lines of the requested manual pages.
1.8 aaron 131: .It Fl M Ar path
1.1 deraadt 132: Override the list of standard directories which
1.9 aaron 133: .Nm
1.1 deraadt 134: searches for manual pages.
135: The supplied
136: .Ar path
1.9 aaron 137: must be a colon
138: .Pq Ql \&:
139: separated list of directories.
1.1 deraadt 140: This search path may also be set using the environment variable
141: .Ev MANPATH .
142: The subdirectories to be searched, and their search order,
1.9 aaron 143: is specified by the
144: .Dq _subdir
145: line in the
146: .Nm
1.1 deraadt 147: configuration file.
1.8 aaron 148: .It Fl m Ar path
1.1 deraadt 149: Augment the list of standard directories which
1.9 aaron 150: .Nm
1.1 deraadt 151: searches for manual pages.
152: The supplied
153: .Ar path
1.9 aaron 154: must be a colon
155: .Pq Ql \&:
156: separated list of directories.
1.1 deraadt 157: These directories will be searched before the standard directories or
158: the directories specified using the
159: .Fl M
160: option or the
161: .Ev MANPATH
162: environment variable.
163: The subdirectories to be searched, and their search order,
1.9 aaron 164: is specified by the
165: .Dq _subdir
166: line in the
167: .Nm
1.1 deraadt 168: configuration file.
1.8 aaron 169: .It Fl s Ar section
1.4 millert 170: Another way of specifying the section, for compatibility with
1.9 aaron 171: .Nm
1.4 millert 172: on other operating systems.
1.8 aaron 173: .It Fl S Ar subsection
1.12 aaron 174: Specifies the machine-dependent subsection.
175: This overrides the
1.4 millert 176: .Ev MACHINE
1.12 aaron 177: environment variable.
178: See the
1.9 aaron 179: .Sx ENVIRONMENT
180: section below.
1.1 deraadt 181: .It Fl w
182: List the pathnames of the manual pages which
1.9 aaron 183: .Nm
1.1 deraadt 184: would display for the specified
185: .Ar section
186: and
187: .Ar name
188: combination.
1.6 deraadt 189: .It Fl f
1.8 aaron 190: Locate man pages matching the
1.6 deraadt 191: .Ar command
192: in much the same way
193: .Xr whatis 1
194: works.
1.1 deraadt 195: .El
196: .Pp
197: The optional
198: .Ar section
199: argument restricts the directories that
1.9 aaron 200: .Nm
1.1 deraadt 201: will search.
202: The
1.9 aaron 203: .Nm
1.1 deraadt 204: configuration file (see
205: .Xr man.conf 5 )
206: specifies the possible
207: .Ar section
208: values that are currently available.
209: If only a single argument is specified or if the first argument is
210: not a valid section,
1.9 aaron 211: .Nm
1.1 deraadt 212: assumes that the argument is the name of a manual page to be displayed.
213: .Sh ENVIRONMENT
1.12 aaron 214: The following environment variables affect the execution of
215: .Nm man :
1.1 deraadt 216: .Bl -tag -width MANPATHX
217: .It Ev MACHINE
218: As some manual pages are intended only for specific architectures,
1.9 aaron 219: .Nm
1.1 deraadt 220: searches any subdirectories,
221: with the same name as the current architecture,
222: in every directory which it searches.
223: Machine specific areas are checked before general areas.
224: The current machine type may be overridden by setting the environment
225: variable
226: .Ev MACHINE
227: to the name of a specific architecture.
228: .It Ev MANPATH
229: The standard search path used by
1.9 aaron 230: .Nm
1.1 deraadt 231: may be overridden by specifying a path in the
232: .Ev MANPATH
233: environment
234: variable.
1.9 aaron 235: The format of the path is a colon
236: .Pq Ql \&:
237: separated list of directories.
1.1 deraadt 238: The subdirectories to be searched as well as their search order
1.9 aaron 239: is specified by the
240: .Dq _subdir
241: line in the
242: .Nm
1.1 deraadt 243: configuration file.
244: .It Ev PAGER
1.10 pjanzen 245: Any non-null value of the environment variable
1.1 deraadt 246: .Ev PAGER
247: will be used instead of the standard pagination program,
248: .Xr more 1 .
249: .El
250: .Sh FILES
251: .Bl -tag -width /etc/man.conf -compact
252: .It Pa /etc/man.conf
1.8 aaron 253: default man configuration file
1.1 deraadt 254: .El
255: .Sh SEE ALSO
256: .Xr apropos 1 ,
257: .Xr whatis 1 ,
258: .Xr whereis 1 ,
259: .Xr man.conf 5
260: .Sh HISTORY
261: A
262: .Nm
263: command appeared in
264: .At v6 .
1.14 ! aaron 265: .Sh BUGS
! 266: The on-line manual pages are, by necessity, forgiving toward stupid
! 267: display devices, causing a few manual pages to be not as nicely formatted
! 268: as their typeset counterparts.