Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

apropos(1)

col(1)

nroff(1)

page(1)

tbl(1)

whatis(1)

whereis(1)

man(7)

catman(8)

man(1)

Name

man − displays manual pages online

Syntax

man −k keyword... 
man −f page_title... 
man [ options ] [ −roff_options ]... [ section ] page_title... 
man [ options ] [ section page_title...  ]...  /usr/bin/man [ option ] [ section ] page_title... 
/usr/bin/man [ options ] [ section page_title...  ]... 

Description

There are two man commands: /usr/ucb/man, and /usr/bin/man. For most users, /usr/ucb/man is the default man command.  The command

which man

shows you which man command is the default.  The recommended default is /usr/ucb/man.

Both the man commands provide online displays of specified reference pages.

The /usr/ucb/man Command.

The basic function of this command is to provide online displays of reference pages.  You can use options, however, to direct the man command to display one line summaries of reference pages which contain specific keywords, to display one line summaries of specific reference pages, to use special formatting options when preparing the reference page for display or printing, and to search alternate reference page directories for specified reference pages.

If an option is not used, the man command formats and displays one or more specified reference pages. If there are multiple reference pages which match a specified name, only the first matching reference page is displayed.  If there are multiple matches in a section for a specified name, the matching page in the first alphabetically occurring subsection is displayed.

If you specify the man command with a section argument, the man command looks in that section of the reference pages for the specified page titles. A section consists of a number in the range 0 to 9, optionally followed by an alphanumeric subsection, or section can be the name ‘local’, ‘new’, ‘old’, or ‘public’.  Numbers 0 and 9 are non-standard.  If a section is omitted, the man command searches all sections of the reference pages.   The man command displays commands (both standard and local) over subroutines in system libraries, and displays the first occurrence it finds, if any.  If Section 1 is specified, the sections n, l, and o are also searched, if they exist.

The section and page_title...  arguments can be paired, so that multiple pages can be searched for in a section, and multiple sections can be searched for a page or pages. 

All displays are directed to standard out, unless redirected, or unless the −t option is specified. If the standard output is a teletype device, the man command completes the following: pipes the output through the cat() command using the option −s to eliminate unnecessary blank lines and invokes the page() command using the option −s to display a screen at a time. 

If a specified reference page is not already formatted, but the source file exists, the man command preprocesses the file through the tbl() command. The command next pipes the output to the nroff() command, or to the troff command if the −t option was specified, using the man() macros package. If the tbl output was directed to the nroff command, the output is then piped through the col() postprocessor, then directed to standard out. If the appropriate /usr/man/cat? directory exists, the formatted display is saved there.

The /usr/bin/man Command

The /usr/bin/man command performs the same basic function as the /usr/ucb/man command, that is, formats and displays or prints specified reference pages.  It does not provide all the functions of /usr/ucb/man, and there are some differences in common functions.

The /usr/bin/man command searches for the specified reference pages, and formats and displays all reference pages matching the specified names. If no section is specified, all sections 1 through 8 are searched.  In the case of multiple matches, the display order is in numeric section order, and ASCII subsection order within a section. 

All displays are directed to standard out, unless redirected, or unless an option is used which requests processing through the troff command. If a troff option was not specified, then the standard output is to a teletype device. If the standard output is a teletype device, the /usr/bin/man pipes the output through the col() postprocessor, then directs the output to standard out.

The /usr/bin/man command does not use preformatted files.  It searches only the /usr/man/man[1-8] directories for source files.

If a specified file exists, it is always preprocessed through the tbl() command.

If an option is not used, the /usr/bin/man command formats and displays specified reference pages using the nroff command.

If multiple options are specified, only the last one is executed, except that multiple roff_options are accepted and executed. 

Options

/usr/ucb/man Options

The following options are recognized only by the /usr/ucb/man command.  Note that the options − and −k do not have the same functionality as the corresponding /usr/bin/man options.

−Squeeze multiple blank lines from output. 

−fDisplay one line summaries of each page title specified on the command line. 

−kDisplay one line summaries of each reference page that contains the specified keyword or keywords. 

−P manpathSearch the specified manpath directory instead of /usr/man.

−sRemove unnecessary blank lines. 

−tPhototypesets the output through the troff command.

This option requires the installation of the troff command, which is unsupported. When the −t option is specified, the troff output is directed, by lpr´s −t option, to the printer or typesetter specified by the PRINTER environment variable.  PRINTER must be set to a printer which is capable of handling troff output files.  The default is the lp printer (see lpr() description of the −t option for more information). 

