Previous | Table of Contents | Next |
DESCRIPTION
The external man command searches for the on-line copy of the UNIX Reference Manual entry for a particular command. If found, the manual entry is formated and displayed to your screen. The manuals are often refered to as "man pages." There is one man page entry per command.
NOTE:
Some vendors no longer distribute System V Release 3.0 or later versions with on-line manual pages. Therefore, the man command does not exist. In most cases it has been replaced by the help facility. Which, unfortunately, seems to vary widely between vendors.
COMMAND FORMAT
Following is the general format of the man command.
man [ - ] [ -M path ] [ section ] title man [ - ] [ -M path ] [ -f file ] man [ - ] [ -M path ] [ -k keyword ]
|
|
System V | |
---|---|
If the vendor supports it, it may vary from the following. | |
man [ -cdw ] [ -Tterm ] [ section ] titles | |
|
Options
The following list describes the options and their arguments that may be used to control how man functions.
- | The formatted output from man is piped into the more command. The -s option of more is used to remove duplicate blank lines. Thus the formatted text is displayed to your terminal one page at a time. Refer to Module 90 for more information on the more command. |
-M path | Provides a path of directories searched for manual subdirectories. Normally man searches the subdirectories in the /usr/man directory. If -M is used, man searches each of the directories in path for subdirectories that contain man entries. For example, |
-M /usr/local:/share/man | |
causes man to search the /usr/local/man* and /share/man/man* directories for manual entries. | |
-k keyword | See the apropos command. |
-f file | See the whatis command. |
|
|
System V | |
---|---|
-c | Causes col to be invoked. Invoked as a default. For more information about the col command refer to Module 21. |
-d | Search current directory for entry. man defaults to the /usr/catman or /usr/man directory structure. Full man page entry name must be given (e.g. use cat.1, not cat). |
-w | Display where the entry resides using the /usr/man path. The man entry is NOT formated and displayed. If -d is specified then the current directory is searched. |
-Tterm | Format the entry for displaying on the given terminal type term. The default for term is 450. The value of the TERM variable is used as the output device if the -T option is not used. |
|
Arguments
The following list describes the arguments that may be passed to the man command.
section | The section of the manual you want man to search. There are typically seven sections of the man pages. man searches all seven sections if you do not specify a section. You may specify a section before each title. | |
local | Format a local entry. Local entries are located in the /usr/man/manl directory (l as in local, not the number one). Each entry (file) in this directory must end with the .l suffix. You can add your own entries to this directory. | |
new | Search for and format a new man page entry. | |
old | Search for and format an old man page entry. | |
public | Search for and format a public man page entry. | |
title | The name of the command you want man to search for and format to your screen. Multiple titles may be given. All titles should be entered in lowercase letters (considering all commands are supposed to be lowercase). |
|
|
System V | |
---|---|
local | Usually not supported. |
|
FURTHER DISCUSSION
The on-line copy of the Reference Manual is not always available to you. If you are on a small system or your system was running low on disk storage, the system administrator may have removed some of all of the manual entries to gain disk space. The entries use up approxiatmately 3 megabytes of storage.
The following is a description of each section and the layout of the manuals in their on-line and physical format.
Sections
There are twelve sections of the reference manuals. They are:
|
|
Section | Description |
---|---|
|
|
1 | Commands and Application Programs |
2 | System Calls (used in programming languages) |
3 | Subroutines (used in programming languages) |
4 | File Formats |
5 | Miscellaneous |
6 | Games |
7 | Special Files |
8 | System Maintenance Procedures |
local | Locally written man pages (third party software man pages.) |
public | Public domain software man pages. |
new | New software man pages. |
old | Old/obsolete software man pages. |
|
Some of the sections listed have subsections. The numbers of the sections follow the name of a command in parentheses. For example, cat(1) informs you that you can find the entry for the cat command in section 1 of the reference manual. The notation cu(1C) informs you that the cu command is used for communications. The following list describes the subsections.
|
|
Subsection | Description |
---|---|
|
|
1C | Section 1, Communications |
1G | Section 1, Graphics |
1M | Section 1, Maintenance (System Adminstration) |
3C | Section 3, C programming language |
3F | Section 3, Fortran programming language |
3M | Section 3, Miscellaneous programming routines |
|
Physical Layout
There are three reference manuals containing only the entries relavent to the named audience. They are:
On-line Layout
The on-line copy of the reference manual resides in these corresponding directories:
|
||
System V | ||
---|---|---|
/usr/man/u_man/man[16] | ||
/usr/man/p_man/man[12345] | ||
/usr/man/a_man/man[178] | ||
|
For more information on how to read a man page refer to the Introduction of a Reference Manual. Each vendor may implement the manuals as they desire. Most BSD type vendors support the BSD man page layout while most System V vendors that support the man pages tend to follow the AT&T standard.
DIAGNOSTICS AND BUGS
The man pages that are already formated in the catman directory were formated for a type 37 terminal, therefore, they may not display correctly on your terminal. To reformat for your terminal use the -T option. If you want to send a man page to a typesetting device, you must again use the -T option and pipe your man command into the lp (lpr) command. It may be worth your time and effort to request assistance from your system administrator on this subject.
RELATED FILES
The man command writes to the standard output. It searches the following directories:
|
|
System V | |
---|---|
/usr/man/?_man/man[1-8]/* | |
/usr/catman/?_man/man[1-8]/* | |
|
APPLICATIONS
The man command is used to display the reference manuals for the current UNIX system. It provides on-line documentation for every standard command. As UNIX becomes more user friendly some of the systems have removed the man command and provided the help command.
TYPICAL OPERATION
In this activity you use the man command to generate the man page for the pwd command. Begin at the shell prompt.
Previous | Table of Contents | Next |