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