Implement -p. Some lint.
[unix-history] / usr / src / usr.bin / man / man.1
CommitLineData
7400223d
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
bfe02f44 5.\" @(#)man.1 6.5 (Berkeley) %G%
7400223d 6.\"
b896fc7a 7.TH MAN 1 ""
7400223d
KM
8.UC 4
9.SH NAME
10man \- find manual information by keywords; print out the manual
11.SH SYNOPSIS
12.br
13.B man
7400223d
KM
14[
15.B \-
16] [
b896fc7a
KM
17.B \-M
18.I path
19] [
7400223d
KM
20section
21]
22title ...
b896fc7a
KM
23.br
24.B man
25.B \-k
26keyword ...
27.br
28.B man
29.B \-f
30file ...
7400223d
KM
31.SH DESCRIPTION
32.I Man
33is a program which gives information from the programmers manual.
f81fb8aa 34It can be asked for one line descriptions of commands specified by
7400223d
KM
35name, or for all commands whose description contains any of a set of
36keywords. It can also provide on-line access to the sections of the
37printed manual.
38.PP
39When given the option
40.B \-k
41and a set of keywords,
42.I man
43prints out a one line synopsis of each manual sections whose
b896fc7a 44listing in the table of contents contains one of those keywords.
7400223d
KM
45.PP
46When given the option
47.B \-f
48and a list of file names, \fIman\fR attempts to locate manual
49sections related to those files, printing out the table of contents
50lines for those sections.
51.PP
52When neither
53.B \-k
54nor
55.B \-f
56is specified,
57.I man
58formats a specified set of manual pages.
59If a section specifier is given
60.I man
61looks in the that section of the manual for the given
62.I titles.
63.I Section
b896fc7a
KM
64is either
65an Arabic section number (3 for instance), or one of the words ``new,''
66``local,'' ``old,'' or ``public.''
bfe02f44 67A section number may be followed by
b896fc7a
KM
68a single letter classifier (for instance, 1g,
69indicating a graphics program in section 1). If
7400223d
KM
70.I section
71is omitted,
72.I man
73searches all sections of the manual, giving preference to commands
74over subroutines in system libraries, and printing the first section
75it finds, if any.
76.PP
77If the standard output is a teletype, or if the flag
78.B \-
f81fb8aa 79is given,
7400223d
KM
80.I man
81pipes its output through
b896fc7a 82.IR more (1)
7400223d
KM
83with the option
84.B \-s
b896fc7a
KM
85to crush out useless blank lines
86and to stop after each page on the screen.
7400223d
KM
87Hit a space to continue,
88a control-D to scroll 11 more lines when the output stops.
89.PP
b896fc7a
KM
90Normally
91.I man
92checks in a standard location for manual
93information (/usr/man). This can be changed by supplying a search
94path (a la the shell) with the
95.B \-M
96flag. The search path is a colon (`:') separated list
97of directories in which manual subdirectories may be found;
1effa09f
JL
98e.g. ``/usr/local:/usr/man''.
99.hw MANPATH
100If the environment variable `MANPATH' is set,
101its value is used for the default path.
102If a search path is supplied
b896fc7a
KM
103with the
104.B \-k
105or
106.B \-f
107options, it must be specified first.
09683da9
KM
108.PP
109.I Man
110will look for the manual page in either of two forms, the nroff source or
111preformatted pages.
112If either version is available, the manual page will be displayed.
113If the preformatted version is available, and it has a more recent modify
114time than the nroff source, it will be promptly displayed.
115Otherwise, the manual page will be formatted with nroff and displayed.
116If the user has permission, the formatted manual page will be deposited
117in the proper place, so that later invocations of man will not need to
118format the page again.
7400223d 119.SH FILES
b896fc7a
KM
120.nf
121.ta \w'/usr/man/man?/* 'u
122/usr/man standard manual area
123/usr/man/man?/* directories containing source for manuals
124/usr/man/cat?/* directories containing preformatted pages
125/usr/man/whatis keyword database
126.fi
7400223d 127.SH SEE\ ALSO
b896fc7a 128apropos(1), more(1), whereis(1), catman(8)
7400223d
KM
129.SH BUGS
130The manual is supposed to be reproducible either on the phototypesetter
131or on a typewriter.
132However, on a typewriter some information is necessarily lost.