A collection of computer systems and programming tips that you may find useful.
 
Brought to you by Craic Computing LLC, a bioinformatics consulting company.

Friday, January 5, 2007

Viewing local man pages

This is a trivial tip, but it's one that I always forget for some reason...

The man utility on UNIX systems lets you view manual (help) pages that are stored in a central location, typically /usr/share/man.

Typing man grep, for instance, pulls the man page for grep from that directory.

But if you have downloaded and unpacked some third-party software that includes a man page, how do you view that before installing it? just giving the name to man gives the error message No manual entry for <yourpage.1>

The answer is to give it a specific path to that file. You can either give a full or relative UNIX path, or if you are in that directory then just do this:

man ./yourpage.1

where yourpage.1 is the name of the file you want to view.


Also, to generate a plain text version of a man page, pipe the output through col thus:

man ./yourpage.1 | col -b

No comments:

Archive of Tips