.TH "APROPOS" "1" "January 31, 2017" "Debian" "General Commands Manual" .nh .if n .ad l .SH "NAME" \fBapropos\fR, \fBwhatis\fR \- search manual page databases .SH "SYNOPSIS" .HP 8n \fBapropos\fR [\fB\-acfhklw\fR] [\fB\-C\fR\ \fIfile\fR] [\fB\-M\fR\ \fIpath\fR] [\fB\-m\fR\ \fIpath\fR] [\fB\-O\fR\ \fIoutkey\fR] [\fB\-S\fR\ \fIarch\fR] [\fB\-s\fR\ \fIsection\fR] \fIexpression\ ...\fR .SH "DESCRIPTION" The \fBapropos\fR and \fBwhatis\fR utilities query manual page databases generated by makewhatis(8), evaluating \fIexpression\fR for each file in each database. By default, they display the names, section numbers, and description lines of all matching manuals. .PP By default, \fBapropos\fR searches for makewhatis(8) databases in the default paths stipulated by man(1) and uses case-insensitive substring matching (the \fB=\fR operator) over manual names and descriptions (the \fR\&Nm\fR and \fR\&Nd\fR macro keys). Multiple terms imply pairwise \fB\-o\fR. .PP \fBwhatis\fR is a synonym for \fBapropos\fR \fB\-f\fR. .PP The options are as follows: .TP 8n \fB\-a\fR Instead of showing only the title lines, show the complete manual pages, just like man(1) \fB\-a\fR would. If the standard output is a terminal device and \fB\-c\fR is not specified, use more(1) to paginate them. In \fB\-a\fR mode, the options \fB\-IKOTW\fR described in the mandoc(1) manual are also available. .TP 8n \fB\-C\fR \fIfile\fR Specify an alternative configuration \fIfile\fR in man.conf(5) format. .TP 8n \fB\-c\fR In \fB\-a\fR mode, copy the formatted manual pages to the standard output without using more(1) to paginate them. .TP 8n \fB\-f\fR Search for all words in \fIexpression\fR 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. This overrides any earlier \fB\-k\fR and \fB\-l\fR options. .TP 8n \fB\-h\fR Instead of showing the title lines, show the SYNOPSIS sections, just like man(1) \fB\-h\fR would. .TP 8n \fB\-k\fR Support the full \fIexpression\fR syntax. This overrides any earlier \fB\-f\fR and \fB\-l\fR options. It is the default for \fBapropos\fR. .TP 8n \fB\-l\fR An alias for mandoc(1) \fB\-a\fR. This overrides any earlier \fB\-f\fR, \fB\-k\fR, and \fB\-w\fR options. .TP 8n \fB\-M\fR \fIpath\fR 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. .TP 8n \fB\-m\fR \fIpath\fR Prepend the colon-separated paths to the list of paths searched for makewhatis(8) databases. Invalid paths, or paths without manual databases, are ignored. .TP 8n \fB\-O\fR \fIoutkey\fR Show the values associated with the key \fIoutkey\fR instead of the manual descriptions. .TP 8n \fB\-S\fR \fIarch\fR Restrict the search to pages for the specified machine(1) architecture. \fIarch\fR is case insensitive. By default, pages for all architectures are shown. .TP 8n \fB\-s\fR \fIsection\fR 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. .TP 8n \fB\-w\fR Instead of showing title lines, show the pathnames of the matching manual pages, just like man(1) \fB\-w\fR would. .PP An \fIexpression\fR consists of search terms joined by logical operators \fB\-a\fR (and) and \fB\-o\fR (or). The \fB\-a\fR operator has precedence over \fB\-o\fR and both are evaluated left-to-right. .TP 8n \&( \fIexpr\fR \&) True if the subexpression \fIexpr\fR is true. .TP 8n \fIexpr1\fR \fB\-a\fR \fIexpr2\fR True if both \fIexpr1\fR and \fIexpr2\fR are true (logical \(oqand\(cq). .TP 8n \fIexpr1\fR [\fB\-o\fR] \fIexpr2\fR True if \fIexpr1\fR and/or \fIexpr2\fR evaluate to true (logical \(oqor\(cq). .TP 8n \fIterm\fR True if \fIterm\fR is satisfied. This has syntax [[\fIkey\fR[,\fIkey...\fR]](\fB=\fR|\fB\(ti\fR)]\fIval\fR, where \fIkey\fR is an mdoc(7) macro to query and \fIval\fR is its value. See \fIMacro Keys\fR for a list of available keys. Operator \fB=\fR evaluates a substring, while \fB\(ti\fR evaluates a regular expression. .TP 8n \fB\-i\fR \fIterm\fR If \fIterm\fR is a regular expression, it is evaluated case-insensitively. Has no effect on substring terms. .PP Results are sorted by manual sections and names, with output formatted as .PP .RS 6n name[, name...](sec) \- description .RE .PP Where \(Lqname\(Rq is the manual's name, \(Lqsec\(Rq is the manual section, and \(Lqdescription\(Rq is the manual's short description. If an architecture is specified for the manual, it is displayed as .PP .RS 6n name(sec/arch) \- description .RE .PP Resulting manuals may be accessed as .PP .RS 6n $ man \-s sec name .RE .PP If an architecture is specified in the output, use .PP .RS 6n $ man \-s sec \-S arch name .RE .SS "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 \fBany\fR may be used to match any available macro key. .PP Names and description: .RS 6n .TS l l. .PD 0 .PP \fR\&Nm\fR manual name .PP \fR\&Nd\fR one-line manual description .PP \fRarch\fR machine architecture (case-insensitive) .PP \fRsec\fR manual section number .TE .RE .PD .PP Sections and cross references: .RS 6n .TS l l. .PD 0 .PP \fR\&Sh\fR section header (excluding standard sections) .PP \fR\&Ss\fR subsection header .PP \fR\&Xr\fR cross reference to another manual page .PP \fR\&Rs\fR bibliographic reference .TE .RE .PD .PP Semantic markup for command line utilities: .RS 6n .TS l l. .PD 0 .PP \fR\&Fl\fR command line options (flags) .PP \fR\&Cm\fR command modifier .PP \fR\&Ar\fR command argument .PP \fR\&Ic\fR internal or interactive command .PP \fR\&Ev\fR environmental variable .PP \fR\&Pa\fR file system path .TE .RE .PD .PP Semantic markup for function libraries: .RS 6n .TS l l. .PD 0 .PP \fR\&Lb\fR function library name .PP \fR\&In\fR include file .PP \fR\&Ft\fR function return type .PP \fR\&Fn\fR function name .PP \fR\&Fa\fR function argument type and name .PP \fR\&Vt\fR variable type .PP \fR\&Va\fR variable name .PP \fR\&Dv\fR defined variable or preprocessor constant .PP \fR\&Er\fR error constant .PP \fR\&Ev\fR environmental variable .TE .RE .PD .PP Various semantic markup: .RS 6n .TS l l. .PD 0 .PP \fR\&An\fR author name .PP \fR\&Lk\fR hyperlink .PP \fR\&Mt\fR \(Lqmailto\(Rq hyperlink .PP \fR\&Cd\fR kernel configuration declaration .PP \fR\&Ms\fR mathematical symbol .PP \fR\&Tn\fR tradename .TE .RE .PD .PP Physical markup: .RS 6n .TS l l. .PD 0 .PP \fR\&Em\fR italic font or underline .PP \fR\&Sy\fR boldface font .PP \fR\&Li\fR typewriter font .TE .RE .PD .PP Text production: .RS 6n .TS l l. .PD 0 .PP \fR\&St\fR reference to a standards document .PP \fR\&At\fR AT&T UNIX version reference .PP \fR\&Bx\fR BSD version reference .PP \fR\&Bsx\fR BSD/OS version reference .PP \fR\&Nx\fR NetBSD version reference .PP \fR\&Fx\fR FreeBSD version reference .PP \fR\&Ox\fR OpenBSD version reference .PP \fR\&Dx\fR DragonFly version reference .TE .RE .PD .SH "ENVIRONMENT" .TP 10n \fRMANPAGER\fR Any non-empty value of the environment variable \fRMANPAGER\fR will be used instead of the standard pagination program, more(1). .TP 10n \fRMANPATH\fR The standard search path used by man(1) may be changed by specifying a path in the \fRMANPATH\fR environment variable. Invalid paths, or paths without manual databases, are ignored. Overridden by \fB\-M\fR. If \fRMANPATH\fR begins with a colon, it is appended to the default list; if it ends with a colon, it is prepended to the default list; or if it contains two adjacent colons, the standard search path is inserted between the colons. If none of these conditions are met, it overrides the standard search path. .TP 10n \fRPAGER\fR Specifies the pagination program to use when \fRMANPAGER\fR is not defined. If neither PAGER nor MANPAGER is defined, more(1) \fB\-s\fR will be used. .SH "FILES" .TP 15n \fImandoc.db\fR name of the makewhatis(8) keyword database .PD 0 .TP 15n \fI/etc/man.conf\fR default man(1) configuration file .PD .SH "EXIT STATUS" .br The \fBapropos\fR utility exits\~0 on success, and\~>0 if an error occurs. .SH "EXAMPLES" Search for ".cf" as a substring of manual names and descriptions: .PP .RS 6n $ apropos .cf .RE .PP Include matches for ".cnf" and ".conf" as well: .PP .RS 6n $ apropos .cf .cnf .conf .RE .PP Search in names and descriptions using a regular expression: .PP .RS 6n $ apropos \(aq\(tiset.?[ug]id\(aq .RE .PP Search for manuals in the library section mentioning both the "optind" and the "optarg" variables: .PP .RS 6n $ apropos \-s 3 Va=optind \-a Va=optarg .RE .PP Do exactly the same as calling whatis(1) with the argument "ssh": .PP .RS 6n $ apropos \-\- \-i \(aqNm\(ti[[:<:]]ssh[[:>:]]\(aq .RE .PP The following two invocations are equivalent: .PP .RS 6n \fR$ apropos -S\fR \fIarch\fR \fR-s\fR \fIsection expression\fR .RE .sp .RS 6n \fR$ apropos \e(\fR \fIexpression\fR \fR\e)\fR \fR-a arch\(ti^(\fR\fIarch\fR\fR|any)$\fR \fR-a sec\(ti^\fR\fIsection\fR\fR$\fR .RE .SH "SEE ALSO" man(1), re_format(7), makewhatis(8) .SH "HISTORY" Part of the functionality of \fBwhatis\fR was already provided by the former \fBmanwhere\fR utility in 1BSD. The \fBapropos\fR and \fBwhatis\fR utilities first appeared in 2BSD. They were rewritten from scratch for OpenBSD 5.6. .PP The \fB\-M\fR option and the \fRMANPATH\fR variable first appeared in 4.3BSD; \fB\-m\fR in 4.3BSD-Reno; \fB\-C\fR in 4.4BSD-Lite1; and \fB\-S\fR and \fB\-s\fR in OpenBSD 4.5 for \fBapropos\fR and in OpenBSD 5.6 for \fBwhatis\fR. The options \fB\-acfhIKklOTWw\fR appeared in OpenBSD 5.7. .SH "AUTHORS" Bill Joy wrote \fBmanwhere\fR in 1977 and the original BSD \fBapropos\fR and \fBwhatis\fR in February 1979. The current version was written by Kristaps Dzonsons <\fIkristaps@bsd.lv\fR> and Ingo Schwarze <\fIschwarze@openbsd.org\fR>.