From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,acc74ce4f6528841 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-07-28 12:24:48 PST Newsgroups: comp.unix.osf.osf1 Path: bga.com!news.sprintlink.net!news.onramp.net!convex!news.duke.edu!news-feed-1.peachnet.edu!gatech!howland.reston.ans.net!agate!darkstar.UCSC.EDU!news.hal.COM!olivea!decwrl!pa.dec.com!datum.nyo.dec.com!niagara.nyo.dec.com!frank From: frank@niagara.nyo.dec.com (Frank Wortner) Subject: Re: Strange (mis)feature of the "man" command (was Re: OSF1 2.0 memory leaks ...) Message-ID: <1994Jul28.141745.18514@datum.nyo.dec.com> Sender: usenet@datum.nyo.dec.com (USENET News System) Reply-To: frank@nyo.dec.com Organization: Digital Equipment Corporation X-Newsreader: mxrn 6.18-16 References: <1994Jul25.194141.5530@datum.nyo.dec.com> Date: Thu, 28 Jul 1994 14:17:45 GMT In article , sysmark@helios.physics.utoronto.ca (Mark Bartelt) writes: |>Despite the fact that /usr/share/man comes before /usr/local/man in the default |>MANPATH, the "man" command seems to search all the directories for "Xserver.1", |>before rescanning them again to look for "Xserver.1X". This was easy to check: |>If I rename /usr/share/man/man1/Xserver.1X to /usr/share/man/man1/Xserver.1 (or, |>alternatively, /usr/local/man/man1/Xserver.1 to /usr/local/man/man1/Xserver.1X), |>then "man Xserver" will give DEC's Xserver man page. As long as both man pages |>have the same name, all is well. |> |>Also, if there's an "Xserver.1" in /usr/local/man/cat1, "man Xserver" will pick |>that one in preference to /usr/share/man/man1/Xserver.1X, though it will choose |>/usr/share/man/man1/Xserver.1 over /usr/local/man/cat1/Xserver.1, curiously. |> |>So, my question is: Is this behavious intentional, or is it a bug? And if the |>former, what's the rationale? Given several possible man pages with the same basename, the man command sorts them alphabetically and displays the first one. Xserver.1 comes before Xserver.1X, so it displays Xserver.1. Why? Probably because there are a one or more layered products that add new man pages with the same names as existing ones. For example, DECnet adds a select.2dn man page to man/man2. That page documents the use of the select system call with DECnet. If you type "man select", you get the original man page; if you type "man 2dn select" you get the new one. Sigh. :-) Frank