When I change a given manpage, apropos and whatis do only reflect these changes when I perform the following steps:
store a copy of the manpage elsewhere and delete it in
/usr/local/man/man1run
makedbrun
makewhatisrestore the manpage in
/usr/local/man/man1run
makedbrun
makewhatis
Details:
When I change the NAME section to contain a certain keyword which should be found by apropos, it will only be found by apropos after performing the six (!) steps described above.
It is definitely not sufficient, just to update with mandb and makewhatis. I know that I can recreate the whatis database by makewhatis -c, but an update process which requires the deletion of the database first, is somewhat weird.
Question:
How can I change a manpage and have this change reflected by apropos and whatis without the deletion/restore/update process?
1 Answer
How can I change a manpage and have this change reflected by apropos and whatis?
You should be using mandb - create or update the manual page index caches.
mandbis used to initialise or manually update index 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 theman-dbutilities to enhance their speed and functionality.
mandb will update the databases uses by both apropos and whatis.
Source: mandb: create or update the manual page index caches - Linux Man Pages (8)
The database searched by
aproposis updated by themandbprogram. 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.
Source apropos(1) - Linux manual page
Each manual page has a short description available within it.
whatissearches the manual page names and displays the manual page descriptions of any name matched.
index databases are used during the search, and are updated by the
mandbprogram. 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.
Source: whatis(1) - Linux manual page
5