1 .\" $Id: apropos.1,v 1.36 2014/10/25 01:03:52 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: October 25 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
111 Instead of showing the title lines, show the SYNOPSIS sections, just like
119 This overrides any earlier
124 It is the default for
130 This overrides any earlier
137 Use the colon-separated path instead of the default list of paths
141 Invalid paths, or paths without manual databases, are ignored.
143 Prepend the colon-separated paths to the list of paths searched
147 Invalid paths, or paths without manual databases, are ignored.
149 Show the values associated with the key
151 instead of the manual descriptions.
153 Restrict the search to pages for the specified
158 By default, pages for all architectures are shown.
160 Restrict the search to the specified section of the manual.
161 By default, pages from all sections are shown.
164 for a listing of sections.
166 Print version and exit.
168 Instead of showing title lines, show the pathnames of the matching
169 manual pages, just like
177 consists of search terms joined by logical operators
185 operator has precedence over
187 and both are evaluated left-to-right.
189 .It \&( Ar expr No \&)
190 True if the subexpression
193 .It Ar expr1 Fl a Ar expr2
200 .It Ar expr1 Oo Fl o Oc Ar expr2
205 evaluate to true (logical
214 .Op Ar key Op , Ar key ...
228 for a list of available keys.
231 evaluates a substring, while
233 evaluates a regular expression.
237 is a regular expression, it
238 is evaluated case-insensitively.
239 Has no effect on substring terms.
242 Results are sorted by manual sections and names, with output formatted as
244 .D1 name[, name...](sec) \- description
248 is the manual's name,
250 is the manual section, and
252 is the manual's short description.
253 If an architecture is specified for the manual, it is displayed as
255 .D1 name(sec/arch) \- description
257 Resulting manuals may be accessed as
259 .Dl $ man \-s sec name
261 If an architecture is specified in the output, use
263 .Dl $ man \-s sec \-S arch name
265 Queries evaluate over a subset of
269 In addition to the macro keys listed below, the special key
271 may be used to match any available macro key.
273 Names and description:
274 .Bl -column "xLix" description -offset indent -compact
275 .It Li \&Nm Ta manual name
276 .It Li \&Nd Ta one-line manual description
277 .It Li arch Ta machine architecture (case-insensitive)
278 .It Li sec Ta manual section number
281 Sections and cross references:
282 .Bl -column "xLix" description -offset indent -compact
283 .It Li \&Sh Ta section header (excluding standard sections)
284 .It Li \&Ss Ta subsection header
285 .It Li \&Xr Ta cross reference to another manual page
286 .It Li \&Rs Ta bibliographic reference
289 Semantic markup for command line utilities:
290 .Bl -column "xLix" description -offset indent -compact
291 .It Li \&Fl Ta command line options (flags)
292 .It Li \&Cm Ta command modifier
293 .It Li \&Ar Ta command argument
294 .It Li \&Ic Ta internal or interactive command
295 .It Li \&Ev Ta environmental variable
296 .It Li \&Pa Ta file system path
299 Semantic markup for function libraries:
300 .Bl -column "xLix" description -offset indent -compact
301 .It Li \&Lb Ta function library name
302 .It Li \&In Ta include file
303 .It Li \&Ft Ta function return type
304 .It Li \&Fn Ta function name
305 .It Li \&Fa Ta function argument type and name
306 .It Li \&Vt Ta variable type
307 .It Li \&Va Ta variable name
308 .It Li \&Dv Ta defined variable or preprocessor constant
309 .It Li \&Er Ta error constant
310 .It Li \&Ev Ta environmental variable
313 Various semantic markup:
314 .Bl -column "xLix" description -offset indent -compact
315 .It Li \&An Ta author name
316 .It Li \&Lk Ta hyperlink
317 .It Li \&Mt Ta Do mailto Dc hyperlink
318 .It Li \&Cd Ta kernel configuration declaration
319 .It Li \&Ms Ta mathematical symbol
320 .It Li \&Tn Ta tradename
324 .Bl -column "xLix" description -offset indent -compact
325 .It Li \&Em Ta italic font or underline
326 .It Li \&Sy Ta boldface font
327 .It Li \&Li Ta typewriter font
331 .Bl -column "xLix" description -offset indent -compact
332 .It Li \&St Ta reference to a standards document
333 .It Li \&At Ta At No version reference
334 .It Li \&Bx Ta Bx No version reference
335 .It Li \&Bsx Ta Bsx No version reference
336 .It Li \&Nx Ta Nx No version reference
337 .It Li \&Fx Ta Fx No version reference
338 .It Li \&Ox Ta Ox No version reference
339 .It Li \&Dx Ta Dx No version reference
342 .Bl -tag -width MANPAGER
344 Any non-empty value of the environment variable
346 will be used instead of the standard pagination program,
349 The standard search path used by
351 may be changed by specifying a path in the
353 environment variable.
354 Invalid paths, or paths without manual databases, are ignored.
359 begins with a colon, it is appended to the default list;
360 if it ends with a colon, it is prepended to the default list;
361 or if it contains two adjacent colons,
362 the standard search path is inserted between the colons.
363 If none of these conditions are met, it overrides the
364 standard search path.
366 Specifies the pagination program to use when
369 If neither PAGER nor MANPAGER is defined,
370 .Pa /usr/bin/more Fl s
374 .Bl -tag -width "/etc/man.conf" -compact
389 as a substring of manual names and descriptions:
399 .Dl $ apropos .cf .cnf .conf
401 Search in names and descriptions using a regular expression:
403 .Dl $ apropos '~set.?[ug]id'
405 Search for manuals in the library section mentioning both the
411 .Dl $ apropos \-s 3 Va=optind \-a Va=optarg
413 Do exactly the same as calling
418 .Dl $ apropos \-\- \-i 'Nm~[[:<:]]ssh[[:>:]]'
420 The following two invocations are equivalent:
422 .D1 Li $ apropos -S Ar arch Li -s Ar section expression
423 .Bd -ragged -offset indent
424 .Li $ apropos \e( Ar expression Li \e)
425 .Li -a arch~^( Ns Ar arch Ns Li |any)$
426 .Li -a sec~^ Ns Ar section Ns Li $
433 Part of the functionality of
435 was already provided by the former
443 utilities first appeared in
445 They were rewritten from scratch for
452 variable first appeared in
477 in 1977 and the original
483 The current version was written by
484 .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv
486 .An Ingo Schwarze Aq Mt schwarze@openbsd.org .