Solaris Transition Guide

Customizing the man Command Search Path

Unlike the SunOS release 4 software, which searched the individual man directories according to a predetermined order, the SunOS release 5.7 software lets you determine the search path. The man command uses the path set in the man page configuration file,

Each component of the MANPATH environment variable can contain a different file. You can modify to change the order of the search; for example, to search 3b before 3c. The configuration file for the /usr/share/man directory follows.

# Default configuration file for the on-line manual pages.

MANSECTS=1,1m,1c,1f,1s,1b,2,3,3c,3s,3x,3i,3t,3r,3n,3m,3k,3g, \

The arguments to MANSECTS are derived from the man subdirectories available. The number of subdirectories has increased dramatically in this release because each subsection has its own directory. This new structure improves the performance of the man command and gives you finer control over the search path. The next two figures compare the man directories for the two releases.

sunos4.1% ls /usr/share/man
man1/   man2/   man3/   man4/   man5/   man6/   man7/   man8/  
manl/   mann/

sunos5.6% ls /usr/share/man  man1f/  man3/   man3g/  man3n/  man3x/  man6/   man9f/
man1/   man1m/  man3b/  man3i/  man3r/  man4/   man7/   man9s/
man1b/  man1s/  man3c/  man3k/  man3s/  man4b/  man9/   manl/
man1c/  man2/   man3e/  man3m/  man3t/  man5/   man9e/  mann/