Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Aug 2009 02:21:27 -0700
From:      George Davidovich <freebsd@optimis.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: Trying to Install Man Page
Message-ID:  <20090811092127.GA31920@marvin.optimis.net>
In-Reply-To: <200908102059.n7AKxha1075178@dc.cis.okstate.edu>
References:  <200908102059.n7AKxha1075178@dc.cis.okstate.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Aug 10, 2009 at 03:59:43PM -0500, Martin McCormick wrote:
> There is a test man page I am trying to install and the system is not
> finding it. I put it in /usr/local/man/man1 and think I should at
> least get complaints about the page as it is the start of a man page,
> not the whole thing. I named it testpage

If your testpage manpage is located in a man1 directory, it has to be
named testpage.1 (or gzipped as testpage.1.gz).  For a man2 directory,
the suffix is .2, and so on.  Rename the file and I'm sure things will
work fine.

> , compressed it with gzip and when I type
> 
> man testpage, it just says that there is no manual entry for testpage.
> 
> Is there a data base I forgot to remake after adding the page? I did
> make sure the ownership and permissions are the same as other pages in
> the directory. I also did a man on one of the other pages in that same
> directory and it came right up. Thank you.

>From man(1):

	By default, man uses manpath(1) (which is built into the man binary)
	to determine the path to search.  This option overrides the MANPATH
	environment variable.

You can read manpath(1) for a full description of how things work (the
configuration file used is /etc/manpath.config), but be sure to read
man(1) in its entirety if you're going to get in the habit of writing
your own manpages.  More specifically, it describes the -w or -d options
you can use for debugging fun, and the sometimes useful -M option[1].

As a side note, if the manpage is for your own use, I'd suggest using
a hierarchy rooted in ~/man instead of /usr/local/man.  That can offer
numerous[2] benefits. 

----------------------
1. On Linux systems where you've installed FreeBSD manpages to improve
   your chances of finding more useful information than what's typically
   provided in the horrible info pages.

2. Aside from portability, it's especially useful on Windows systems
   where Cygwin is installed, but you're writing manpages for Windows
   (where the documentation is even more sparse than what's found in
   info pages, and no less clumsy to use).

-- 
George




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090811092127.GA31920>