Recipe 1.4. Finding Lost man Pages

 < Day Day Up > 

1.4.1 Problem

You can't find a man page for an installed program, and you're certain it should be on the system.

1.4.2 Solution

Sometimes the man database gets corrupted, users make strange modifications, or programs install man pages incorrectly. First try searching with whereis -m:

$ whereis -m cat cat:/usr/man/man1/cat.1.gz /usr/share/man/man1/cat.1.gz

Now you've found the page. Read it with man:

$ man /usr/man/man1/cat.1.gz

If that doesn't work, try rebuilding the man database with mandb:

# mandb

If that doesn't work, try a system-wide search with locate and egrep:

$ locate / cat. | egrep -w 'cat\.[1-9][a-zA-Z]*[.gz]?'

This works for any man page simply replace cat with whatever you're looking for.

If none of these approaches turn up the man page you are looking for, try the finddoc script in Recipe 1.11. If this doesn't find it, it's not on your system.

1.4.3 Discussion

There are all kinds of man page repositories on the Web, so you can always try a Google search. However, some programs simply don't have man pages, so don't ruin your health searching for one that may not exist.

1.4.4 See Also

  • whereis(1), mandb(8)

  • grep comes in several flavors; see grep(1) for details

     < Day Day Up > 


    Linux Cookbook
    Linux Cookbook
    ISBN: 0596006403
    EAN: 2147483647
    Year: 2004
    Pages: 434

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net