MAN(1) | General Commands Manual | MAN(1) |
man
—
man |
[-acfhklw ] [-C
file] [-M
path] [-m
path] [-S
subsection] [[-s ]
section] name ... |
man
utility displays the manual pages entitled
name. Pages may be selected according to a specific
category (section) or machine architecture
(subsection).
The options are as follows:
-a
-C
file-c
When using -c
, most terminal devices
are unable to show the markup. To print the output of
man
to the terminal with markup but without
using a pager, pipe it to ul(1). To
remove the markup, pipe the output to
col(1) -b
instead.
-f
-h
-a
and -c
.-k
-l
-w
are ignored. This option implies
-a
.-M
pathman
searches for manual pages. The supplied
path must be a colon
(‘:
’) separated list of directories.
This search path may also be set using the environment variable
MANPATH
.-m
pathman
searches for manual pages. The supplied path must be
a colon (‘:
’) separated list of
directories. These directories will be searched before the standard
directories or the directories specified using the
-M
option or the MANPATH
environment variable.-S
subsectionBy default manual pages for all architectures are installed. Therefore this option can be used to view pages for one architecture whilst using another.
This option overrides the MACHINE
environment variable.
-s
] sectionIf not specified and a match is found in more than one section, the first match is selected from the following list: 1, 8, 6, 2, 3, 5, 7, 4, 9, 3p.
-w
The options -IKOTW
are also supported and
are documented in mandoc(1). The options
-fkl
are mutually exclusive and override each
other.
Guidelines for writing man pages can be found in mdoc(7).
If both a formatted and an unformatted version of the same manual page, for example cat1/foo.0 and man1/foo.1, exist in the same directory, only the unformatted version is used.
MACHINE
man
searches any subdirectories, with the same
name as the current architecture, in every directory which it searches.
Machine specific areas are checked before general areas. The current
machine type may be overridden by setting the environment variable
MACHINE
to the name of a specific architecture, or
with the -S
option.
MACHINE
is case insensitive.MANPAGER
MANPAGER
is used instead of the standard
pagination program, more(1). If
less(1) is used, the interactive
:t
command can be used to go to the definitions of
various terms, for example command line options, command modifiers,
internal commands, environment variables, function names, preprocessor
macros, errno(2) values, and some other
emphasized words. Some terms may have defining text at more than one
place. In that case, the less(1)
interactive commands t
and
T
can be used to move to the next and to the
previous place providing information about the term last searched for with
:t
. The -O
tag
[=term] option documented
in the mandoc(1) manual opens a manual
page at the definition of a specific term rather
than at the beginning.MANPATH
man
may be
changed by specifying a path in the MANPATH
environment variable. The format of the path is a colon
(‘:
’) separated list of directories.
Invalid paths are ignored. Overridden by -M
,
ignored if -l
is specified.
If MANPATH
begins with a colon, it is
appended to the default list; if it ends with a colon, it is prepended
to the default list; or if it contains two adjacent colons, the standard
search path is inserted between the colons. If none of these conditions
are met, it overrides the standard search path.
PAGER
MANPAGER
is not defined. If neither PAGER nor
MANPAGER is defined, more(1)
-s
is used.man
utility exits 0 on success,
and >0 if an error occurs. See
mandoc(1) for details.
$ man -T ascii -O width=65 pledge |
col -b
Read a typeset page in a PDF viewer:
$ MANPAGER=mupdf man -T pdf
lpd
man
utility is compliant with the
IEEE Std 1003.1-2008 (“POSIX.1”)
specification.
The flags [-aCcfhIKlMmOSsTWw
], as well as
the environment variables MACHINE
,
MANPAGER
, and MANPATH
, are
extensions to that specification.
man
command first appeared in
Version 3 AT&T UNIX.
The -w
option first appeared in
Version 7 AT&T UNIX;
-f
and -k
in
4BSD; -M
in
4.3BSD; -a
in
4.3BSD-Tahoe; -c
and
-m
in 4.3BSD-Reno;
-h
in 4.3BSD-Net/2;
-C
in NetBSD 1.0;
-s
and -S
in
OpenBSD 2.3; and -I
,
-K
, -l
,
-O
, and -W
in
OpenBSD 5.7. The -T
option
first appeared in AT&T System III UNIX
and was also added in OpenBSD 5.7.
November 22, 2018 | OpenBSD-current |