makemandb - parse the manual pages and build a search index over them


makemandb [-flo]


The makemandb utility traverses the directories containing man pages, parses the manual pages with the help of libmandoc and builds an Sqlite database man.db to support full text searches. It obtains the list of directories to traverse using the -p option of man(1).

It supports the following options:

Force rebuilding the index from scratch, pruning the existing one.

Limit the parsing to only the NAME section of the pages. This option can be used to mimic the behavior of the classic apropos(1) and also to substantially save disk space.

Use this option to optimize the index for speed and also to significantly reduce disk space usage. This is a somewhat expensive operation.

As the database file is stored under /var/db, root privileges are required to run .


The name of the FTS table is mandb and its schema is as follows:
section The section number of the page
name The name of the page from the NAME section.
name_desc The one line description from the NAME section.
desc The DESCRIPTION section.
lib The LIBRARY section.
synopsis The SYNOPSIS section.
return_vals The RETURN VALUES section.
env The ENVIRONMENT section.
files The FILES section.
exit_status The EXIT STATUS section.
errors The ERRORS section.


/var/db/man.db The Sqlite FTS database which contains an index of the manual pages.


apropos(1), man(1), man.conf(5)


Abhinav Upadhyay


makemandb is currently unable to parse the escape sequences in man(7) pages, which should be fixed in upcoming versions.
Get NetBSD Summer of Code projects at Fast, secure and Free Open Source software downloads
Abhinav Upadhyay <er.abhinav.upadhyay at gmail dot com>
$Id: makemandb.html1,v 1.2 2011/08/25 06:52:59 abhinavupadhyay Exp $