man hint update

Gerard Beekmans gerard at
Sun Mar 10 11:38:07 PST 2002

Gerard Beekmans

-*- If Linux doesn't have the solution, you have the wrong problem -*-
-------------- next part --------------
TITLE:		The Man Hint
AUTHOR:		Gerard Beekmans <gerard at

	Formating and Compression issues for man pages


Note: The previous maintainer of this hint was Rudolf Floers
<r.floers at>, but he is unable to continue maintaining it, so I took

(1)	compression of man pages

if you want to save a little diskspace, you can safely bzip2 or gzip all
manpages by running one of the following two commands:

	gzip /usr/share/man/*/*  #(and all other dirs containing man pages)
	bzip2 /usr/share/man/*/*  #(and all other dirs containing man pages)

Ignore all error messages which are caused by gzip or bzip2 trying to
compress links.

(2)      cat pages

To enable cat man pages, just create these directories   

         mkdir /var/cache
         mkdir /var/cache/man
         for i in `seq 8`; do mkdir /var/cache/man/cat$i; done

Make them writeable for those users who are allowed to save cat man pages.
I'd suggest to 

         chmod 775 /var/cache/man/* 
         chgrp users /var/cache/man/*

The alternate way is to create a user man, make the man program setuid man,
and then give only user man write access to /var/cache/man/*.

Whenever a user reads a man page, pages from /usr/share/man/manX will now
automatically be placed into /var/cache/man/catX - in cat format, i.e. 
preformatted, and gzipped. the next time a user requests the man page, man 
doesn't need to format again, but can just read the preformatted page 
from /var/cache/man/catX.

To make man save X's man pages in the just created directories, too, open 
man.conf with a text editor and replace this line (this works also for 
other directories, such as /usr/local/share/man):

         MANPATH         /usr/X11R6/man
         MANPATH         /usr/X11R6/man  /var/cache/man

More information about the hints mailing list