Solaris Transition Guide

Man Page Organization Differences

Man page organization has changed to be compatible with SVR4 organization. As a result, some sections have been renamed. For example, man(8) is now man(1M).

Table 6-4 shows SunOS release 5.7 man page directories.

Table 6-4 SunOS release 5.7 man Page Directories

/man Directory

Contents 

Suffixes 

man1

User commands 

1B - SunOS/BSD compatibility commands 

 

 

1C - Communication commands 

 

 

1F - FMLI commands 

 

 

1S - SunOS commands 

man1M

System administration commands 

 

man2

System calls 

 

man3

Library functions 

3B - SunOS/BSD compatibility libraries 

 

 

3C - C library functions 

 

 

3E - ELF library functions 

 

 

3G - C library functions 

 

 

3I - Wide Character functions 

 

 

3K - Kernel VM library functions 

 

 

3M - Math library 

 

 

3N - Network functions 

 

 

3R - RPC services library 

 

 

3S - Standard I/O functions 

 

 

3T - Threads library functions 

 

 

3X - Miscellaneous library functions 

man4

File formats 

4B - SunOS/BSD compatibility file formats 

man5

Headers, tables, and macros 

 

man7

Special files 

 

man9

DDI/DKI 

 

man9E

DDI/DKI entry points 

 

man9F

DDI/DKI kernel functions 

 

man9S

DDI/DKI data structures 

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, man.cf.

Each component of the MANPATH environment variable can contain a different man.cf file. You can modify man.cf 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, \
3e,3b,9f,9s,9e,9,4,5,7,4b,6,l,n

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
man.cf  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/

whatis and windex Databases

The SunOS release 4 man page table of contents and keyword database is called whatis. In the SunOS release 5.7 software, this information is in the windex file. In both releases, the database is created by the catman command, and is used by the man, apropos, and whatis commands.

The windex file also has a slightly different format than the whatis file, as you can see from the following comparison of the two release versions.

sunos4.1% man -k tset
tset, reset (1)    - establish or restore terminal characteristics

sunos5.6% man -k tset
reset  tset (1b)   - establish or restore terminal characteristics
tset   tset (1b)   - establish or restore terminal characteristics

Using the man Command

Table 6-5 shows that SunOS release 5.7 version of the man command has additional search options.

Table 6-5 New man Command Options

Option 

Description 

-a

Displays all man pages that match file name. The pages are displayed sequentially in the order they are found.

-l

Lists all man pages that match file name. You can use the output of this command to specify a section number with the -s option.

-s section-number

Searches section-number for file name. In the SunOS release 4 software, the man command accepted the section number as an option; in this release, the section number must be preceded by -s.

-F

Forces the man command to search all directories until file name is found. This option overrides the windex database and the man.cf file.

See the man(1) man page for a complete description of the SunOS release 5.7 man command.