1855836 Members
2404 Online
104107 Solutions
New Discussion

Re: Man Pages...

 
SOLVED
Go to solution
Shaun Aldrich_1
Advisor

Man Pages...

Hello Everyone,

I have been reading in one of my old Sys Admin books that you could search the man pages to list all commands that have the string keyword in their description.

ie. man -k keyword

When I execute the below it doesn't work. Any ideas on what is happening? Thanks.

root@viper:/# man -k copy
/usr/share/lib/whatis: No such file or directory

S Aldrich
Hard work & dedication goes a long way...
4 REPLIES 4
Patrick Wallek
Honored Contributor

Re: Man Pages...

You need to run the command 'catman -w' to create the whatis database that 'man -k' uses. Do a 'man catman' for more information.
James R. Ferguson
Acclaimed Contributor

Re: Man Pages...

Shaun:

You can run 'catman -m' too. This will merge new entries into the 'whatis' database AND create formattted pages.

I always run 'catman -m' after applying patches to format new or replaced man pages and to update the "whatis" database.

...JRF...
Bill Hassell
Honored Contributor
Solution

Re: Man Pages...

A couple of options to catman are useful:

catman running against all the man pages for the first time will take a LONG time, several hours. You can limit which man pages are indexed with:

catman 11m23457

Which says: index man pages for section 1 (all user commands), 1m for root-only pages, 2 for system and library calls, and so on.

Another option is -w which suppresses the formatting of each page. This takes the most time but it does eliminate the "Reformatting entry. Wait..." pause. catman can do all the formatting on all the pages and eliminate the delay. It does require a lot more space (10-20 megs) in the man page areas, but may be useful.


Bill Hassell, sysadmin
Dan Hetzel
Honored Contributor

Re: Man Pages...

Hi Shaun,

It could take long to format all pages as 'nroff' has to be started for each page.
'catman -w' only creates a one line description for every manual page and creates an 'database' file (/usr/share/lib/whatis)

To give you a time estimate, I've run 'time catman -w' on a L2000 server and here is the output:
mercator:/# time catman -w
stdin: not in compressed format
stdin: not in compressed format

real 3:03.2
user 45.9
sys 1:23.0

As you see, it doesn't take ages to complete.

Best regards,

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com