man

display online reference pages 

Command


SYNOPSIS

man [-wx] [-M path] [type] entry ...

man [-wx] [-T txt_indexes] [type] entry ...

man -h [-wx] [-C chm_indexes] [type] entry ...

man -H [-wx] [-P html_paths] [type] entry ...

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


DESCRIPTION

The man command either displays online reference pages or searches for reference pages that have specified keywords associated with them.

Normally, man displays the reference page for each specified entry. To display only a reference page of a given type, specify type on the command line. type is a number representing which type of reference pages to search. Reference pages come in the following types:

1	Commands and Utilities
3	Functions
4	File Formats
5	Miscellaneous

To indicate an operating system specific version of the entry (if one exists) or to indicate an command specific to a given set of commands and/or functions, append one of the following letters to the specified type:

n	for 7/2008R2/8/2012/10/2016
t	for Tcl

When output is sent to the terminal, man invokes a pager command to filter and display the reference pages. If MANPAGER is defined, it is used. If not, and if PAGER is defined, it is used. If neither is defined, man defaults to using the command more -A -s.

Options

-C filelist 

specifies a list of .idx files (corresponding to .chm files) to search instead of searching the files listed in MAN_CHM_INDEX.

-H 

launches the default web browser and displays the HTML version of the reference page. The reference page is found by searching each path listed in the MAN_HTM_PATHS environment variable (or indicated by the -P option) for an entry matching entry and type that indicates which page in the corresponding .chm file to display.

-h 

launches the HTML Help viewer and displays the HTML Help version of the reference page. The reference page is found by searching each .idx listed in the MAN_CHM_INDEX environment variable (or indicated by the -C option) for an entry matching entry and type that indicates which page in the corresponding .chm file to display.

-k 

searches a precomputed database of synopsis lines for information on keywords.

-M path 

searches the directories indicated by path for reference pages. If -M is not specified, man uses the path specified in the MANPATH environment variable if it is set; otherwise man searches $ROOTDIR/etc. All reference pages are found by searching similarly structured file trees rooted at one or more places. See the FILES section for a description of the files and directories man should find in each directory that it searches.

-P html_paths 

specifies a list of HTML paths to search instead of searching the paths listed in MAN_HTM_PATHS when looking for a HTML version of a reference page.

If this option is not specified and MAN_HTM_PATHS is not set, man searches $ROOTDIR/etc/htm by default. All reference pages are found by searching similarly structured file trees rooted at one or more places. See the FILES section for a description of the files and directories man should find in each directory that it searches.

-T filelist 

specifies a list of .idx files to search instead of searching the files listed in MAN_TXT_INDEX when looking for a text version of a reference page.

-w 

displays only the file name of the file containing the specified entry.

-x 

displays the files that man is searching as it tries to find the entry.

Search Rules

To find a given entry, man follows a set of search rules. When you specify a type, man searches for the appropriate page amongst pages of that type; otherwise, man looks for the first page named entry regardless of the type.

When the -h option is specified, man searches the .idx files listed in the MAN_CHM_INDEX environment variable for an entry matching the specified entry which indicates the HTML Help page in corresponding .chm to display. The HTML Help viewer is launched, displaying the page. Once you exit, the view, the man command exits.

When the -H is specified, man takes the following steps to find the entry. Once found, man launches the default web browser to display the reference page.

When neither -H nor -h is specified, man takes the following steps to find the entry. Once a step results in finding the entry, man displays the reference page and exits.

man.dbz File Format

Sometimes, the reference pages are kept in a single large file, called man.dbz. The file starts with a magic text string:

!<man database compressed>\n

and continues with the index:

14 bytes formatted reference page name
9 bytes seek pointer
9 bytes length

The name is simply the page name, followed by a dot and the type number. For example, this reference page would be named man.1. When man finds a matching entry, it seeks to the point in the file specified by the given seek pointer, and uncompresses for length bytes. Each reference page is compressed separately.


EXAMPLES

To find the utilities that do comparisons, type:

man -k compar

ENVIRONMENT VARIABLES

MAN_CHM_INDEX 

contains a semicolon separated list of .idx files to search for entry when the -h is specified.

MAN_TXT_INDEX 

contains a semicolon separated list of .idx files to search for entry when the -h is not specified.

MAN_HTM_PATHS 

contains a semicolon separated list of .idx paths to search for entry when the -H is specified.

MANPATH 

contains a semicolon separated list of paths to search for reference pages.

MANPAGER, PAGER 

contains an output filtering command for use when displaying reference pages on a terminal.

TMPDIR 

identifies the directory where temporary files reside.


FILES

$ROOTDIR/etc 

is the default directory for the online reference pages. The rest of the files listed here reside in this directory.

cat[0-9]/*.[0-9] 

pre-formatted reference pages in normal, compressed, or packed form.

htm/htm[0-9]/*.[0-9] 

HTML reference pages.

man[0-9]/*.[0-9] 

unformatted reference pages.

Note:

Unformated reference pages are not currently supported. Reference pages stored in these directories are treated as pre-formatted pages.

whatis 

is a database used by -k option.

*.chm 
chm/*.chm 

HTML Help files containing collections of reference pages complete with index, table of contents, and full text search.

*.idx 
chm/*.idx 

index files that man how to find HTML Help and text versions of individual reference files. The .idx files to search are indicated by the MAN_CHM_INDEX and MAN_TXT_INDEX environment variables.

man.dbz 

is a master file containing all reference pages.

The etc directory is found using the ROOTDIR environment variable.


DIAGNOSTICS

Possible exit status values are:

0 

Successful completion.

1 

Failure due to any of the following:

— unknown command line option
— missing path after an -M option
— no information available on the desired subject
— unable to create a child process to format reference page
— child process returned with non-zero exit status


PORTABILITY

POSIX.2. x/OPEN Portability Guide 4.0. All UNIX systems. Windows 7. Windows Server 2008 R2. Windows 8. Windows Server 2012. Windows 10. Windows Server 2016.

The -C, -H, -h, -M, -P, -T, -w, and -x options, the MANPAGER, MAN_HTM_PATHS, MAN_CHM_INDEX, and MAN_TXT_INDEX environment variables, the default pager, the ability to specify type on the command line, and the ability to display reference pages in HTML Help format are all extensions to the POSIX and XPG standards.


AVAILABILITY

PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC Integrity


SEE ALSO

Commands:
help, manstrip, more


PTC MKS Toolkit 10.1 Documentation Build 15.