xref: /netbsd/usr.bin/man/man.1 (revision c4a72b64)
1.\"	$NetBSD: man.1,v 1.16 2002/09/30 10:21:14 grant Exp $
2.\"
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.\"
36.Dd January 2, 1994
37.Dt MAN 1
38.Os
39.Sh NAME
40.Nm man
41.Nd display the on-line manual pages
42.Pq aka Dq Em man pages
43.Sh SYNOPSIS
44.Nm ""
45.Oo Fl acw Ns \&| Ns Fl h Oc
46.Op Fl C Ar file
47.Op Fl M Ar path
48.Op Fl m Ar path
49.Op Fl S Ar srch
50.Oo
51.Op Fl s
52.Ar section
53.Oc
54.Ar name Ar ...
55.Nm ""
56.Op Fl k
57.Op Fl C Ar file
58.Op Fl M Ar path
59.Op Fl m Ar path
60.Ar keyword Ar ...
61.Sh DESCRIPTION
62The
63.Nm
64utility
65displays the
66.Bx
67man pages entitled
68.Ar name .
69.Pp
70The options are as follows:
71.Bl -tag -width indent
72.It Fl a
73Display all of the man pages for a specified
74.Ar section
75and
76.Ar name
77combination.
78(Normally, only the first man page found is displayed.)
79.It Fl C
80Use the specified
81.Ar file
82instead of the default configuration file.
83This permits users to configure their own man environment.
84See
85.Xr man.conf 5
86for a description of the contents of this file.
87.It Fl c
88Copy the man page to the standard output instead of using
89.Xr more 1
90to paginate it.
91This is done by default if the standard output is not a terminal device.
92.It Fl h
93Display only the
94.Dq Tn SYNOPSIS
95lines of the requested man pages,
96in the same manner as
97.Xr whatis 1 .
98.It Fl k
99Display the header lines for any man pages matching
100.Ar keyword Ns Pq s ,
101in the same manner as
102.Xr apropos 1 .
103.It Fl M
104Override the list of standard directories which
105.Nm
106searches for man pages.
107The supplied
108.Ar path
109must be a colon
110.Pq Dq \&:
111separated list of directories.
112This search path may also be set using the environment variable
113.Ev MANPATH .
114The subdirectories to be searched, and their search order,
115is specified by the
116.Dq _subdir
117line in the
118.Nm
119configuration file.
120.It Fl m
121Augment the list of standard directories which
122.Nm
123searches for man pages.
124The supplied
125.Ar path
126must be a colon
127.Pq Dq \&:
128separated list of directories.
129These directories will be searched before the standard directories or
130the directories specified using the
131.Fl M
132option or the
133.Ev MANPATH
134environment variable.
135The subdirectories to be searched, and their search order,
136is specified by the
137.Dq _subdir
138line in the
139.Nm
140configuration file.
141.It Fl s
142Restrict the directories that
143.Nm
144will search.
145The
146.Nm
147configuration file (see
148.Xr man.conf 5 )
149specifies the possible
150.Ar section
151values that are currently available.
152.It Fl S
153Display only man pages that have the specified string in their
154filenames.
155This allows the man page search process criteria to be
156narrowed without having to change the MANPATH or
157.Dq _default
158variables.
159.It Fl w
160List the pathnames of the man pages which
161.Nm
162would display for the specified
163.Ar section
164and
165.Ar name
166combination.
167.El
168.Pp
169If the
170.Ql Fl s
171option is not specified,
172there is more than one argument,
173the
174.Ql Fl k
175option is not used and the first argument is a valid section, that
176argument will be used as if specified by the
177.Ql Fl s
178option.
179.Sh ENVIRONMENT
180.Bl -tag -width MANPATHX
181.It Ev MACHINE
182As some man pages are intended only for specific architectures,
183.Nm
184searches any subdirectories,
185with the same name as the current architecture,
186in every directory which it searches.
187Machine specific areas are checked before general areas.
188The current machine type may be overridden by setting the environment
189variable
190.Ev MACHINE
191to the name of a specific architecture.
192.It Ev MANPATH
193The standard search path used by
194.Nm
195may be overridden by specifying a path in the
196.Ev MANPATH
197environment
198variable.
199The format of the path is a colon
200.Pq Dq \&:
201separated list of directories.
202The subdirectories to be searched as well as their search order
203is specified by the
204.Dq _subdir
205line in the
206.Nm
207configuration file.
208.It Ev PAGER
209The pagination command used for writing the output.
210If the
211.Ev PAGER
212environment variable is null or not set, the standard pagination program
213.Xr more 1
214will be used.
215.El
216.Sh FILES
217.Bl -hang -width /etc/man.conf -compact
218.It Pa /etc/man.conf
219default man configuration file.
220.It Pa /usr/{share,X11R6,pkg,local}/man/whatis.db
221standard whatis/apropos database search path,
222set in
223.Pa /etc/man.conf .
224.El
225.Sh SEE ALSO
226.Xr apropos 1 ,
227.Xr whatis 1 ,
228.Xr whereis 1 ,
229.Xr man.conf 5 ,
230.Xr mdoc 7 ,
231.Xr mdoc.samples 7
232.Sh STANDARDS
233.Nm
234conforms to
235.St -xcu5 .
236.\"and is expected to conform to
237.\".St -p1003.2-?? .
238.Sh BUGS
239The on-line man pages are, by necessity, forgiving toward stupid
240display devices, causing a few man pages to be not as nicely formatted
241as their typeset counterparts.
242