man-pages/man1/apropos.1.html
2021-03-31 01:06:50 +01:00

381 lines
8.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of APROPOS</TITLE>
</HEAD><BODY>
<H1>APROPOS</H1>
Section: Manual pager utils (1)<BR>Updated: 2020-02-25<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
apropos - search the manual page names and descriptions
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>apropos</B>
[<B>-dalv?V</B>]
[<B>-e</B>|<B>-w</B>|<B>-r</B>]
[<B>-s</B>
<I>list</I>]
[<B>-m</B>
<I>system</I>[,...]]
[<B>-M</B>
<I>path</I>]
[<B>-L</B>
<I>locale</I>]
[<B>-C</B>
<I>file</I>]
<I>keyword</I>
...
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
Each manual page has a short description available within it.
<B>apropos</B>
searches the descriptions for instances of
<I>keyword</I>.
<P>
<I>keyword</I>
is usually a regular expression, as if
(<B>-r</B>)
was used, or
may contain wildcards
(<B>-w</B>),
or match the exact keyword
(<B>-e</B>).
Using these options, it may be necessary to quote the
<I>keyword</I>
or escape (\) the special characters to stop the shell from interpreting
them.
<P>
The standard matching rules allow matches to be made against the page name
and word boundaries in the description.
<P>
The database searched by
<B>apropos</B>
is updated by the
<B>mandb</B>
program.
Depending on your installation, this may be run by a periodic cron job, or
may need to be run manually after new manual pages have been installed.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT id="1"><B>-d</B>, <B>--debug</B>
<DD>
Print debugging information.
<DT id="2"><B>-v</B>, <B>--verbose</B>
<DD>
Print verbose warning messages.
<DT id="3"><B>-r</B>, <B>--regex</B>
<DD>
Interpret each keyword as a regular expression.
This is the default behaviour.
Each keyword will be matched against the page names and the descriptions
independently.
It can match any part of either.
The match is not limited to word boundaries.
<DT id="4"><B>-w</B>, <B>--wildcard</B>
<DD>
Interpret each keyword as a pattern containing shell style wildcards.
Each keyword will be matched against the page names and the descriptions
independently.
If
<B>--exact</B>
is also used,
a match will only be found if an expanded keyword matches an entire
description or page name.
Otherwise the keyword is also allowed to match on word boundaries in the
description.
<DT id="5"><B>-e</B>, <B>--exact</B>
<DD>
Each keyword will be exactly matched against the page names and the
descriptions.
<DT id="6"><B>-a</B>, <B>--and</B>
<DD>
Only display items that match all the supplied keywords.
The default is to display items that match any keyword.
<DT id="7"><B>-l</B>, <B>--long</B>
<DD>
Do not trim output to the terminal width.
Normally, output will be truncated to the terminal width to avoid ugly
results from poorly-written
<B>NAME</B>
sections.
<DT id="8"><B>-s</B> <I>list/</I>, <B>--sections=</B><I>list/</I>, <B>--section=</B><I>list</I><DD>
Search only the given manual sections.
<I>list</I>
is a colon- or comma-separated list of sections.
If an entry in
<I>list</I>
is a simple section, for example &quot;3&quot;, then the displayed list of
descriptions will include pages in sections &quot;3&quot;, &quot;3perl&quot;, &quot;3x&quot;, and so on;
while if an entry in
<I>list</I>
has an extension, for example &quot;3perl&quot;, then the list will only include
pages in that exact part of the manual section.
<DT id="9"><B>-m</B> <I>system</I>[,...], <B>--systems=</B><I>system</I>[,...]<DD>
If this system has access to other operating system's manual page
descriptions, they can be searched using this option.
To search NewOS's manual page descriptions, use the option
<B>-m</B>
<B>NewOS</B>.
<P>
The
<I>system</I>
specified can be a combination of comma-delimited operating system names.
To include a search of the native operating system's
<B>whatis</B>
descriptions, include the system name
<B>man</B>
in the argument string.
This option will override the
$<B>SYSTEM</B>
environment variable.
<DT id="10"><B>-M&nbsp;</B><I>path</I><B></B>,&nbsp;<B>--manpath=</B><I>path</I>
<DD>
Specify an alternate set of colon-delimited manual page hierarchies to
search.
By default,
<B>apropos</B>
uses the
$<B>MANPATH</B>
environment variable, unless it is empty or unset, in which case it will
determine an appropriate manpath based on your
$<B>PATH</B>
environment variable.
This option overrides the contents of
$<B>MANPATH</B>.
<DT id="11"><B>-L&nbsp;</B><I>locale</I><B></B>,&nbsp;<B>--locale=</B><I>locale</I>
<DD>
<B>apropos</B>
will normally determine your current locale by a call to the C function
<B><A HREF="/cgi-bin/man/man2html?3+setlocale">setlocale</A></B>(3)
which interrogates various environment variables, possibly including
$<B>LC_MESSAGES</B>
and
$<B>LANG</B>.
To temporarily override the determined value, use this option to supply a
<I>locale</I>
string directly to
<B>apropos</B>.
Note that it will not take effect until the search for pages actually
begins.
Output such as the help message will always be displayed in the initially
determined locale.
<DT id="12"><B>-C&nbsp;</B><I>file</I><B></B>,&nbsp;<B>--config-file=</B><I>file</I>
<DD>
Use this user configuration file rather than the default of
<I>~/.manpath</I>.
<DT id="13"><B>-?</B>, <B>--help</B>
<DD>
Print a help message and exit.
<DT id="14"><B>--usage</B>
<DD>
Print a short usage message and exit.
<DT id="15"><B>-V</B>, <B>--version</B>
<DD>
Display version information.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>EXIT STATUS</H2>
<DL COMPACT>
<DT id="16"><B>0</B>
<DD>
Successful program execution.
<DT id="17"><B>1</B>
<DD>
Usage, syntax or configuration file error.
<DT id="18"><B>2</B>
<DD>
Operational error.
<DT id="19"><B>16</B>
<DD>
Nothing was found that matched the criteria specified.
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>ENVIRONMENT</H2>
<DL COMPACT>
<DT id="20"><B>SYSTEM</B>
<DD>
If
$<B>SYSTEM</B>
is set, it will have the same effect as if it had been specified as the
argument to the
<B>-m</B>
option.
<DT id="21"><B>MANPATH</B>
<DD>
If
$<B>MANPATH</B>
is set, its value is interpreted as the colon-delimited manual page
hierarchy search path to use.
<DT id="22"><B>MANWIDTH</B>
<DD>
If
$<B>MANWIDTH</B>
is set, its value is used as the terminal width (see the
<B>--long</B>
option).
If it is not set, the terminal width will be calculated using the value of
$<B>COLUMNS</B>,
and
<B><A HREF="/cgi-bin/man/man2html?2+ioctl">ioctl</A></B>(2)
if available, or falling back to 80 characters if all else fails.
<DT id="23"><B>POSIXLY_CORRECT</B>
<DD>
If
$<B>POSIXLY_CORRECT</B>
is set, even to a null value, the default
<B>apropos</B>
search will be as an extended regex
(<B>-r</B>).
Nowadays, this is the default behaviour anyway.
</DL>
<A NAME="lbAH">&nbsp;</A>
<H2>FILES</H2>
<DL COMPACT>
<DT id="24"><I>/usr/share/man/index.(bt|db|dir|pag)</I>
<DD>
A traditional global
<I>index</I>
database cache.
<DT id="25"><I>/var/cache/man/index.(bt|db|dir|pag)</I>
<DD>
An FHS
compliant global
<I>index</I>
database cache.
<DT id="26"><I>/usr/share/man/.../whatis</I>
<DD>
A traditional
<B>whatis</B>
text database.
</DL>
<A NAME="lbAI">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?1+man">man</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+whatis">whatis</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?8+mandb">mandb</A></B>(8)
<A NAME="lbAJ">&nbsp;</A>
<H2>AUTHOR</H2>
<PRE>
Wilf. (<A HREF="mailto:G.Wilford@ee.surrey.ac.uk">G.Wilford@ee.surrey.ac.uk</A>).
Fabrizio Polacco (<A HREF="mailto:fpolacco@debian.org">fpolacco@debian.org</A>).
Colin Watson (<A HREF="mailto:cjwatson@debian.org">cjwatson@debian.org</A>).
</PRE>
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="27"><A HREF="#lbAB">NAME</A><DD>
<DT id="28"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="29"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="30"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="31"><A HREF="#lbAF">EXIT STATUS</A><DD>
<DT id="32"><A HREF="#lbAG">ENVIRONMENT</A><DD>
<DT id="33"><A HREF="#lbAH">FILES</A><DD>
<DT id="34"><A HREF="#lbAI">SEE ALSO</A><DD>
<DT id="35"><A HREF="#lbAJ">AUTHOR</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:07 GMT, March 31, 2021
</BODY>
</HTML>