1 .\" $Id: apropos.1,v 1.29 2014/04/24 00:28:19 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: April 24 2014 $
24 .Nd search manual page databases
39 utilities query manual page databases generated by
43 for each file in each database.
44 By default, it displays the names, section numbers, and description lines
45 of all matching manuals.
51 databases in the default paths stipulated by
53 and uses case-insensitive substring matching
54 .Pq the Cm = No operator
55 over manual names and descriptions
56 .Pq the Li \&Nm No and Li \&Nd No macro keys .
57 Multiple terms imply pairwise
60 maps terms only to case-sensitive manual names.
62 Its arguments are as follows:
65 Specify an alternative configuration
71 Use the colon-separated path instead of the default list of paths
75 Invalid paths, or paths without manual databases, are ignored.
77 Prepend the colon-separated paths to the list of paths searched
81 Invalid paths, or paths without manual databases, are ignored.
83 Show the values associated with the key
85 instead of the manual descriptions.
87 Restrict the search to pages for the specified
92 By default, pages for all architectures are shown.
94 Restrict the search to the specified section of the manual.
95 By default, pages from all sections are shown.
98 for a listing of sections.
103 consists of search terms joined by logical operators
111 operator has precedence over
113 and both are evaluated left-to-right.
115 .It \&( Ar expr No \&)
116 True if the subexpression
119 .It Ar expr1 Fl a Ar expr2
126 .It Ar expr1 Oo Fl o Oc Ar expr2
131 evaluate to true (logical
140 .Op Ar key Op , Ar key ...
154 for a list of available keys.
157 evaluates a substring, while
159 evaluates a regular expression.
163 is a regular expression, it
164 is evaluated case-insensitively.
165 Has no effect on substring terms.
171 to consist of an opaque keyword.
173 Results are sorted by manual sections and names, with output formatted as
175 .D1 name[, name...](sec) \- description
179 is the manual's name,
181 is the manual section, and
183 is the manual's short description.
184 If an architecture is specified for the manual, it is displayed as
186 .D1 name(sec/arch) \- description
188 Resulting manuals may be accessed as
190 .Dl $ man \-s sec name
192 If an architecture is specified in the output, use
194 .Dl $ man \-s sec \-S arch name
196 Queries evaluate over a subset of
200 In addition to the macro keys listed below, the special key
202 may be used to match any available macro key.
204 Names and description:
205 .Bl -column "xLix" description -offset indent -compact
206 .It Li \&Nm Ta manual name
207 .It Li \&Nd Ta one-line manual description
208 .It Li arch Ta machine architecture (case-insensitive)
209 .It Li sec Ta manual section number
212 Sections and cross references:
213 .Bl -column "xLix" description -offset indent -compact
214 .It Li \&Sh Ta section header (excluding standard sections)
215 .It Li \&Ss Ta subsection header
216 .It Li \&Xr Ta cross reference to another manual page
217 .It Li \&Rs Ta bibliographic reference
220 Semantic markup for command line utilities:
221 .Bl -column "xLix" description -offset indent -compact
222 .It Li \&Fl Ta command line options (flags)
223 .It Li \&Cm Ta command modifier
224 .It Li \&Ar Ta command argument
225 .It Li \&Ic Ta internal or interactive command
226 .It Li \&Ev Ta environmental variable
227 .It Li \&Pa Ta file system path
230 Semantic markup for function libraries:
231 .Bl -column "xLix" description -offset indent -compact
232 .It Li \&Lb Ta function library name
233 .It Li \&In Ta include file
234 .It Li \&Ft Ta function return type
235 .It Li \&Fn Ta function name
236 .It Li \&Fa Ta function argument type and name
237 .It Li \&Vt Ta variable type
238 .It Li \&Va Ta variable name
239 .It Li \&Dv Ta defined variable or preprocessor constant
240 .It Li \&Er Ta error constant
241 .It Li \&Ev Ta environmental variable
244 Various semantic markup:
245 .Bl -column "xLix" description -offset indent -compact
246 .It Li \&An Ta author name
247 .It Li \&Lk Ta hyperlink
248 .It Li \&Mt Ta Do mailto Dc hyperlink
249 .It Li \&Cd Ta kernel configuration declaration
250 .It Li \&Ms Ta mathematical symbol
251 .It Li \&Tn Ta tradename
255 .Bl -column "xLix" description -offset indent -compact
256 .It Li \&Em Ta italic font or underline
257 .It Li \&Sy Ta boldface font
258 .It Li \&Li Ta typewriter font
262 .Bl -column "xLix" description -offset indent -compact
263 .It Li \&St Ta reference to a standards document
264 .It Li \&At Ta At No version reference
265 .It Li \&Bx Ta Bx No version reference
266 .It Li \&Bsx Ta Bsx No version reference
267 .It Li \&Nx Ta Nx No version reference
268 .It Li \&Fx Ta Fx No version reference
269 .It Li \&Ox Ta Ox No version reference
270 .It Li \&Dx Ta Dx No version reference
273 .Bl -tag -width MANPATH
275 The standard search path used by
277 may be changed by specifying a path in the
279 environment variable.
280 Invalid paths, or paths without manual databases, are ignored.
285 begins with a colon, it is appended to the default list;
286 if it ends with a colon, it is prepended to the default list;
287 or if it contains two adjacent colons,
288 the standard search path is inserted between the colons.
289 If none of these conditions are met, it overrides the
290 standard search path.
293 .Bl -tag -width "/etc/man.conf" -compact
308 as a substring of manual names and descriptions:
318 .Dl $ apropos .cf .cnf .conf
320 Search in names and descriptions using a regular expression:
322 .Dl $ apropos '~set.?[ug]id'
324 Search for manuals in the library section mentioning both the
330 .Dl $ apropos \-s 3 Va=optind \-a Va=optarg
332 Do exactly the same as calling
337 .Dl $ apropos \-\- \-i 'Nm~[[:<:]]ssh[[:>:]]'
339 The following two invocations are equivalent:
341 .D1 Li $ apropos -S Ar arch Li -s Ar section expression
342 .Bd -ragged -offset indent
343 .Li $ apropos \e( Ar expression Li \e)
344 .Li -a arch~^( Ns Ar arch Ns Li |any)$
345 .Li -a sec~^ Ns Ar section Ns Li $
354 utility first appeared in
356 It was rewritten from scratch for
363 variable first appeared in
384 The current version was written by
385 .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv
387 .An Ingo Schwarze Aq Mt schwarze@openbsd.org .