Linux "mandb" Command Line Options and Examples
create or update the manual page index caches

mandb is used to initialise or manually update index database caches that are usually maintained by man. The caches contain informa‐ tion 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. When creating or updating an index, mandb will warn of bad ROFF .


Usage:

mandb [-dqsucpt?V] [-C file] [manpath]
    mandb [-dqsut] [-C file] -f filename ...






Command Line Options:

-d
Print debugging information.
mandb -d ...
-q
Produce no warnings.
mandb -q ...
-s
Do not spend time looking for or adding information to the databases regarding stray cats.
mandb -s ...
-p
Do not spend time checking for deleted manual pages and purging them from the databases.
mandb -p ...
-c
By default, mandb will try to update any previously created databases. If a database does not exist, it will create it. Thisoption forces mandb to delete previous databases and re-create them from scratch, and implies --no-purge. This may be neces‐sary if a database becomes corrupt or if a new database storage scheme is introduced in the future.
mandb -c ...
-u
Create user databases only, even with write permissions necessary to create system databases.
mandb -u ...
-t
Perform correctness checks on manual pages in the hierarchy search path. With this option, mandb will not alter existingdatabases.
mandb -t ...
-f
Update only the entries for the given filename. This option is not for general use; it is used internally by man when it hasbeen compiled with the MAN_DB_UPDATES option and finds that a page is out of date. It implies -p and disables -c and -s.
mandb -f ...
-C
Use this user configuration file rather than the default of ~/.manpath.
mandb -C ...
-?
Show the usage message, then exit.
mandb -? ...
--usage
Print a short usage message and exit.
mandb --usage ...
-V
Show the version, then exit.EXIT STATUS0 Successful program execution.1 Usage, syntax, or configuration file error.2 Operational error.3 A child process failed.DIAGNOSTICSThe following warning messages can be emitted during database building.<filename>: whatis parse for page(sec) failedAn attempt to extract whatis line(s) from the given <filename> 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 incompatiblewith the man-db whatis parser. See the WHATIS PARSING section in lexgrog(1) for more information.<filename>: is a dangling symlink<filename> does not exist but is referenced by a symbolic link. Further diagnostics are usually emitted to identify the<filename> of the offending link.<filename>: bad symlink or ROFF `.so' request<filename> is either a symbolic link to, or contains a ROFF include request to, a non existent file.<filename>: ignoring bogus filenameThe <filename> may or may not be a valid manual page but its name is invalid. This is usually due to a manual page with sec‐tional extension <x> being put in manual page section <y>.<filename_mask>: competing extensionsThe wildcard <filename_mask> is not unique. This is usually caused by the existence of both a compressed and uncompressedversion of the same manual page. All but the most recent are ignored.FILES/etc/manpath.configman-db configuration file./var/cache/man/index.(bt|db|dir|pag)An FHS compliant global index database cache.Older locations for the database cache included:/usr/man/index.(bt|db|dir|pag)A traditional global index database cache./var/catman/index.(bt|db|dir|pag)An alternate or FSSTND compliant global index database cache.
mandb -V ...