No reference to files ???

Matthew Seaman m.seaman at
Sun Nov 30 02:57:54 PST 2003

On Sat, Nov 29, 2003 at 09:20:17PM -0500, Xpression wrote:
>         Hi all, I'm wondering if there is a way to show man
> pages and access files like if they were on $PATH, I mean
> when I compile a package and install it, there are no
> reference to man pages and the "executable" like when I
> install it from the CD...

I don't really understand what you're asking here.  Do you mean
something like -- "If I have more than one version of a program
installed at different locations on my $PATH, can I arrange for the
man(1) command to show me the man page corresponding to the version of
the program that comes first on the $PATH?"

If so, then: "Yes".  In fact it happens automatically. eg:

    % env PATH=/usr/local/bin:$PATH man dig | head -10
    DIG(1)                                                                  DIG(1)
           dig - DNS lookup utility
           dig  [  @server  ]  [ -b address ]  [ -c class ]  [ -f filename ]  [ -k
           filename ]  [ -p port# ]  [ -t type ]  [ -x addr ]  [ -y name:key ]   [

which is the man page for dig(1) from the bind9 port -- compare to:

    %  man dig | head -10
    DIG(1)                  FreeBSD General Commands Manual                 DIG(1)
         dig -- send domain name query packets to name servers
         dig [@server] domain [<query-type>] [<query-class>] [+<query-option>]
             [-<dig-option>] [%comment]

which is the man page for dig(1) from the bind8 version bundled with
the system.

This is all controlled by the manpath(1) utility built into the man(1)
command.  See also /etc/manpath.config 

    % manpath

If you want to overrule where or in what order the man command
searches for man pages, you can tell it to look in specific places on
the command line:

    % man -M /usr/local/man:/usr/X11R6/man dig

If you want to see what man pages are available for a specific command:

    % man -a -w dig
    /usr/share/man/cat1/dig.1.gz (source: /usr/share/man/man1/dig.1.gz)
    /usr/local/man/cat1/dig.1.gz (source: /usr/local/man/man1/dig.1.gz)

There's plenty of other knobs to twiddle to do with the man command,
all described faithfully in various man pages, but I'll leave it as an
exercise for you to find them.



Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP:         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list