.\" Automatically generated from an mdoc input file. Do not edit. .\" $Id: apropos.1,v 1.49 2018/11/22 12:33:52 schwarze Exp $ .\" .\" Copyright (c) 2011, 2012 Kristaps Dzonsons .\" Copyright (c) 2011,2012,2014,2017,2018 Ingo Schwarze .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .TH "APROPOS" "1" "November 22, 2018" "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\-afk\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 extended regular expression matching 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\-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. .TP 8n \fB\-k\fR Support the full \fIexpression\fR syntax. It is the default for \fBapropos\fR. .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. .PP The options \fB\-chlw\fR are also supported and are documented in man(1). The options \fB\-fkl\fR are mutually exclusive and override each other. .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 case-sensitive extended 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 first according to the section number in ascending numerical order, then by the page name in ascending ascii(7) alphabetical order, case-insensitive. .PP Each output line is 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 .PP In general, macro keys are supposed to yield complete results without expecting the user to consider actual macro usage. For example, results include: .PP .RS 3n .PD 0 .TP 5n \fR\&Fa\fR .br function arguments appearing on \fB\&Fn\fR lines .TP 5n \fR\&Fn\fR .br function names marked up with \fB\&Fo\fR macros .TP 5n \fR\&In\fR .br include file names marked up with \fB\&Fd\fR macros .TP 5n \fR\&Vt\fR .br types appearing as function return types and .TP 5n \& types appearing in function arguments in the SYNOPSIS .RE .PD .SH "ENVIRONMENT" .TP 10n \fRMANPAGER\fR Any non-empty value of the environment variable \fRMANPAGER\fR is used instead of the standard pagination program, more(1); see man(1) for details. Only used if \fB\-a\fR or \fB\-l\fR is specified. .TP 10n \fRMANPATH\fR A colon-separated list of directories to search for manual pages; see man(1) for details. Overridden by \fB\-M\fR, ignored if \fB\-l\fR is specified. .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 is used. Only used if \fB\-a\fR or \fB\-l\fR is specified. .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 case-sensitive 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 \fBwhatis\fR 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 "STANDARDS" The \fBapropos\fR utility is compliant with the IEEE Std 1003.1-2008 (\(lqPOSIX.1\(rq) specification of man(1) \fB\-k\fR. .PP All options, the \fBwhatis\fR command, support for logical operators, macro keys, substring matching, sorting of results, the environment variables \fRMANPAGER\fR and \fRMANPATH\fR, the database format, and the configuration file are extensions to that specification. .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>.