MANDB(8)

๐Ÿ’พ MANDB(8) โ€” the manual pager utils girlies ๐Ÿ’…

okay bestie, gather round, because mandb is literally the behind-the-scenes queen that keeps your man pages fast and fabulous. โœจ


๐ŸŒธ NAME ๐ŸŒธ

mandb โ€” create or update the manual page index caches ๐Ÿ—‚๏ธ


โœจ SYNOPSIS โœจ

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

๐Ÿ’– DESCRIPTION ๐Ÿ’–

So like, mandb is what you run to initialise or manually update the index database caches. Those caches hold all the info about what your manual page system currently looks like, and the man-db utilities read them to be faster and do more cool stuff. it's giving glow-up for your docs. ๐Ÿฆ‹

When it's creating or updating an index, mandb will warn you about bad ROFF .so requests, bogus manual page filenames, and manual pages where the whatis just cannot be parsed. not me snitching on your broken pages, but someone has to. ๐Ÿ˜ญ

And ooh โ€” if you hand mandb an optional colon-delimited path, that overrides the internal system manual page hierarchy search path, which is normally figured out from info in the man-db configuration file. so yeah, you can just. redirect the whole vibe. ๐Ÿ’ซ


๐Ÿ—„๏ธ DATABASE CACHES ๐Ÿ—„๏ธ

mandb can be compiled with support for any one of these database types:

  • Berkeley db โ€” Async: Yes โ€” Filename: index.bt
  • GNU gdbm โ€” Async: Yes โ€” Filename: index.db
  • UNIX ndbm โ€” Async: No โ€” Filename: index.(dir|pag)

The database types that support asynchronous updates are faster, but at the cost of possible corruption if the process gets terminated in an unusual way. and if that ever happens to you (sending thoughts and prayers ๐Ÿซถ), you may need to rerun mandb with the -c option to re-create the databases from scratch. no cap.


๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

  • -d, --debug โ€” Print debugging information. very "tell me everything" of it. ๐Ÿ”
  • -q, --quiet โ€” Produce no warnings. shhh bestie, we're being calm. ๐Ÿคซ
  • -s, --no-straycats โ€” Do not spend time looking for or adding information to the databases regarding stray cats. (yes, "stray cats" is the actual term, we don't make the rules ๐Ÿฑ)
  • -p, --no-purge โ€” Do not spend time checking for deleted manual pages and purging them from the databases.
  • -c, --create โ€” By default, mandb will try to update any previously created databases, and if a database doesn't exist, it creates it. This option forces mandb to delete previous databases and re-create them from scratch, and it implies --no-purge. You might need this if a database becomes corrupt or if a new database storage scheme shows up in the future. it's the factory reset of it all. ๐Ÿ’…
  • -u, --user-db โ€” Create user databases only, even if you have the write permissions necessary to create system databases.
  • -t, --test โ€” Perform correctness checks on manual pages in the hierarchy search path. With this option, mandb will not alter existing databases. it's a vibe check, not a makeover. โœ…
  • -f, --filename โ€” Update only the entries for the given filename. This option is not for general use; it's used internally by man when it has been compiled with the MAN_DB_UPDATES option and finds that a page is out of date. It implies -p and disables -c and -s. so like, hands off unless you know what you're doing, bestie. ๐Ÿ™ˆ
  • -C file, --config-file=file โ€” Use this user configuration file rather than the default of ~/.manpath.
  • -?, --help โ€” Show the usage message, then exit. the classic cry for help. ๐Ÿ†˜
  • --usage โ€” Print a short usage message and exit. short and sweet, periodt.
  • -V, --version โ€” Show the version, then exit.

๐Ÿšฆ EXIT STATUS ๐Ÿšฆ

  • 0 โ€” Successful program execution. slay. ๐ŸŽ€
  • 1 โ€” Usage, syntax, or configuration file error.
  • 2 โ€” Operational error.
  • 3 โ€” A child process failed.

๐Ÿฉบ DIAGNOSTICS ๐Ÿฉบ

These are the warning messages that can be emitted while building the database. read them, don't ignore them, i'm begging. ๐Ÿ˜ญ

  • <filename>: whatis parse for page(sec) failed โ€” An attempt to extract whatis line(s) from the given <filename> failed. This is usually because the manual page is poorly written, but if you're getting many of these messages, it's likely your system contains non-standard manual pages that are incompatible with the man-db whatis parser. See the WHATIS PARSING section in lexgrog(1) for more info.
  • <filename>: is a dangling symlink โ€” <filename> doesn't 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 file that doesn't exist. ๐Ÿ’€
  • <filename>: ignoring bogus filename โ€” The <filename> may or may not be a valid manual page, but its name is invalid. This is usually because a manual page with sectional extension <x> got put in manual page section <y>. wrong section, wrong era, we don't know her.
  • <filename_mask>: competing extensions โ€” The wildcard <filename_mask> isn't unique. This is usually caused by both a compressed and an uncompressed version of the same manual page existing at once. All but the most recent one are ignored. only the newest gets to be main character. ๐Ÿ‘‘

๐Ÿ“ FILES ๐Ÿ“

  • /etc/man_db.conf โ€” man-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.

๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

lexgrog(1), man(1), manpath(5), catman(8)

The WHATIS PARSING section that used to live in this manual page is now part of lexgrog(1). it moved out, got its own place, we respect the growth. ๐ŸŒฑ


๐Ÿ’œ AUTHOR ๐Ÿ’œ

  • Wilf. (G.Wilford@ee.surrey.ac.uk).
  • Fabrizio Polacco (fpolacco@debian.org).
  • Colin Watson (cjwatson@debian.org).

๐Ÿ› BUGS ๐Ÿ›


and that's the whole thing bestie!! this page is from man-db 2.13.1, dated 2025-05-02 โ€” so if you're reading this, you're on the 2.13.1 era of the manual pager utils. iconic behavior honestly. go forth and cache responsibly ๐Ÿซถโœจ๐ŸŒธ

๐Ÿ“ฆ where this page comes from