man-pages/man8/mandb.8.html
2021-03-31 01:06:50 +01:00

345 lines
7.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of MANDB</TITLE>
</HEAD><BODY>
<H1>MANDB</H1>
Section: Manual pager utils (8)<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>
mandb - create or update the manual page index caches
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>mandb</B>
[<B>-dqsucpt?V</B>]
[<B>-C</B>
<I>file</I>]
[<I>manpath</I>]
<BR>
<B>mandb</B>
[<B>-dqsut</B>]
[<B>-C</B>
<I>file</I>]
<B>-f</B>
<I>filename</I>&nbsp;...
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>mandb</B>
is used to initialise or manually update
<B>index</B>
database caches.
The caches contain information relevant to the current state of the manual
page system and the information stored within them is used by the man-db
utilities to enhance their speed and functionality.
<P>
When creating or updating an
<B>index</B>,
<B>mandb</B>
will warn of bad ROFF .so requests, bogus manual page filenames and
manual pages from which the
<B>whatis</B>
cannot be parsed.
<P>
Supplying
<B>mandb</B>
with an optional colon-delimited path will override the internal system
manual page hierarchy search path, determined from information found within
the man-db configuration file.
<A NAME="lbAE">&nbsp;</A>
<H2>DATABASE CACHES</H2>
<B>mandb</B>
can be compiled with support for any one of the following database types.
<P>
<TABLE>
<TR VALIGN=top><TD>Name</TD><TD>Type</TD><TD>Async</TD><TD>Filename<BR></TD></TR>
<TR VALIGN=top><TD COLSPAN=4><HR></TD></TR>
<TR VALIGN=top><TD>Berkeley db</TD><TD>
Binary tree
</TD><TD>Yes</TD><TD><I>index.bt</I><BR></TD></TR>
<TR VALIGN=top><TD>GNU gdbm</TD><TD>
Hashed
</TD><TD>Yes</TD><TD><I>index.db</I><BR></TD></TR>
<TR VALIGN=top><TD>UNIX ndbm</TD><TD>
Hashed
</TD><TD>No</TD><TD><I>index.(dir|pag)</I><BR></TD></TR>
</TABLE>
<P>
Those database types that support asynchronous updates provide enhanced
speed at the cost of possible corruption in the event of unusual
termination.
In an unusual case where this has occurred, it may be necessary to rerun
<B>mandb</B>
with the
<B>-c</B>
option to re-create the databases from scratch.
<A NAME="lbAF">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT id="1"><B>-d</B>, <B>--debug</B>
<DD>
Print debugging information.
<DT id="2"><B>-q</B>, <B>--quiet</B>
<DD>
Produce no warnings.
<DT id="3"><B>-s</B>, <B>--no-straycats</B>
<DD>
Do not spend time looking for or adding information to the databases
regarding stray cats.
<DT id="4"><B>-p</B>, <B>--no-purge</B>
<DD>
Do not spend time checking for deleted manual pages and purging them from
the databases.
<DT id="5"><B>-c</B>, <B>--create</B>
<DD>
By default,
<B>mandb</B>
will try to update any previously created databases.
If a database does not exist, it will create it.
This option forces
<B>mandb</B>
to delete previous databases and re-create them from scratch, and implies
<B>--no-purge.</B>
This may be necessary if a database becomes corrupt or if a new database
storage scheme is introduced in the future.
<DT id="6"><B>-u</B>, <B>--user-db</B>
<DD>
Create user databases only, even with write permissions necessary to create
system databases.
<DT id="7"><B>-t</B>, <B>--test</B>
<DD>
Perform correctness checks on manual pages in the hierarchy search path.
With this option,
<B>mandb</B>
will not alter existing databases.
<DT id="8"><B>-f</B>, <B>--filename</B>
<DD>
Update only the entries for the given filename.
This option is not for general use; it is used internally by
<B>man</B>
when it has been compiled with the
<B>MAN_DB_UPDATES</B>
option and finds that a page is out of date.
It implies
<B>-p</B>
and disables
<B>-c</B>
and
<B>-s</B>.
<DT id="9"><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="10"><B>-?</B>, <B>--help</B>
<DD>
Show the usage message, then exit.
<DT id="11"><B>--usage</B>
<DD>
Print a short usage message and exit.
<DT id="12"><B>-V</B>, <B>--version</B>
<DD>
Show the version, then exit.
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>EXIT STATUS</H2>
<DL COMPACT>
<DT id="13"><B>0</B>
<DD>
Successful program execution.
<DT id="14"><B>1</B>
<DD>
Usage, syntax, or configuration file error.
<DT id="15"><B>2</B>
<DD>
Operational error.
<DT id="16"><B>3</B>
<DD>
A child process failed.
</DL>
<A NAME="lbAH">&nbsp;</A>
<H2>DIAGNOSTICS</H2>
The following warning messages can be emitted during database building.
<DL COMPACT>
<DT id="17"><B>&lt;filename&gt;: whatis parse for page(sec) failed</B>
<DD>
An attempt to extract whatis line(s) from the given &lt;filename&gt; failed.
This is usually due to a poorly written manual page, but if many such
messages are emitted it is likely that the system contains non-standard
manual pages which are incompatible with the man-db whatis parser.
See the
<B>WHATIS PARSING</B>
section in
<B><A HREF="/cgi-bin/man/man2html?1+lexgrog">lexgrog</A></B>(1)
for more information.
<DT id="18"><B>&lt;filename&gt;: is a dangling symlink</B>
<DD>
&lt;filename&gt; does not exist but is referenced by a symbolic link.
Further diagnostics are usually emitted to identify the &lt;filename&gt; of the
offending link.
<DT id="19"><B>&lt;filename&gt;: bad symlink or ROFF `.so' request</B>
<DD>
&lt;filename&gt; is either a symbolic link to, or contains a ROFF include
request to, a non existent file.
<DT id="20"><B>&lt;filename&gt;: ignoring bogus filename</B>
<DD>
The &lt;filename&gt; may or may not be a valid manual page but its name is
invalid.
This is usually due to a manual page with sectional extension &lt;x&gt; being put
in manual page section &lt;y&gt;.
<DT id="21"><B>&lt;filename_mask&gt;: competing extensions</B>
<DD>
The wildcard &lt;filename_mask&gt; is not unique.
This is usually caused by the existence of both a compressed and
uncompressed version of the same manual page.
All but the most recent are ignored.
</DL>
<A NAME="lbAI">&nbsp;</A>
<H2>FILES</H2>
<DL COMPACT>
<DT id="22"><I>/etc/manpath.config</I>
<DD>
man-db configuration file.
<DT id="23"><I>/var/cache/man/index.(bt|db|dir|pag)</I>
<DD>
An FHS compliant global
<I>index</I>
database cache.
</DL>
<P>
Older locations for the database cache included:
<DL COMPACT>
<DT id="24"><I>/usr/man/index.(bt|db|dir|pag)</I>
<DD>
A traditional global
<I>index</I>
database cache.
<DT id="25"><I>/var/catman/index.(bt|db|dir|pag)</I>
<DD>
An alternate or FSSTND
compliant global
<I>index</I>
database cache.
</DL>
<A NAME="lbAJ">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?1+lexgrog">lexgrog</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+man">man</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?5+manpath">manpath</A></B>(5),
<B><A HREF="/cgi-bin/man/man2html?8+catman">catman</A></B>(8)
<P>
The
<B>WHATIS PARSING</B>
section formerly in this manual page is now part of
<B><A HREF="/cgi-bin/man/man2html?1+lexgrog">lexgrog</A></B>(1).
<A NAME="lbAK">&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="26"><A HREF="#lbAB">NAME</A><DD>
<DT id="27"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="28"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="29"><A HREF="#lbAE">DATABASE CACHES</A><DD>
<DT id="30"><A HREF="#lbAF">OPTIONS</A><DD>
<DT id="31"><A HREF="#lbAG">EXIT STATUS</A><DD>
<DT id="32"><A HREF="#lbAH">DIAGNOSTICS</A><DD>
<DT id="33"><A HREF="#lbAI">FILES</A><DD>
<DT id="34"><A HREF="#lbAJ">SEE ALSO</A><DD>
<DT id="35"><A HREF="#lbAK">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:06:13 GMT, March 31, 2021
</BODY>
</HTML>