/usr/bin/man Options

The following options are recognized by the /usr/bin/man command.  Note that the options − and −k do not have the same functionality as the corresponding /usr/ucb/man options.

−roff_options
Inserts the specified roff_option in front of the −man option when the appropriate *roff text formatter is called (the other options determine which *roff formatter is called).  Multiple roff_options can be specified.  If a null value is specified, the results are unpredictable. 

−e | −et | −te
Preproceses the display with the eqn command, then performs the same steps as the −t option.

This option requires the installation of the eqn and troff commands, which are unsupported.

−ek | −kePreproceses the display with the eqn command, then performs the same steps as the −k option.

This option requires the installation of the eqn, tc, and troff commands, which are unsupported.

−kFormats the display through the troff command, using troff’s −t option, then directs the output to the tc command.

This option requires the installation of the tc and troff commands, which are unsupported.

−nFormats the display through the nroff command.  This is the default.

−ne | −enPreproceses the display with the neqn command, then performs the same steps as the −n option.

This option requires the installation of the neqn command, which is unsupported.

−tPhotypesets the output through the troff command.

This option requires the installation of the troff command, which is unsupported.

−wShows where the specified reference pages are located, relative to the /usr/man directory.

Restrictions

The reference pages are reproducible on phototypesetters or on hardcopy devices.  However, some devices do not properly handle special characters which causes information to be lost. 

Some options require the installation of unsupported software.  Use of these options is at your own risk. 

Options which call the neqn or eqn commands will generally fail when used with the ULTRIX reference pages, because any ULTRIX reference pages which use *eqn commands were preprocessed through the neqn text formatter before being packaged for shipment to you. *eqn text preprocessors generally report numerous errors when attempts are made to reprocess files a second time through an *eqn text preprocessor.

Both /usr/ucb/man and /usr/bin/man commands cd to the /usr/man directory before searching for and formatting files.  Some reference pages assume that this happens.  Therefore, an attempt to format some reference pages manually with a *roff text formatter may fail if you are not sitting in the /usr/man directory.

/usr/ucb/man Restrictions

If a specified reference page exists in the appropriate /usr/man/man? directory, but there is no appropriate /usr/man/cat? directory, you will not be able to scroll backwards in the display.

The man directories for sections n, l, o, p, 0 and 9 are optional directories. They must be created by the system administrator. 

The /usr/man/cat? directories are not required to exist.  They must be created by the system administrator.  This is generally done through the catman() command.

Examples

/usr/ucb/man Examples

The following examples all assume the use of the default command: /usr/ucb/man.

The following example shows how to locate reference pages containing the keyword ‘graph’:

% man −k graph

The following example shows how to display the graph() reference page:

% man 1g graph

The following example shows how to display plot reference pages:

% man 1 plot 3 plot

The following example shows how to display chmod and chown reference pages:

% man 1 chmod chown 2 chmod chown

The following example shows how to display a reference page test in the /usr/man/manl directory.  In order to locate the test reference page here, it must have the file name test.l, so its reference page title would be test(.).

% man local test

To locate the test reference pages in Section 1:

% man 1 test 1sh5 test

If you have a directory /usr/local/man which contains man? subdirectories, which also contain reference pages, then the following example shows how to display a reference page games located somewhere in a subdirectory of /usr/local/man:

% man −P /usr/local games

/usr/bin/man Examples

The following example shows how to display chmod reference pages:

% /usr/bin/man chmod

The above displays all the chmod reference pages from all sections of the installed reference pages.

The following example shows how to display all the test reference pages in Section 1:

% /usr/bin/man 1 test

The following example shows how to locate all the test reference pages:

% /usr/bin/man −w test

The following example shows how to locate all the intro reference pages in Section 3:

% /usr/bin/man −w 3 intro

The following example displays the man() reference page with a starting page number of 10.

% /usr/bin/man −n10 1 man

Files

/usr/ucb/man The default man command.

/usr/bin/man The alternate man command.

/usr/man/man?/* These directories contain the online reference pages which are divided into sections 1 through 8, n, l, o, and p.  Sections 0 and 9 can also exist but these are non-standard sections. 

/usr/man/cat?/* These directories contain the files generated by the man and catman commands.

/usr/lib/whatis This file contains the summary lines of each reference page. 

manpath/man/man?/*
These directories contain reference pages to be searched by the man command when the −P manpath option is specified. These directories must have the same organization and format as /usr/man.

See Also

apropos(1), col(1), nroff(1), page(1), tbl(1), whatis(1), whereis(1), man(7), catman(8)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026