Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
How to let man utility to use less to display manual rather than more?

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?

share|improve this question
    
What Solaris release are you using ? –  jlliagre Oct 2 '12 at 9:58
add comment

marked as duplicate by jlliagre, Indrek, Dave Rook, BBlake, DragonLord Oct 2 '12 at 13:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3 Answers

up vote 1 down vote accepted

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
share|improve this answer
2  
On Solaris, man doesn't use less by default. It uses more -s. –  jlliagre Oct 2 '12 at 9:56
add comment

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.

share|improve this answer
add comment

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/null

gives 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
share|improve this answer
    
Is the man debugging output locale independent? –  Daniel Beck Oct 2 '12 at 9:49
    
As far as the implementation found in debian and suse is concerned: yes (I've found this: fprintf (stderr, "found ultimate source file %s\n", man_file);). But now that you ask, I'm not even sure whether the Solaris implementation provides a -d switch in the first place. –  artistoex Oct 2 '12 at 11:43
    
That's why I deleted my earlier answer -- apparently it didn't apply to Solaris. –  Daniel Beck Oct 2 '12 at 11:44
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.