3

I just wanted to look at the man page for the command md5. So I typed man md5 but it displayed the man page of dgst instead of this one.

Any idea why and how I could access this manpage from the terminal ?

Edit : man -w return the path used to look for manpages : /opt/local/share/man:/usr/share/man:/usr/local/share/man:/usr/texbin/man

But where does this come from ? Not from my /private/etc/man.conf.

2

On my ML installation, man md5 does indeed show the MD5(1) man page.

It's possible some local software installation or configuration is causing the display of a man page for dgst instead, though (which appears to be part of OpenSSL.)

A few things to check:

Do you have the MANPATH environment variable set in your shell? It could be looking in an alternative directory for manpages before hitting the system manpages. MANPATH does not appear to be set by default.

Are there alternative MANPATH directives in /private/etc/man.conf? My system has

MANPATH /usr/share/man
MANPATH /usr/local/share/man
MANPATH /usr/X11/man

Has /usr/share/man/man1/md5.1 been replaced by a symlink to another man page that could be producing the dgst content? Try

$ ls -l /usr/share/man/man1/md5.1
-r--r--r--  1 root  wheel  12332 Nov 16  2012 /usr/share/man/man1/man.1

If /usr/share/man/man1/md5.1 has not been changed, then you can read its content specifically this way:

$ man /usr/share/man/man1/md5.1
  • I have no MANPATH in my environment variables, MANPATH are the same than yours and man /usr/share/man/man1/md5.1 shows the right man page. I still don't get why I dgst's manpage. – Matthieu Riegler Sep 25 '13 at 8:44
2

I'll answer myself to my question after a bit a research :

To see how the manpath is build, looking at manpath -d is quite interesting.

man uses MANPATH/MANPATH_MAP (as defined in /private/etc/man.conf) and$PATH` from the environment variables to build it's search path.

Because of MacPort my $PATH starts with the multiple subdirectories in /opt/local/. Therefore my manpath will start with /opt/local/ manpages.

  • 1
    Interesting. I had seen MANPATH_MAP referenced, but didn't bring it up because it wasn't clear to me from man's own manpage how it worked. This is enlightening, thank you! – zigg Sep 25 '13 at 12:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .