summaryrefslogtreecommitdiffstats
path: root/man/man1/apropos.man1
blob: 0d27ccae9682a7834bff738e53faa7d0bf0adcc3 (plain)
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
263
264
265
266
267
268
.\" Man page for %apropos%
.\"
.\" 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 docs/COPYING.GPLv2 that comes with the
.\" man-db distribution.
.\"
.\" Sat Oct 29 13:09:31 GMT 1994  Wilf. (G.Wilford@ee.surrey.ac.uk)
.\"
.pc
.TH %thapropos% 1 "%date%" "%version%" "Manual pager utils"
.SH NAME
%apropos% \- search the manual page names and descriptions
.SH SYNOPSIS
.B %apropos%
.RB [\| \-dalv?V  \|]
.RB [\| \-e \||\| \-w \||\| \-r\c
\|]
.RB [\| \-s
.IR list \|]
.RB [\| \-m
.IR system \|[\|,.\|.\|.\|]\|]
.RB [\| \-M
.IR path \|]
.RB [\| \-L
.IR locale \|]
.RB [\| \-C
.IR file \|]
.I keyword
\&.\|.\|.
.SH DESCRIPTION
Each manual page has a short description available within it.
.B %apropos%
searches the descriptions for instances of
.IR keyword .

.I keyword
is usually a regular expression, as if
.RB ( \-r )
was used, or
may contain wildcards
.RB ( \-w ),
or match the exact keyword
.RB ( \-e ).
Using these options, it may be necessary to quote the
.I keyword
or escape (\e) the special characters to stop the shell from interpreting
them.

The standard matching rules allow matches to be made against the page name
and word boundaries in the description.

The database searched by
.B %apropos%
is 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.
.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 keyword as a regular expression.
This is the default behaviour.
Each keyword will be matched against the page names and the descriptions
independently.
It can match any part of either.
The match is not limited to word boundaries.
.TP
.if !'po4a'hide' .BR \-w ", " \-\-wildcard
Interpret each keyword as a pattern containing shell style wildcards.
Each keyword will be matched against the page names and the descriptions
independently.
If
.B \-\-exact
is also used,
a match will only be found if an expanded keyword matches an entire
description or page name.
Otherwise the keyword is also allowed to match on word boundaries in the
description.
.TP
.if !'po4a'hide' .BR \-e ", " \-\-exact
Each keyword will be exactly matched against the page names and the
descriptions.
.TP
.if !'po4a'hide' .BR \-a ", " \-\-and
Only display items that match all the supplied keywords.
The default is to display items that match any keyword.
.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\fR \fIlist\/\fR, \
\fB\-\-sections=\fIlist\/\fR, \
\fB\-\-section=\fIlist\fR
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.
.TP
\fB\-m\fR \fIsystem\fR\|[\|,.\|.\|.\|]\|, \
\fB\-\-systems=\fIsystem\fR\|[\|,.\|.\|.\|]
If this system has access to other operating systems' manual page
descriptions, they can be searched using this option.
To search NewOS's manual page descriptions, 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
.B whatis
descriptions, include the system name
.B man
in the argument string.
This option will override the
.RB $ SYSTEM
environment variable.
.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' .B \-\-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.

See the
.B SEARCH PATH
section of
.BR manpath (5)
for the default behaviour and details of how this environment variable is
handled.
.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 ,
and
.BR ioctl (2)
if available, or falling back to 80 characters if all else fails.
.TP
.if !'po4a'hide' .B POSIXLY_CORRECT
If
.RB $ POSIXLY_CORRECT
is set, even to a null value, the default
.B %apropos%
search will be as an extended regex
.RB ( \-r ).
Nowadays, this is the default behaviour anyway.
.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 %man% (1),
.if !'po4a'hide' .BR %whatis% (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
.SH BUGS
.if !'po4a'hide' https://gitlab.com/man-db/man-db/-/issues
.br
.if !'po4a'hide' https://savannah.nongnu.org/bugs/?group=man-db