1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
|
.\" Man page for whatis
.\"
.\" Copyright (C), 1994, 1995, Graeme W. Wilford. (Wilf.)
.\"
.\" You may distribute under the terms of the GNU General Public
.\" License as specified in the file COPYING that comes with the
.\" man-db distribution.
.\"
.\" Sat Oct 29 13:09:31 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
.\"
.pc
.TH %thwhatis% 1 "%date%" "%version%" "Manual pager utils"
.SH NAME
%whatis% \- display one-line manual page descriptions
.SH SYNOPSIS
.B %whatis%
.RB [\| \-dlv?V \|]
.RB [\| \-r \||\| \-w\c
\|]
.RB [\| \-s
.IR list \|]
.RB [\| \-m
.IR system \|[\|,.\|.\|.\|]\|]
.RB [\| \-M
.IR path \|]
.RB [\| \-L
.IR locale \|]
.RB [\| \-C
.IR file \|]
.I name
\&.\|.\|.
.SH DESCRIPTION
Each manual page has a short description available within it.
.B %whatis%
searches the manual page names and displays the manual page descriptions
of any
.I name
matched.
.I name
may contain wildcards
.RB ( \-w )
or be a regular expression
.RB ( \-r ).
Using these options, it may be necessary to quote the
.I name
or escape (\\) the special characters to stop the shell from interpreting
them.
.B index
databases are used during the search, and are updated by the
.B %mandb%
program.
Depending on your installation, this may be run by a periodic cron job, or
may need to be run manually after new manual pages have been installed.
To produce an old style text
.B whatis
database from the relative
.B index
database, issue the command:
.B %whatis% \-M
.I manpath
.B \-w '*' | sort >
.I manpath/whatis
where
.I manpath
is a manual page hierarchy such as
.IR /usr/man .
.SH OPTIONS
.TP
.if !'po4a'hide' .BR \-d ", " \-\-debug
Print debugging information.
.TP
.if !'po4a'hide' .BR \-v ", " \-\-verbose
Print verbose warning messages.
.TP
.if !'po4a'hide' .BR \-r ", " \-\-regex
Interpret each
.I name
as a regular expression.
If a
.I name
matches any part of a page name, a match will be made.
This option causes
.B %whatis%
to be somewhat slower due to the nature of database searches.
.TP
.if !'po4a'hide' .BR \-w ", " \-\-wildcard
Interpret each
.I name
as a pattern containing shell style wildcards.
For a match to be made, an expanded
.I name
must match the entire page name.
This option causes
.B %whatis%
to be somewhat slower due to the nature of database searches.
.TP
.if !'po4a'hide' .BR \-l ", " \-\-long
Do not trim output to the terminal width.
Normally, output will be truncated to the terminal width to avoid ugly
results from poorly-written
.B NAME
sections.
.TP
\fB\-s\fP \fIlist\fP, \fB\-\-sections\fP \fIlist\fP, \fB\-\-section\fP \fIlist\fP
Search only the given manual sections.
.I list
is a colon- or comma-separated list of sections.
If an entry in
.I list
is a simple section, for example "3", then the displayed list of
descriptions will include pages in sections "3", "3perl", "3x", and so on;
while if an entry in
.I list
has an extension, for example "3perl", then the list will only include
pages in that exact part of the manual section.
.\"
.\" Due to the rather silly limit of 6 args per request in some `native'
.\" *roff compilers, we have do the following to get the two-line
.\" hanging tag on one line. .PP to begin a new paragraph, then the
.\" tag, then .RS (start relative indent), the text, finally .RE
.\" (end relative indent).
.\"
.PP
.B \-m
.I system\c
\|[\|,.\|.\|.\|]\|,
.BI \-\-systems= system\c
\|[\|,.\|.\|.\|]
.RS
If this system has access to other operating system's manual page names,
they can be accessed using this option.
To search NewOS's manual page names,
use the option
.B \-m
.BR NewOS .
The
.I system
specified can be a combination of comma delimited operating system names.
To include a search of the native operating system's
manual page names, include the system name
.B man
in the argument string.
This option will override the
.RB $ SYSTEM
environment variable.
.RE
.TP
.BI \-M\ path \fR,\ \fB\-\-manpath= path
Specify an alternate set of colon-delimited manual page hierarchies to
search.
By default,
.B %program%
uses the
.RB $ MANPATH
environment variable, unless it is empty or unset, in which case it will
determine an appropriate manpath based on your
.RB $ PATH
environment variable.
This option overrides the contents of
.RB $ MANPATH .
.TP
.BI \-L\ locale \fR,\ \fB\-\-locale= locale
.B %program%
will normally determine your current locale by a call to the C function
.BR setlocale (3)
which interrogates various environment variables, possibly including
.RB $ LC_MESSAGES
and
.RB $ LANG .
To temporarily override the determined value, use this option to supply a
.I locale
string directly to
.BR %program% .
Note that it will not take effect until the search for pages actually
begins.
Output such as the help message will always be displayed in the initially
determined locale.
.TP
.BI \-C\ file \fR,\ \fB\-\-config\-file= file
Use this user configuration file rather than the default of
.IR ~/.manpath .
.TP
.if !'po4a'hide' .BR \-? ", " \-\-help
Print a help message and exit.
.TP
.if !'po4a'hide' .BR \-\-usage
Print a short usage message and exit.
.TP
.if !'po4a'hide' .BR \-V ", " \-\-version
Display version information.
.SH "EXIT STATUS"
.TP
.if !'po4a'hide' .B 0
Successful program execution.
.TP
.if !'po4a'hide' .B 1
Usage, syntax or configuration file error.
.TP
.if !'po4a'hide' .B 2
Operational error.
.TP
.if !'po4a'hide' .B 16
Nothing was found that matched the criteria specified.
.SH ENVIRONMENT
.TP
.if !'po4a'hide' .B SYSTEM
If
.RB $ SYSTEM
is set, it will have the same effect as if it had been specified as the
argument to the
.B \-m
option.
.TP
.if !'po4a'hide' .B MANPATH
If
.RB $ MANPATH
is set, its value is interpreted as the colon-delimited manual page
hierarchy search path to use.
.TP
.if !'po4a'hide' .B MANWIDTH
If
.RB $ MANWIDTH
is set, its value is used as the terminal width (see the
.B \-\-long
option).
If it is not set, the terminal width will be calculated using the value of
.RB $ COLUMNS ,
an
.BR ioctl (2)
if available, or falling back to 80 characters if all else fails.
.SH FILES
.TP
.if !'po4a'hide' .I /usr/share/man/index.(bt|db|dir|pag)
A traditional global
.I index
database cache.
.TP
.if !'po4a'hide' .I /var/cache/man/index.(bt|db|dir|pag)
An FHS
compliant global
.I index
database cache.
.TP
.if !'po4a'hide' .I /usr/share/man/\|.\|.\|.\|/whatis
A traditional
.B whatis
text database.
.SH "SEE ALSO"
.if !'po4a'hide' .BR %apropos% (1),
.if !'po4a'hide' .BR %man% (1),
.if !'po4a'hide' .BR %mandb% (8)
.SH AUTHOR
.nf
.if !'po4a'hide' Wilf. (G.Wilford@ee.surrey.ac.uk).
.if !'po4a'hide' Fabrizio Polacco (fpolacco@debian.org).
.if !'po4a'hide' Colin Watson (cjwatson@debian.org).
.fi
|