Glam Prestige Journal

Bright entertainment trends with youth appeal.

When I change a given manpage, apropos and whatis do only reflect these changes when I perform the following steps:

  1. store a copy of the manpage elsewhere and delete it in /usr/local/man/man1

  2. run makedb

  3. run makewhatis

  4. restore the manpage in /usr/local/man/man1

  5. run makedb

  6. run 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.

mandb is 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 the man-db utilities 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 apropos is updated by the mandb program. 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.whatis searches 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 mandb program. 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

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy