DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

man(1)


man -- display reference manual pages

Synopsis

man [-] [-a | -F] [-bcw] [-d dir] [-M path] [-m macro-package ] [-p pager] [-s ] [-t proc] [-T term] [[section[:section: . . .]] title . . . ] [title]:[section] . . .

man [-M path] -k keyword . . .

man [-M path] -e | -f command . . .

Description

The man command locates and displays the manual page named title. man can also display a one-line summary selected either by keyword (-k) or by the name of an associated file (-e or -f).

Because UNIX® commands are lowercase, the title is almost always entered in lowercase. There are instances where title contains mixed upper and lowercase letters, such as the Intro pages.

man searches sections (if specified) for the titles. section is either a number or letter (sometimes followed by additional mnemonic letters or numbers indicating the type of manual page). To search a group of sections, separate the sections with colons (``:'') on the command line. If no section is specified, man searches all reference sections (giving preference to commands over functions) for title and displays the matching man pages.

Manual pages are HTML, formatted nroff(1bsd) source prepared with the -man macro package, or nroff source files.

SCO-supplied reference pages are located in directories under /usr/man[/LANG]/man/html.section, .../cat.section, and .../man.section. LANG is the locale name for non-English manual pages, and is omitted from the path for English-language pages, which are the default.

man can also locate man pages under any other directory named in the MANPATH environment vriable, whose system-wide default is located in the file /usr/default/man. The subdirectories can be named using the format cat1 and man1 through cat8 and man8 for compatibility with older versions of man.

man searches for the requested manual page in this order:

  1. html.section

    If man finds the manual page in this section, it stops searching and displays this page.

  2. cat.section
    man.section

    If man finds no HTML version, it searches these directories.

    If the most recent copy is in a man.section source directory, man reformats the version in the source directory and displays it using the default terminal type. man also places a display copy of the output in the cat.section directory for future use.


    NOTE: A file that must be processed takes longer to appear than a display copy.

  3. cat1 through cat8
    man1 through man8

    If man does not find the requested page in the man.section or cat.section directories, it searches these directories.

If no manual page is located, man prints an error message.

By default, man pipes its output through pg(1) to handle paging and underlining on the screen. If the standard output is not a terminal, or if the - flag is given, man pipes its output through cat(1).

The following options are available:


-
Pipes the output of man through cat instead of pg.

-a
Specifies ALL mode (incompatible with the -F option). man displays all manual pages with matching titles (equivalent to specifying MODE=ALL in /etc/default/man). See MODE.

-b
Leaves blank lines in output. Entries are normally padded with blank lines for line printer purposes; without this option, man filters out excess blank lines and does not display more than two consecutive blank lines.

-c
Invokes col(1) if the display does not support character formatting. col is invoked automatically by man unless the terminal (defined by -T term) is one of the following: 300, 300s, 450, 37, 4000a, 382, 4014, tek, 1620, or X.

-d dir
Specifies directory dir path to be added to the default search path. To specify several directories to search, separate the directory names with colons (``:'') on the command line.

-e, -f command . . .
man attempts to locate and display the names and short descriptions of manual pages related to the given commands. The commands can be separated by commas, or by spaces if the list is enclosed in quotes. The full name of command must be given; however, man is case-insensitive.

man -e and man -f are equivalent to whatis(1bsd).


-F file . . .
Specifies FIRST mode (incompatible with the -a option). man displays only the first matching title (equivalent to specifying MODE=FIRST in /etc/default/man). See MODE.

-k keyword . . .
man prints one-line summaries from the whatis(4) database that contain any of the given keywords.

man -k is equivalent to apropos(1bsd).


-m macro-package
man uses macro-package rather than the standard -man macros defined in /usr/ucblib/doctools/tmac/an for formatting manual pages (see man(5bsd)).

When specifying the -m option to man, you must give the full pathname:

man -m /usr/ucblib/doctools/tmac/bib ls


-M path
Specifies the search path for manual pages. path is a colon-separated list of directories that contain manual page directory subtrees. When used with the -k, -e, or -f options, the -M option must appear first. man assumes that each directory in path contains subdirectories of the form man.[1-8] followed by mnemonic strings that indicate the interface.

-p pager
Specifies a paging program pager to use to display the entry. Paging systems, such as more(1), pg(1), cat(1), or any other custom pagers are valid arguments for this option.

You can override the default pager, pg (set in /etc/default/man) by setting the environment variable PAGER to the name of another paging program. The pager defined by -p overrides both of these.


-s
Specify the manual page section name (section) to be used (the first argument after the options will be treated as section name(s). The man command first checks whether multiple section names (delimited by the ``:'' character) or sections 1 to 8 are specified. If not, man matches this argument with the existing man section names in the /etc/default/manSection file. If it finds a match, man treats this argument as a section name, otherwise it treats it as a man page title.

-t proc
Passes the unprocessed manual page to proc (where proc is nroff(1bsd), troff(1bsd), or any other command script in /usr/ucb). When used with -, -t troff results in the manual page being filtered as a PostScript file and sent to the printer.

-T term
Specifies the terminal type (see term(5) and ``Notices''). man formats the entry and passes the given term value to the processing program, then prints it on the standard output (usually, the terminal).

-w
Prints only the pathnames of the entries.

Default man settings

The /etc/default/man file contains the default settings for man. To select a different paging system, search path, terminal type, search order, mode, and processor for the man system, change the information in this file.

The following variables are set in /etc/default/man:


MANPATH
Changes or augments the default path that man searches for entries. man looks for the specified manual page title in the section directories in the order specified by MANPATH. Multiple directories set with this variable must be delimited by colon characters (``:'').

If the MANPATH environment variable is present, the directories are searched in the order that they appear.

The entry ``docview'' must appear in the MANPATH list for MANSERVER to be included in the search path. Alternate subdirectories are expected to have the same hierarchical structure as the default directories under /usr/man. See UNRESOLVED XREF-0.

If the man page is not found in the directories specified by MANPATH, man returns an error.

The -M option overrides this value.


MANPORT
Specifies the TCP port number for the remote manual page server (normally set to 8458).

MANSERVER
Defines the name of the host machine that is serving manual pages using DocView. If set to localhost (the default), man connects to the DocView server on the local system and searches for the pages locally. If MANSERVER specifies a remote manual page server, man opens a remote socket connection to the DocView server on the remote system.

MODE
If set to ALL, displays all matching manual pages. If set to FIRST, displays only the first matching title.

The -a and -F options override this value.


ORDER
Specifies the order in which to search the manual page sections for a specified manual page title if a section is not also specified. To change the search order for manual page sections, edit the list. Be certain the section names are separated with colons (``:''). Section names not specified in ORDER are searched in arbitrary order after those specified.

PAGER
Specifies the paging program to use to deliver the output of man to the screen. If not set, man uses more -s. See more(1).

The -p option overrides this value.


PROC
Specifies the name of the formatter to use by default when the -t flag is given.

TERM
Specifies the terminal type on which output is to be printed. The -T option overrides this value.

Environment variables

If set, the following environment variables override the default values defined in /etc/default/man: See ``Default man settings'' for the definitions of these variables.

Files


/etc/default/man
file containing the default settings for man

/usr/man[/LANG]
root of the standard manual page directory subtree

/usr/man[/LANG]/whatis
master merged keyword database used by man

/usr/ucblib/doctools/tmac/an
standard -man macro package

/usr/ucblib/pub/eqnchar
special character definitions for eqn(1bsd)

/usr/lib/locale/locale/uxcore
language-specific message file (see LANG in environ(5))

References

apropos(1bsd), cat(1), catman(1Mbsd), col(1), environ(5), eqn(1bsd), eqnchar(5bsd), index(4), lp(1), makewhatis(1M), man(5bsd), more(1), nroff(1bsd), refer(1bsd), term(5), tbl(1bsd), troff(1bsd), whatis(1bsd), whatis(4)

Notices

The entries in some equations and tables might be either lost or approximated if they cannot be reproduced exactly online.

Some dumb terminals cannot process the vertical motions produced by the -e (or -f) flag (see eqn(1bsd)). To prevent garbled output on these terminals, when you use -e, also use -c to invoke col(1) implicitly. This workaround has the disadvantage of eliminating superscripts and subscripts -- even on those terminals that can display them.

If a terminal gets confused by eqn output, use <Ctrl>q to clear the terminal.


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004