Possible Duplicate:
How to letmanutility to uselessto display manual rather thanmore?
How can i open up the Man-page for a command with the less-editor?
Alternatively, how can i find the man-page on the harddrive
I've tried using the manpath command but that doesn't seem to exist on solaris. Maybe there is a command to search for the manpage somehow?
13 Answers
The man command uses less by default. See man man (hehe). If yours doesn't, you could simply use a pipe like this.
man myCommand | less 1 Just add export PAGER=less in your .profile or .bashrc or whatever initialization file your shell use.
MANPATH is the variable used by man to find out manual pages.
In short
This should give you the path to the man page file:
man -d $ANY_MANPAGE 2>&1 >/dev/null|grep '^found ultimate'Explanation
From the man page:
-d, --debug Print debugging information.So,
man -d $ANY_MANPAGE 2>&1 >/dev/nullgives you a lot of information (the remainder of the command suppresses the actual man page and redirects debugging to stdout).
Example output
$ man -d man
[...]
found ultimate source file /usr/share/man/man1/man.1.gz 3