LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   man and man option -M. (https://www.linuxquestions.org/questions/linux-newbie-8/man-and-man-option-m-797438/)

stf92 03-23-2010 09:39 PM

man and man option -M.
 
Linux kernel = 2.6
Rest of the system = GNU
Commands issued within a text console (virtual console).
Shell = GNU bash 3.1.17
man = 1.6c
Distribution = Slackware 12.0

Hi: How is this possible?:
I issue 'man /usr/local/share/man/man1/mplayer.1' and I get instant access to the man page. This is in accordance to man's man page. That is, the argument is here a file specification. Now, watch this:

$ ls /usr/local/share/man/man1/mplayer.1
$ /usr/local/share/man/man1/mplayer.1
$ man -M /usr/local/share/man/man1 mplayer
$ No manual entry for mplayer

I consider this a clear contradiction with man's man page, regardless of the linux system and of the settings the user could have done to the system. But, needless to say, I may be wrong. Am I? Thanks for reading and regards.

P.S.: it would be the strangest thing in the world that the manual for such a program as man is wrong. I see it. Unfortunately, man pages only state a date (and sometimes not even this). While from linux programs, --version gives a number and only sometimes a date. For example, it could be that the man page version in my system is written for a version of man which is older than the one in my system. Or newer. The fault, in this case, would be in the package builder. But there should be in linux a way of knowing for certain that a manual corresponds with the program.

David the H. 03-23-2010 10:44 PM

According to my "man man", the -M option says this.

Quote:

Specify an alternate manpath to use. By default, man uses manpath derived code to determine the path to search. This option overrides the $MANPATH environment variable and causes option -m to be ignored.

A path specified as a manpath must be the root of a manual page hierarchy structured into sections as described in the man-db manual (under "The manual page system"). To view manual pages outside such hierarchies, see the -l option.
(Emphasis mine.)

If I run "man -M /usr/local/share/man/ program" (removing the "man1") it works as expected, probably because it then has a proper hierarchy to search.


All times are GMT -5. The time now is 11:01 PM.