| APROPOS(1) | General Commands Manual | APROPOS(1) |
NAME
apropos, whatis
— search the manual page index
SYNOPSIS
apropos |
[-afkt] [-C
file] [-M
path] [-m
path] [-O
outkey] [-S
arch] [-s
section] expression ... |
whatis |
[-a] [-C
file] [-M
path] [-m
path] [-S
arch] [-s
section] name ... |
DESCRIPTION
The apropos utility searches the index of
each manual directory, the file oxdoc.db that
makewhatis(8) builds, and lists
the pages matching expression: their names, section
and one-line description. The whatis utility lists
the pages with a name among their names.
The options are as follows:
-a- Show the matching pages in full, through man(1), instead of listing them.
-Cfile- Read the manual directories from file instead of /etc/man.conf.
-f- Search as
whatisdoes: each argument is a whole word to find in the pages' names, ignoring case. -k- Search as
aproposdoes, the default. -Mpath- Search the indexes of the colon-separated manual directories in path instead of the default ones.
-mpath- Search the directories in path before the others.
-Ooutkey- Show the values of the key outkey for each page
instead of its description, sorted and separated by
‘
#’. -Sarch- Only list pages for the architecture arch, or for any.
-ssection- Only list pages of section.
-t- Search the full text: each word in expression is the
term
Tx=word.
Expressions
An expression is made of terms, joined by
-a (and) and -o (or). Two
terms without an operator between them are joined by
-o, and -a binds more
tightly. Parentheses, as separate arguments, group terms.
A term has the form
[key[,key
...](= |
~)]value. With
=, it is true of a page with a value of one of the
keys containing value, ignoring
case; with ~, of a page with a value matching the
extended regular expression value (see
re_format(7)), with case, unless
-i comes before the term. Without a
key, a term searches the names and the description. A
term without = or ~ searches
the names and the description with value as a regular
expression, ignoring case.
Keys
The keys are the mdoc(7) macros whose values makewhatis(8) records, and a few others:
Nm |
the page's names |
Nd |
its one-line description |
sec |
its section |
arch |
its architecture |
Sh, Ss |
its section and subsection titles, except the standard ones |
Xr |
its cross references, as name(section) |
Fl, Cm,
Ar, Ic |
flags, modifiers, arguments and commands |
Ev, Pa,
Er |
environment variables, paths and error numbers |
In, Lb |
header files and libraries |
Fn, Fa,
Ft |
function names, arguments and types |
Va, Vt,
Dv |
variables, types and constants |
An, Lk,
Mt |
authors, links and mail addresses |
Cd, Ms,
Tn |
configuration, symbols and trade names |
Em, Sy,
Li |
emphasized, bold and literal text |
St, At,
Bx, Fx,
Nx, Ox,
Dx, Bsx |
standards and systems |
Tx |
every word of the page's text, in lower case |
any |
all of the above but Tx |
Pages written in man(7) only have names, a description and full text.
ENVIRONMENT
FILES
- oxdoc.db
- the index in each manual directory
- /etc/man.conf
- the manual directories
EXIT STATUS
The apropos utility exits 0 if it found a
page, and 1 if it found none or the arguments were wrong.
EXAMPLES
Pages mentioning file systems in their names or descriptions:
$ apropos 'file ?system'Pages in section 3 using both optind and optarg:
$ apropos -s 3 Va=optind -a
Va=optargPages referring to getty(8), with those references:
$ apropos -O Xr Xr=gettyPages whose text mentions a password:
$ apropos -t passwordSEE ALSO
HISTORY
The apropos and
whatis utilities first appeared in
2BSD. This implementation was written for OxideBSD;
its expressions and keys follow
mandoc(1)'s
apropos.
BUGS
The names of a page are listed in the order its NAME section gives them, which is not always the order of other systems.
| September 27, 2026 | OxideBSD |