1 .\" $Id: apropos.1,v 1.33 2014/08/22 04:52:55 schwarze Exp $
3 .\" Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
4 .\" Copyright (c) 2011, 2012, 2014 Ingo Schwarze <schwarze@openbsd.org>
6 .\" Permission to use, copy, modify, and distribute this software for any
7 .\" purpose with or without fee is hereby granted, provided that the above
8 .\" copyright notice and this permission notice appear in all copies.
10 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 .Dd $Mdocdate: August 22 2014 $
24 .Nd search manual page databases
40 utilities query manual page databases generated by
44 for each file in each database.
45 By default, they display the names, section numbers, and description lines
46 of all matching manuals.
52 databases in the default paths stipulated by
54 and uses case-insensitive substring matching
55 .Pq the Cm = No operator
56 over manual names and descriptions
57 .Pq the Li \&Nm No and Li \&Nd No macro keys .
58 Multiple terms imply pairwise
66 The options are as follows:
69 Instead of showing only the title lines, show the complete manual pages,
74 If the standard output is a terminal device and
85 manual are also available.
87 Specify an alternative configuration
95 mode, copy the formatted manual pages to the standard output without using
99 Search for all words in
101 in manual page names only.
102 The search is case insensitive and matches whole words only.
103 In this mode, macro keys, comparison operators, and logical operators
105 This overrides any earlier
112 This overrides any earlier
115 It is the default for
118 Use the colon-separated path instead of the default list of paths
122 Invalid paths, or paths without manual databases, are ignored.
124 Prepend the colon-separated paths to the list of paths searched
128 Invalid paths, or paths without manual databases, are ignored.
130 Show the values associated with the key
132 instead of the manual descriptions.
134 Restrict the search to pages for the specified
139 By default, pages for all architectures are shown.
141 Restrict the search to the specified section of the manual.
142 By default, pages from all sections are shown.
145 for a listing of sections.
147 Instead of showing title lines, show the pathnames of the matching
148 manual pages, just like
156 consists of search terms joined by logical operators
164 operator has precedence over
166 and both are evaluated left-to-right.
168 .It \&( Ar expr No \&)
169 True if the subexpression
172 .It Ar expr1 Fl a Ar expr2
179 .It Ar expr1 Oo Fl o Oc Ar expr2
184 evaluate to true (logical
193 .Op Ar key Op , Ar key ...
207 for a list of available keys.
210 evaluates a substring, while
212 evaluates a regular expression.
216 is a regular expression, it
217 is evaluated case-insensitively.
218 Has no effect on substring terms.
221 Results are sorted by manual sections and names, with output formatted as
223 .D1 name[, name...](sec) \- description
227 is the manual's name,
229 is the manual section, and
231 is the manual's short description.
232 If an architecture is specified for the manual, it is displayed as
234 .D1 name(sec/arch) \- description
236 Resulting manuals may be accessed as
238 .Dl $ man \-s sec name
240 If an architecture is specified in the output, use
242 .Dl $ man \-s sec \-S arch name
244 Queries evaluate over a subset of
248 In addition to the macro keys listed below, the special key
250 may be used to match any available macro key.
252 Names and description:
253 .Bl -column "xLix" description -offset indent -compact
254 .It Li \&Nm Ta manual name
255 .It Li \&Nd Ta one-line manual description
256 .It Li arch Ta machine architecture (case-insensitive)
257 .It Li sec Ta manual section number
260 Sections and cross references:
261 .Bl -column "xLix" description -offset indent -compact
262 .It Li \&Sh Ta section header (excluding standard sections)
263 .It Li \&Ss Ta subsection header
264 .It Li \&Xr Ta cross reference to another manual page
265 .It Li \&Rs Ta bibliographic reference
268 Semantic markup for command line utilities:
269 .Bl -column "xLix" description -offset indent -compact
270 .It Li \&Fl Ta command line options (flags)
271 .It Li \&Cm Ta command modifier
272 .It Li \&Ar Ta command argument
273 .It Li \&Ic Ta internal or interactive command
274 .It Li \&Ev Ta environmental variable
275 .It Li \&Pa Ta file system path
278 Semantic markup for function libraries:
279 .Bl -column "xLix" description -offset indent -compact
280 .It Li \&Lb Ta function library name
281 .It Li \&In Ta include file
282 .It Li \&Ft Ta function return type
283 .It Li \&Fn Ta function name
284 .It Li \&Fa Ta function argument type and name
285 .It Li \&Vt Ta variable type
286 .It Li \&Va Ta variable name
287 .It Li \&Dv Ta defined variable or preprocessor constant
288 .It Li \&Er Ta error constant
289 .It Li \&Ev Ta environmental variable
292 Various semantic markup:
293 .Bl -column "xLix" description -offset indent -compact
294 .It Li \&An Ta author name
295 .It Li \&Lk Ta hyperlink
296 .It Li \&Mt Ta Do mailto Dc hyperlink
297 .It Li \&Cd Ta kernel configuration declaration
298 .It Li \&Ms Ta mathematical symbol
299 .It Li \&Tn Ta tradename
303 .Bl -column "xLix" description -offset indent -compact
304 .It Li \&Em Ta italic font or underline
305 .It Li \&Sy Ta boldface font
306 .It Li \&Li Ta typewriter font
310 .Bl -column "xLix" description -offset indent -compact
311 .It Li \&St Ta reference to a standards document
312 .It Li \&At Ta At No version reference
313 .It Li \&Bx Ta Bx No version reference
314 .It Li \&Bsx Ta Bsx No version reference
315 .It Li \&Nx Ta Nx No version reference
316 .It Li \&Fx Ta Fx No version reference
317 .It Li \&Ox Ta Ox No version reference
318 .It Li \&Dx Ta Dx No version reference
321 .Bl -tag -width MANPAGER
323 Any non-empty value of the environment variable
325 will be used instead of the standard pagination program,
328 The standard search path used by
330 may be changed by specifying a path in the
332 environment variable.
333 Invalid paths, or paths without manual databases, are ignored.
338 begins with a colon, it is appended to the default list;
339 if it ends with a colon, it is prepended to the default list;
340 or if it contains two adjacent colons,
341 the standard search path is inserted between the colons.
342 If none of these conditions are met, it overrides the
343 standard search path.
345 Specifies the pagination program to use when
348 If neither PAGER nor MANPAGER is defined,
349 .Pa /usr/bin/more Fl s
353 .Bl -tag -width "/etc/man.conf" -compact
368 as a substring of manual names and descriptions:
378 .Dl $ apropos .cf .cnf .conf
380 Search in names and descriptions using a regular expression:
382 .Dl $ apropos '~set.?[ug]id'
384 Search for manuals in the library section mentioning both the
390 .Dl $ apropos \-s 3 Va=optind \-a Va=optarg
392 Do exactly the same as calling
397 .Dl $ apropos \-\- \-i 'Nm~[[:<:]]ssh[[:>:]]'
399 The following two invocations are equivalent:
401 .D1 Li $ apropos -S Ar arch Li -s Ar section expression
402 .Bd -ragged -offset indent
403 .Li $ apropos \e( Ar expression Li \e)
404 .Li -a arch~^( Ns Ar arch Ns Li |any)$
405 .Li -a sec~^ Ns Ar section Ns Li $
412 Part of the functionality of
414 was already provided by the former
422 utilities first appeared in
424 They were rewritten from scratch for
431 variable first appeared in
456 in 1977 and the original
462 The current version was written by
463 .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv
465 .An Ingo Schwarze Aq Mt schwarze@openbsd.org .