Sortix cross-volatile manual
This manual documents Sortix cross-volatile. You can instead view this document in the latest official manual.
NAME
apropos, whatis — search manual page databasesSYNOPSIS
apropos | [-afk] [-C file] [-M path] [-m path] [-O outkey] [-S arch] [-s section] expression ... |
DESCRIPTION
The apropos and whatis utilities query manual page databases generated by makewhatis(8), evaluating expression for each file in each database. By default, they display the names, section numbers, and description lines of all matching manuals.Nm
and
Nd
macro keys
). Multiple terms imply pairwise -o.- -a
- Instead of showing only the title lines, show the complete manual pages, just like man(1) -a would. If the standard output is a terminal device and -c is not specified, use less(1) to paginate them. In -a mode, the options -IKOTW described in the mandoc(1) manual are also available.
- -C file
- Specify an alternative configuration file in man.conf(5) format.
- -f
- Search for all words in expression in manual page names only. The search is case-insensitive and matches whole words only. In this mode, macro keys, comparison operators, and logical operators are not available.
- -k
- Support the full expression syntax. It is the default for apropos.
- -M path
- Use the colon-separated path instead of the default list of paths searched for makewhatis(8) databases. Invalid paths, or paths without manual databases, are ignored.
- -m path
- Prepend the colon-separated paths to the list of paths searched for makewhatis(8) databases. Invalid paths, or paths without manual databases, are ignored.
- -O outkey
- Show the values associated with the key outkey instead of the manual descriptions.
- -S arch
- Restrict the search to pages for the specified machine(1) architecture. arch is case-insensitive. By default, pages for all architectures are shown.
- -s section
- Restrict the search to the specified section of the manual. By default, pages from all sections are shown. See man(1) for a listing of sections.
-
( expr
)
- True if the subexpression expr is true.
- expr1 -a expr2
- True if both expr1 and expr2 are true (logical ‘and’).
- expr1 [-o] expr2
- True if expr1 and/or expr2 evaluate to true (logical ‘or’).
- term
- True if term is satisfied. This has syntax [[key[,key...]](=|~)]val, where key is an mdoc(7) macro to query and val is its value. See Macro Keys for a list of available keys. Operator = evaluates a substring, while ~ evaluates a case-sensitive extended regular expression.
- -i term
- If term is a regular expression, it is evaluated case-insensitively. Has no effect on substring terms.
name[, name...](sec) - description
name(sec/arch) - description
$ man -s sec name
$ man -s sec -S arch name
Macro Keys
Queries evaluate over a subset of mdoc(7) macros indexed by makewhatis(8). In addition to the macro keys listed below, the special key any may be used to match any available macro key.
Nm |
manual name |
Nd |
one-line manual description |
arch |
machine architecture (case-insensitive) |
sec |
manual section number |
Sh |
section header (excluding standard sections) |
Ss |
subsection header |
Xr |
cross reference to another manual page |
Rs |
bibliographic reference |
Fl |
command line options (flags) |
Cm |
command modifier |
Ar |
command argument |
Ic |
internal or interactive command |
Ev |
environmental variable |
Pa |
file system path |
Lb |
function library name |
In |
include file |
Ft |
function return type |
Fn |
function name |
Fa |
function argument type and name |
Vt |
variable type |
Va |
variable name |
Dv |
defined variable or preprocessor constant |
Er |
error constant |
Ev |
environmental variable |
An |
author name |
Lk |
hyperlink |
Mt |
“mailto” hyperlink |
Cd |
kernel configuration declaration |
Ms |
mathematical symbol |
Tn |
tradename |
Em |
italic font or underline |
Sy |
boldface font |
Li |
typewriter font |
St |
reference to a standards document |
At |
AT&T UNIX version reference |
Bx |
BSD version reference |
Bsx |
BSD/OS version reference |
Nx |
NetBSD version reference |
Fx |
FreeBSD version reference |
Ox |
OpenBSD version reference |
Dx |
DragonFly version reference |
-
Fa
- function arguments appearing on Fn lines
-
Fn
- function names marked up with Fo macros
-
In
- include file names marked up with Fd macros
-
Vt
- types appearing as function return types and
- types appearing in function arguments in the SYNOPSIS
ENVIRONMENT
- MANPAGER
- Any non-empty value of the environment variable MANPAGER is used instead of the standard pagination program, less(1); see man(1) for details. Only used if -a or -l is specified.
- MANPATH
- A colon-separated list of directories to search for manual pages; see man(1) for details. Overridden by -M, ignored if -l is specified.
- PAGER
- Specifies the pagination program to use when MANPAGER is not defined. If neither PAGER nor MANPAGER is defined, less(1) is used. Only used if -a or -l is specified.
FILES
- mandoc.db
- name of the makewhatis(8) keyword database
- /etc/man.conf
- default man(1) configuration file
EXIT STATUS
The apropos utility exits 0 on success, and >0 if an error occurs.EXAMPLES
Search for “.cf” as a substring of manual names and descriptions:$ apropos =.cf
$ apropos =.cf =.cnf =.conf
$ apropos '~set.?[ug]id'
$ apropos -s 9 .
$ apropos -s 3 Va=optind -a Va=optarg
$ apropos -- -i 'Nm~[[:<:]]ssh[[:>:]]'
$ apropos -S
arch-s
section expression
$ apropos \(
expression \)
-a arch~^(
arch|any)$
-a sec~^
section$