diff --git a/ls/line command.txt b/ls/line command.txt new file mode 100644 index 0000000..6469960 --- /dev/null +++ b/ls/line command.txt @@ -0,0 +1 @@ +pandoc -V geometry:paperheight=8.5in,paperwidth=5.5in,left=1cm,right=1cm,top=1cm,bottom=2cm ls.1 -o ls-test4.pdf diff --git a/ls/ls-test.pdf b/ls/ls-test.pdf new file mode 100644 index 0000000..97f0235 Binary files /dev/null and b/ls/ls-test.pdf differ diff --git a/ls/ls-test2.pdf b/ls/ls-test2.pdf new file mode 100644 index 0000000..fb9b3d8 Binary files /dev/null and b/ls/ls-test2.pdf differ diff --git a/ls/ls-test3.pdf b/ls/ls-test3.pdf new file mode 100644 index 0000000..7d412cc Binary files /dev/null and b/ls/ls-test3.pdf differ diff --git a/ls/ls-test4.pdf b/ls/ls-test4.pdf new file mode 100644 index 0000000..d106a41 Binary files /dev/null and b/ls/ls-test4.pdf differ diff --git a/ls/ls.1 b/ls/ls.1 new file mode 100644 index 0000000..4c4e6f0 --- /dev/null +++ b/ls/ls.1 @@ -0,0 +1,259 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. +.TH LS "1" "September 2019" "GNU coreutils 8.30" "User Commands" +.SH NAME +ls \- list directory contents +.SH SYNOPSIS +.B ls +[\fI\,OPTION\/\fR]... [\fI\,FILE\/\fR]... +.SH DESCRIPTION +.\" Add any additional description here +.PP +List information about the FILEs (the current directory by default). +Sort entries alphabetically if none of \fB\-cftuvSUX\fR nor \fB\-\-sort\fR is specified. +.PP +Mandatory arguments to long options are mandatory for short options too. +.TP +\fB\-a\fR, \fB\-\-all\fR +do not ignore entries starting with . +.TP +\fB\-A\fR, \fB\-\-almost\-all\fR +do not list implied . and .. +.TP +\fB\-\-author\fR +with \fB\-l\fR, print the author of each file +.TP +\fB\-b\fR, \fB\-\-escape\fR +print C\-style escapes for nongraphic characters +.TP +\fB\-\-block\-size\fR=\fI\,SIZE\/\fR +with \fB\-l\fR, scale sizes by SIZE when printing them; +e.g., '\-\-block\-size=M'; see SIZE format below +.TP +\fB\-B\fR, \fB\-\-ignore\-backups\fR +do not list implied entries ending with ~ +.TP +\fB\-c\fR +with \fB\-lt\fR: sort by, and show, ctime (time of last +modification of file status information); +with \fB\-l\fR: show ctime and sort by name; +otherwise: sort by ctime, newest first +.TP +\fB\-C\fR +list entries by columns +.TP +\fB\-\-color\fR[=\fI\,WHEN\/\fR] +colorize the output; WHEN can be 'always' (default +if omitted), 'auto', or 'never'; more info below +.TP +\fB\-d\fR, \fB\-\-directory\fR +list directories themselves, not their contents +.TP +\fB\-D\fR, \fB\-\-dired\fR +generate output designed for Emacs' dired mode +.TP +\fB\-f\fR +do not sort, enable \fB\-aU\fR, disable \fB\-ls\fR \fB\-\-color\fR +.TP +\fB\-F\fR, \fB\-\-classify\fR +append indicator (one of */=>@|) to entries +.TP +\fB\-\-file\-type\fR +likewise, except do not append '*' +.TP +\fB\-\-format\fR=\fI\,WORD\/\fR +across \fB\-x\fR, commas \fB\-m\fR, horizontal \fB\-x\fR, long \fB\-l\fR, +single\-column \fB\-1\fR, verbose \fB\-l\fR, vertical \fB\-C\fR +.TP +\fB\-\-full\-time\fR +like \fB\-l\fR \fB\-\-time\-style\fR=\fI\,full\-iso\/\fR +.TP +\fB\-g\fR +like \fB\-l\fR, but do not list owner +.TP +\fB\-\-group\-directories\-first\fR +group directories before files; +.IP +can be augmented with a \fB\-\-sort\fR option, but any +use of \fB\-\-sort\fR=\fI\,none\/\fR (\fB\-U\fR) disables grouping +.TP +\fB\-G\fR, \fB\-\-no\-group\fR +in a long listing, don't print group names +.TP +\fB\-h\fR, \fB\-\-human\-readable\fR +with \fB\-l\fR and \fB\-s\fR, print sizes like 1K 234M 2G etc. +.TP +\fB\-\-si\fR +likewise, but use powers of 1000 not 1024 +.TP +\fB\-H\fR, \fB\-\-dereference\-command\-line\fR +follow symbolic links listed on the command line +.TP +\fB\-\-dereference\-command\-line\-symlink\-to\-dir\fR +follow each command line symbolic link +.IP +that points to a directory +.TP +\fB\-\-hide\fR=\fI\,PATTERN\/\fR +do not list implied entries matching shell PATTERN +(overridden by \fB\-a\fR or \fB\-A\fR) +.TP +\fB\-\-hyperlink\fR[=\fI\,WHEN\/\fR] +hyperlink file names; WHEN can be 'always' +(default if omitted), 'auto', or 'never' +.TP +\fB\-\-indicator\-style\fR=\fI\,WORD\/\fR +append indicator with style WORD to entry names: +none (default), slash (\fB\-p\fR), +file\-type (\fB\-\-file\-type\fR), classify (\fB\-F\fR) +.TP +\fB\-i\fR, \fB\-\-inode\fR +print the index number of each file +.TP +\fB\-I\fR, \fB\-\-ignore\fR=\fI\,PATTERN\/\fR +do not list implied entries matching shell PATTERN +.TP +\fB\-k\fR, \fB\-\-kibibytes\fR +default to 1024\-byte blocks for disk usage; +used only with \fB\-s\fR and per directory totals +.TP +\fB\-l\fR +use a long listing format +.TP +\fB\-L\fR, \fB\-\-dereference\fR +when showing file information for a symbolic +link, show information for the file the link +references rather than for the link itself +.TP +\fB\-m\fR +fill width with a comma separated list of entries +.TP +\fB\-n\fR, \fB\-\-numeric\-uid\-gid\fR +like \fB\-l\fR, but list numeric user and group IDs +.TP +\fB\-N\fR, \fB\-\-literal\fR +print entry names without quoting +.TP +\fB\-o\fR +like \fB\-l\fR, but do not list group information +.TP +\fB\-p\fR, \fB\-\-indicator\-style\fR=\fI\,slash\/\fR +append / indicator to directories +.TP +\fB\-q\fR, \fB\-\-hide\-control\-chars\fR +print ? instead of nongraphic characters +.TP +\fB\-\-show\-control\-chars\fR +show nongraphic characters as\-is (the default, +unless program is 'ls' and output is a terminal) +.TP +\fB\-Q\fR, \fB\-\-quote\-name\fR +enclose entry names in double quotes +.TP +\fB\-\-quoting\-style\fR=\fI\,WORD\/\fR +use quoting style WORD for entry names: +literal, locale, shell, shell\-always, +shell\-escape, shell\-escape\-always, c, escape +(overrides QUOTING_STYLE environment variable) +.TP +\fB\-r\fR, \fB\-\-reverse\fR +reverse order while sorting +.TP +\fB\-R\fR, \fB\-\-recursive\fR +list subdirectories recursively +.TP +\fB\-s\fR, \fB\-\-size\fR +print the allocated size of each file, in blocks +.TP +\fB\-S\fR +sort by file size, largest first +.TP +\fB\-\-sort\fR=\fI\,WORD\/\fR +sort by WORD instead of name: none (\fB\-U\fR), size (\fB\-S\fR), +time (\fB\-t\fR), version (\fB\-v\fR), extension (\fB\-X\fR) +.TP +\fB\-\-time\fR=\fI\,WORD\/\fR +with \fB\-l\fR, show time as WORD instead of default +modification time: atime or access or use (\fB\-u\fR); +ctime or status (\fB\-c\fR); also use specified time +as sort key if \fB\-\-sort\fR=\fI\,time\/\fR (newest first) +.TP +\fB\-\-time\-style\fR=\fI\,TIME_STYLE\/\fR +time/date format with \fB\-l\fR; see TIME_STYLE below +.TP +\fB\-t\fR +sort by modification time, newest first +.TP +\fB\-T\fR, \fB\-\-tabsize\fR=\fI\,COLS\/\fR +assume tab stops at each COLS instead of 8 +.TP +\fB\-u\fR +with \fB\-lt\fR: sort by, and show, access time; +with \fB\-l\fR: show access time and sort by name; +otherwise: sort by access time, newest first +.TP +\fB\-U\fR +do not sort; list entries in directory order +.TP +\fB\-v\fR +natural sort of (version) numbers within text +.TP +\fB\-w\fR, \fB\-\-width\fR=\fI\,COLS\/\fR +set output width to COLS. 0 means no limit +.TP +\fB\-x\fR +list entries by lines instead of by columns +.TP +\fB\-X\fR +sort alphabetically by entry extension +.TP +\fB\-Z\fR, \fB\-\-context\fR +print any security context of each file +.TP +\fB\-1\fR +list one file per line. Avoid '\en' with \fB\-q\fR or \fB\-b\fR +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +output version information and exit +.PP +The SIZE argument is an integer and optional unit (example: 10K is 10*1024). +Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,... (powers of 1000). +.PP +The TIME_STYLE argument can be full\-iso, long\-iso, iso, locale, or +FORMAT. +FORMAT is interpreted like in date(1). If FORMAT is FORMAT1FORMAT2, +then FORMAT1 applies to non\-recent files and FORMAT2 to recent files. +TIME_STYLE prefixed with 'posix\-' takes effect only outside the POSIX locale. +Also the TIME_STYLE environment variable sets the default style to use. +.PP +Using color to distinguish file types is disabled both by default and +with \fB\-\-color\fR=\fI\,never\/\fR. With \fB\-\-color\fR=\fI\,auto\/\fR, ls emits color codes only when +standard output is connected to a terminal. The LS_COLORS environment +variable can change the settings. Use the dircolors command to set it. +.SS "Exit status:" +.TP +0 +if OK, +.TP +1 +if minor problems (e.g., cannot access subdirectory), +.TP +2 +if serious trouble (e.g., cannot access command\-line argument). +.SH AUTHOR +Written by Richard M. Stallman and David MacKenzie. +.SH "REPORTING BUGS" +GNU coreutils online help: +.br +Report ls translation bugs to +.SH COPYRIGHT +Copyright \(co 2018 Free Software Foundation, Inc. +License GPLv3+: GNU GPL version 3 or later . +.br +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +.SH "SEE ALSO" +Full documentation at: +.br +or available locally via: info \(aq(coreutils) ls invocation\(aq diff --git a/ls/ls.pdf b/ls/ls.pdf new file mode 100644 index 0000000..602d022 Binary files /dev/null and b/ls/ls.pdf differ diff --git a/ls/ls.ps b/ls/ls.ps new file mode 100644 index 0000000..df86e7d --- /dev/null +++ b/ls/ls.ps @@ -0,0 +1,214 @@ +

NAME

+

ls - list directory contents

+

SYNOPSIS

+

ls [OPTION]... [FILE]...

+

DESCRIPTION

+

List information about the FILEs (the current directory by default). Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.

+

Mandatory arguments to long options are mandatory for short options too.

+
+
-a, --all
+

do not ignore entries starting with .

+
+
-A, --almost-all
+

do not list implied . and ..

+
+
--author
+

with -l, print the author of each file

+
+
-b, --escape
+

print C-style escapes for nongraphic characters

+
+
--block-size=SIZE
+

with -l, scale sizes by SIZE when printing them; e.g., '--block-size=M'; see SIZE format below

+
+
-B, --ignore-backups
+

do not list implied entries ending with ~

+
+
-c
+

with -lt: sort by, and show, ctime (time of last modification of file status information); with -l: show ctime and sort by name; otherwise: sort by ctime, newest first

+
+
-C
+

list entries by columns

+
+
--color[=WHEN]
+

colorize the output; WHEN can be 'always' (default if omitted), 'auto', or 'never'; more info below

+
+
-d, --directory
+

list directories themselves, not their contents

+
+
-D, --dired
+

generate output designed for Emacs' dired mode

+
+
-f
+

do not sort, enable -aU, disable -ls --color

+
+
-F, --classify
+

append indicator (one of */=>@|) to entries

+
+
--file-type
+

likewise, except do not append '*'

+
+
--format=WORD
+

across -x, commas -m, horizontal -x, long -l, single-column -1, verbose -l, vertical -C

+
+
--full-time
+

like -l --time-style=full-iso

+
+
-g
+

like -l, but do not list owner

+
+
--group-directories-first
+

group directories before files;

+

can be augmented with a --sort option, but any use of --sort=none (-U) disables grouping

+
+
-G, --no-group
+

in a long listing, don't print group names

+
+
-h, --human-readable
+

with -l and -s, print sizes like 1K 234M 2G etc.

+
+
--si
+

likewise, but use powers of 1000 not 1024

+
+
-H, --dereference-command-line
+

follow symbolic links listed on the command line

+
+
--dereference-command-line-symlink-to-dir
+

follow each command line symbolic link

+

that points to a directory

+
+
--hide=PATTERN
+

do not list implied entries matching shell PATTERN (overridden by -a or -A)

+
+
--hyperlink[=WHEN]
+

hyperlink file names; WHEN can be 'always' (default if omitted), 'auto', or 'never'

+
+
--indicator-style=WORD
+

append indicator with style WORD to entry names: none (default), slash (-p), file-type (--file-type), classify (-F)

+
+
-i, --inode
+

print the index number of each file

+
+
-I, --ignore=PATTERN
+

do not list implied entries matching shell PATTERN

+
+
-k, --kibibytes
+

default to 1024-byte blocks for disk usage; used only with -s and per directory totals

+
+
-l
+

use a long listing format

+
+
-L, --dereference
+

when showing file information for a symbolic link, show information for the file the link references rather than for the link itself

+
+
-m
+

fill width with a comma separated list of entries

+
+
-n, --numeric-uid-gid
+

like -l, but list numeric user and group IDs

+
+
-N, --literal
+

print entry names without quoting

+
+
-o
+

like -l, but do not list group information

+
+
-p, --indicator-style=slash
+

append / indicator to directories

+
+
-q, --hide-control-chars
+

print ? instead of nongraphic characters

+
+
--show-control-chars
+

show nongraphic characters as-is (the default, unless program is 'ls' and output is a terminal)

+
+
-Q, --quote-name
+

enclose entry names in double quotes

+
+
--quoting-style=WORD
+

use quoting style WORD for entry names: literal, locale, shell, shell-always, shell-escape, shell-escape-always, c, escape (overrides QUOTING_STYLE environment variable)

+
+
-r, --reverse
+

reverse order while sorting

+
+
-R, --recursive
+

list subdirectories recursively

+
+
-s, --size
+

print the allocated size of each file, in blocks

+
+
-S
+

sort by file size, largest first

+
+
--sort=WORD
+

sort by WORD instead of name: none (-U), size (-S), time (-t), version (-v), extension (-X)

+
+
--time=WORD
+

with -l, show time as WORD instead of default modification time: atime or access or use (-u); ctime or status (-c); also use specified time as sort key if --sort=time (newest first)

+
+
--time-style=TIME_STYLE
+

time/date format with -l; see TIME_STYLE below

+
+
-t
+

sort by modification time, newest first

+
+
-T, --tabsize=COLS
+

assume tab stops at each COLS instead of 8

+
+
-u
+

with -lt: sort by, and show, access time; with -l: show access time and sort by name; otherwise: sort by access time, newest first

+
+
-U
+

do not sort; list entries in directory order

+
+
-v
+

natural sort of (version) numbers within text

+
+
-w, --width=COLS
+

set output width to COLS. 0 means no limit

+
+
-x
+

list entries by lines instead of by columns

+
+
-X
+

sort alphabetically by entry extension

+
+
-Z, --context
+

print any security context of each file

+
+
-1
+

list one file per line. Avoid '\n' with -q or -b

+
+
--help
+

display this help and exit

+
+
--version
+

output version information and exit

+
+
+

The SIZE argument is an integer and optional unit (example: 10K is 10*1024). Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,... (powers of 1000).

+

The TIME_STYLE argument can be full-iso, long-iso, iso, locale, or +FORMAT. FORMAT is interpreted like in date(1). If FORMAT is FORMAT1<newline>FORMAT2, then FORMAT1 applies to non-recent files and FORMAT2 to recent files. TIME_STYLE prefixed with 'posix-' takes effect only outside the POSIX locale. Also the TIME_STYLE environment variable sets the default style to use.

+

Using color to distinguish file types is disabled both by default and with --color=never. With --color=auto, ls emits color codes only when standard output is connected to a terminal. The LS_COLORS environment variable can change the settings. Use the dircolors command to set it.

+

Exit status:

+
+
0
+

if OK,

+
+
1
+

if minor problems (e.g., cannot access subdirectory),

+
+
2
+

if serious trouble (e.g., cannot access command-line argument).

+
+
+

AUTHOR

+

Written by Richard M. Stallman and David MacKenzie.

+

REPORTING BUGS

+

GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
+Report ls translation bugs to <https://translationproject.org/team/>

+

COPYRIGHT

+

Copyright © 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
+This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

+

SEE ALSO

+

Full documentation at: <https://www.gnu.org/software/coreutils/ls>
+or available locally via: info '(coreutils) ls invocation'

diff --git a/ls/lsa5.pdf b/ls/lsa5.pdf new file mode 100644 index 0000000..c96a8a7 Binary files /dev/null and b/ls/lsa5.pdf differ diff --git a/ls/lsearch.3 b/ls/lsearch.3 new file mode 100644 index 0000000..88a5188 --- /dev/null +++ b/ls/lsearch.3 @@ -0,0 +1,111 @@ +.\" Copyright 1995 Jim Van Zandt +.\" +.\" %%%LICENSE_START(VERBATIM) +.\" Permission is granted to make and distribute verbatim copies of this +.\" manual provided the copyright notice and this permission notice are +.\" preserved on all copies. +.\" +.\" Permission is granted to copy and distribute modified versions of this +.\" manual under the conditions for verbatim copying, provided that the +.\" entire resulting derived work is distributed under the terms of a +.\" permission notice identical to this one. +.\" +.\" Since the Linux kernel and libraries are constantly changing, this +.\" manual page may be incorrect or out-of-date. The author(s) assume no +.\" responsibility for errors or omissions, or for damages resulting from +.\" the use of the information contained herein. The author(s) may not +.\" have taken the same level of care in the production of this manual, +.\" which is licensed free of charge, as they might when working +.\" professionally. +.\" +.\" Formatted or processed versions of this manual, if unaccompanied by +.\" the source, must acknowledge the copyright and authors of this work. +.\" %%%LICENSE_END +.\" +.\" Corrected prototype and include, aeb, 990927 +.TH LSEARCH 3 2017-09-15 "GNU" "Linux Programmer's Manual" +.SH NAME +lfind, lsearch \- linear search of an array +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void *lfind(const void *" key ", const void *" base ", size_t *" nmemb , +.BI " size_t " size ", int(*" compar ")(const void *, const void *));" +.PP +.BI "void *lsearch(const void *" key ", void *" base ", size_t *" nmemb , +.BI " size_t " size ", int(*" compar ")(const void *, const void *));" +.fi +.SH DESCRIPTION +.BR lfind () +and +.BR lsearch () +perform a linear search for +.I key +in the array +.IR base +which has +.I *nmemb +elements of +.I size +bytes each. +The comparison function referenced by +.I compar +is expected to have two arguments which point to the +.I key +object and to an array member, in that order, and which +returns zero if the +.I key +object matches the array member, and +nonzero otherwise. +.PP +If +.BR lsearch () +does not find a matching element, then the +.I key +object is inserted at the end of the table, and +.I *nmemb +is +incremented. +In particular, one should know that a matching element +exists, or that more room is available. +.SH RETURN VALUE +.BR lfind () +returns a pointer to a matching member of the array, or +NULL if no match is found. +.BR lsearch () +returns a pointer to +a matching member of the array, or to the newly added member if no +match is found. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lbw18 lb lb +l l l. +Interface Attribute Value +T{ +.BR lfind (), +.BR lsearch () +T} Thread safety MT-Safe +.TE +.sp 1 +.SH CONFORMING TO +POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD. +Present in libc since libc-4.6.27. +.SH BUGS +The naming is unfortunate. +.SH SEE ALSO +.BR bsearch (3), +.BR hsearch (3), +.BR tsearch (3) +.SH COLOPHON +This page is part of release 5.05 of the Linux +.I man-pages +project. +A description of the project, +information about reporting bugs, +and the latest version of this page, +can be found at +\%https://www.kernel.org/doc/man\-pages/. diff --git a/man/man.1 b/man/man.1 new file mode 100644 index 0000000..a515c06 --- /dev/null +++ b/man/man.1 @@ -0,0 +1,1280 @@ +'\" t +.\" ** The above line should force tbl to be a preprocessor ** +.\" Man page for man +.\" +.\" Copyright (C) 1994, 1995, Graeme W. Wilford. (Wilf.) +.\" Copyright (C) 2001-2019 Colin Watson. +.\" +.\" You may distribute under the terms of the GNU General Public +.\" License as specified in the file COPYING that comes with the +.\" man-db distribution. +.\" +.\" Sat Oct 29 13:09:31 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) +.\" +.pc +.TH MAN 1 "2020-02-25" "2.9.1" "Manual pager utils" +.SH NAME +man \- an interface to the system reference manuals +.SH SYNOPSIS +.\" The general command line +.B man +.RI [\| "man options" \|] +.RI [\|[\| section \|] +.IR page \ \|.\|.\|.\|]\ \.\|.\|.\& +.\" The apropos command line +.br +.B man +.B \-k +.RI [\| "apropos options" \|] +.I regexp +\&.\|.\|.\& +.\" The --global-apropos command line +.br +.B man +.B \-K +.RI [\| "man options" \|] +.RI [\| section \|] +.IR term \ .\|.\|.\& +.\" The whatis command line +.br +.B man +.B \-f +.RI [\| whatis +.IR options \|] +.I page +\&.\|.\|.\& +.\" The --local command line +.br +.B man +.B \-l +.RI [\| "man options" \|] +.I file +\&.\|.\|.\& +.\" The --where/--where-cat command line +.br +.B man +.BR \-w \||\| \-W +.RI [\| "man options" \|] +.I page +\&.\|.\|.\& +.SH DESCRIPTION +.B man +is the system's manual pager. +Each +.I page +argument given to +.B man +is normally the name of a program, utility or function. +The +.I manual page +associated with each of these arguments is then found and displayed. +A +.IR section , +if provided, will direct +.B man +to look only in that +.I section +of the manual. +The default action is to search in all of the available +.IR sections +following a pre-defined order (see +.BR DEFAULTS ), +and to show only the first +.I page +found, even if +.I page +exists in several +.IR sections . + +The table below shows the +.I section +numbers of the manual followed by the types of pages they contain. + +.TS +tab (@); +l lx. +1@T{ +Executable programs or shell commands +T} +2@T{ +System calls (functions provided by the kernel) +T} +3@T{ +Library calls (functions within program libraries) +T} +4@T{ +Special files (usually found in \fI/dev\/\fR) +T} +5@T{ +File formats and conventions, e.g.\& \fI/etc/passwd\fR +T} +6@T{ +Games +T} +7@T{ +Miscellaneous (including macro packages and conventions), +e.g.\& \fBman\fR(7), \fBgroff\fR(7) +T} +8@T{ +System administration commands (usually only for root) +T} +9@T{ +Kernel routines [\|Non standard\|] +T} +.TE + +A manual +.I page +consists of several sections. + +Conventional section names include +.BR NAME , +.BR SYNOPSIS , +.BR CONFIGURATION , +.BR DESCRIPTION , +.BR OPTIONS , +.BR EXIT\ STATUS , +.BR RETURN\ VALUE , +.BR ERRORS , +.BR ENVIRONMENT , +.BR FILES , +.BR VERSIONS , +.BR CONFORMING\ TO , +.BR NOTES , +.BR BUGS , +.BR EXAMPLE , +.BR AUTHORS , +and +.BR SEE\ ALSO . + +The following conventions apply to the +.B SYNOPSIS +section and can be used as a guide in other sections. + +.TS +tab (@); +l lx. +\fBbold text\fR@T{ +type exactly as shown. +T} +\fIitalic text\fR@T{ +replace with appropriate argument. +T} +[\|\fB\-abc\fR\|]@T{ +any or all arguments within [ ] are optional. +T} +\fB\-a\|\fR|\|\fB\-b\fR@T{ +options delimited by | cannot be used together. +T} +\fIargument\fR .\|.\|.@T{ +\fIargument\fR is repeatable. +T} +[\|\fIexpression\fR\|]\fR .\|.\|.@T{ +\fRentire \fIexpression\fR\ within [ ] is repeatable. +T} +.TE + +Exact rendering may vary depending on the output device. +For instance, man will usually not be able to render italics when running in +a terminal, and will typically use underlined or coloured text instead. + +The command or function illustration is a pattern that should match all +possible invocations. +In some cases it is advisable to illustrate several exclusive invocations +as is shown in the +.B SYNOPSIS +section of this manual page. +.SH EXAMPLES +.TP \w'man\ 'u +.BI man \ ls +Display the manual page for the +.I item +(program) +.IR ls . +.TP +\fBman\fR \fIman\fR.\fI7\fR +Display the manual page for macro package +.I man +from section +.IR 7 . +(This is an alternative spelling of +"\fBman\fR \fI7 man\fR".) +.TP +\fBman '\fIman\fR(\fI7\fR)' +Display the manual page for macro package +.I man +from section +.IR 7 . +(This is another alternative spelling of +"\fBman\fR \fI7 man\fR". +It may be more convenient when copying and pasting cross-references to +manual pages. +Note that the parentheses must normally be quoted to protect them from the +shell.) +.TP +.BI man\ \-a \ intro +Display, in succession, all of the available +.I intro +manual pages contained within the manual. +It is possible to quit between successive displays or skip any of them. +.TP +\fBman \-t \fIbash \fR|\fI lpr \-Pps +Format the manual page for +.I bash +into the default +.B troff +or +.B groff +format and pipe it to the printer named +.IR ps . +The default output for +.B groff +is usually PostScript. +.B man \-\-help +should advise as to which processor is bound to the +.B \-t +option. +.TP +.BI "man \-l \-T" "dvi ./foo.1x.gz" " > " ./foo.1x.dvi +This command will decompress and format the nroff source manual page +.I ./foo.1x.gz +into a +.B device independent (dvi) +file. +The redirection is necessary as the +.B \-T +flag causes output to be directed to +.B stdout +with no pager. +The output could be viewed with a program such as +.B xdvi +or further processed into PostScript using a program such as +.BR dvips . +.TP +.BI man\ \-k \ printf +Search the short descriptions and manual page names for the keyword +.I printf +as regular expression. +Print out any matches. +Equivalent to +.BI apropos \ printf . +.TP +.BI man\ \-f \ smail +Lookup the manual pages referenced by +.I smail +and print out the short descriptions of any found. +Equivalent to +.BI whatis \ smail . +.SH OVERVIEW +Many options are available to +.B man +in order to give as much flexibility as possible to the user. +Changes can be made to the search path, section order, output processor, +and other behaviours and operations detailed below. + +If set, various environment variables are interrogated to determine +the operation of +.BR man . +It is possible to set the "catch-all" variable +.RB $ MANOPT +to any string in command line format, with the exception that any spaces +used as part of an option's argument must be escaped (preceded by a +backslash). +.B man +will parse +.RB $ MANOPT +prior to parsing its own command line. +Those options requiring an argument will be overridden by the same options +found on the command line. +To reset all of the options set in +.RB $ MANOPT , +.B \-D +can be specified as the initial command line option. +This will allow man to "forget" about the options specified in +.RB $ MANOPT , +although they must still have been valid. + +Manual pages are normally stored in +.BR nroff (1) +format under a directory such as +.IR /usr/share/man . +In some installations, there may also be preformatted +.I cat pages +to improve performance. +See +.BR manpath (5) +for details of where these files are stored. + +This package supports manual pages in multiple languages, controlled by your +.IR locale . +If your system did not set this up for you automatically, then you may need +to set +.RB $ LC_MESSAGES , +.RB $ LANG , +or another system-dependent environment variable to indicate your preferred +locale, usually specified in the +.B POSIX +format: + +.\" +.\" Need a \c to make sure we don't get a space where we don't want one +.\" +.RI < language >[\|\c +.B _\c +.RI < territory >\|[\|\c +.B .\c +.RI < character-set >\|[\|\c +.B ,\c +.RI < version >\|]\|]\|] + +If the desired page is available in your +.IR locale , +it will be displayed in lieu of the standard +(usually American English) page. + +If you find that the translations supplied with this package are not +available in your native language and you would like to supply them, please +contact the maintainer who will be coordinating such activity. + +Individual manual pages are normally written and maintained by the +maintainers of the program, function, or other topic that they document, and +are not included with this package. +If you find that a manual page is missing or inadequate, please report that +to the maintainers of the package in question. + +For information regarding other features and extensions available with this +manual pager, please read the documents supplied with the package. +.SH DEFAULTS +The order of sections to search may be overridden by the environment +variable +.RB $ MANSECT +or by the +.B SECTION +directive in +.IR /etc/manpath.config . +By default it is as follows: + +.RS +1 n l 8 3 2 3posix 3pm 3perl 3am 5 4 9 6 7 +.RE + +The formatted manual page is displayed using a +.IR pager . +This can be specified in a number of ways, or else will fall back to a +default (see option +.B \-P +for details). + +The filters are deciphered by a number of means. +Firstly, the command line option +.B \-p +or the environment variable +.RB $ MANROFFSEQ +is interrogated. +If +.B \-p +was not used and the environment variable was not set, the initial line of +the nroff file is parsed for a preprocessor string. +To contain a valid preprocessor string, the first line must resemble + +.B '\e" +.RB < string > + +where +.B string +can be any combination of letters described by option +.B \-p +below. + +If none of the above methods provide any filter information, a default set +is used. + +A formatting pipeline is formed from the filters and the primary +formatter +.RB ( nroff +or +.RB [ tg ] roff +with +.BR \-t ) +and executed. +Alternatively, if an executable program +.I mandb_nfmt +(or +.I mandb_tfmt +with +.BR \-t ) +exists in the man tree root, it is executed instead. +It gets passed the manual source file, the preprocessor string, and +optionally the device specified with +.BR \-T " or " \-E +as arguments. +.\" ******************************************************************** +.SH OPTIONS +Non-argument options that are duplicated either on the command line, in +.RB $ MANOPT , +or both, are not harmful. +For options that require an argument, each duplication will override the +previous argument value. +.SS "General options" +.TP +.BI \-C\ file \fR,\ \fB\-\-config\-file= file +Use this user configuration file rather than the default of +.IR ~/.manpath . +.TP +.BR \-d ", " \-\-debug +Print debugging information. +.TP +.BR \-D ", " \-\-default +This option is normally issued as the very first option and resets +.B man's +behaviour to its default. +Its use is to reset those options that may have been set in +.RB $ MANOPT . +Any options that follow +.B \-D +will have their usual effect. +.TP +\fB\-\-warnings\fP[=\fIwarnings\/\fP] +Enable warnings from +.IR groff . +This may be used to perform sanity checks on the source text of manual +pages. +.I warnings +is a comma-separated list of warning names; if it is not supplied, the +default is "mac". +See the \(lqWarnings\(rq node in +.B info groff +for a list of available warning names. +.SS "Main modes of operation" +.TP +.BR \-f ", " \-\-whatis +Equivalent to +.BR whatis . +Display a short description from the manual page, if available. +See +.BR whatis (1) +for details. +.TP +.BR \-k ", " \-\-apropos +Equivalent to +.BR apropos . +Search the short manual page descriptions for keywords and display any +matches. +See +.BR apropos (1) +for details. +.TP +.BR \-K ", " \-\-global\-apropos +Search for text in all manual pages. +This is a brute-force search, and is likely to take some time; if you can, +you should specify a section to reduce the number of pages that need to be +searched. +Search terms may be simple strings (the default), or regular expressions if +the +.B \-\-regex +option is used. +.IP +Note that this searches the +.I sources +of the manual pages, not the rendered text, and so may include false +positives due to things like comments in source files. +Searching the rendered text would be much slower. +.TP +.BR \-l ", " \-\-local\-file +Activate "local" mode. +Format and display local manual files instead of searching through the +system's manual collection. +Each manual page argument will be interpreted as an nroff source file in the +correct format. +.\" Compressed nroff source files with a supported compression +.\" extension will be decompressed by man prior to being displaying via the +.\" usual filters. +No cat file is produced. +If '\-' is listed as one of the arguments, input will be taken from stdin. +When this option is not used, and man fails to find the page required, +before displaying the error message, it attempts to act as if this +option was supplied, using the name as a filename and looking for an +exact match. +.TP +.BR \-w ", " \-\-where ", " \-\-path ", " \-\-location +Don't actually display the manual page, but do print the location of the +source nroff file that would be formatted. +If the +.B \-a +option is also used, then print the locations of all source files that match +the search criteria. +.TP +.BR \-W ", " \-\-where\-cat ", " \-\-location\-cat +Don't actually display the manual page, but do print the location of the +preformatted cat file that would be displayed. +If the +.B \-a +option is also used, then print the locations of all preformatted cat files +that match the search criteria. +.IP +If +.B \-w +and +.B \-W +are both used, then print both source file and cat file separated by a +space. +If +all of +.BR \-w , +.BR \-W , +and +.B \-a +are used, then do this for each possible match. +.TP +.BR \-c ", " \-\-catman +This option is not for general use and should only be used by the +.B catman +program. +.TP +.BI \-R\ encoding\fR,\ \fI \-\-recode\fR=\fIencoding +Instead of formatting the manual page in the usual way, output its source +converted to the specified +.IR encoding . +If you already know the encoding of the source file, you can also use +.BR manconv (1) +directly. +However, this option allows you to convert several manual pages to a single +encoding without having to explicitly state the encoding of each, provided +that they were already installed in a structure similar to a manual page +hierarchy. +.IP +Consider using +.BR man-recode (1) +instead for converting multiple manual pages, since it has an interface +designed for bulk conversion and so can be much faster. +.SS "Finding manual pages" +.TP +.BI \-L\ locale \fR,\ \fB\-\-locale= locale +.B man +will normally determine your current locale by a call to the C function +.BR setlocale (3) +which interrogates various environment variables, possibly including +.RB $ LC_MESSAGES +and +.RB $ LANG . +To temporarily override the determined value, use this option to supply a +.I locale +string directly to +.BR man . +Note that it will not take effect until the search for pages actually +begins. +Output such as the help message will always be displayed in the initially +determined locale. +.TP +\fB\-m\fR \fIsystem\fR\|[\|,.\|.\|.\|]\|, \ +\fB\-\-systems=\fIsystem\fR\|[\|,.\|.\|.\|] +If this system has access to other operating system's manual pages, they can +be accessed using this option. +To search for a manual page from NewOS's manual page collection, +use the option +.B \-m +.BR NewOS . + +The +.I system +specified can be a combination of comma delimited operating system names. +To include a search of the native operating system's manual pages, +include the system name +.B man +in the argument string. +This option will override the +.RB $ SYSTEM +environment variable. +.TP +.BI \-M\ path \fR,\ \fB\-\-manpath= path +Specify an alternate manpath to use. +By default, +.B man +uses +.B manpath +derived code to determine the path to search. +This option overrides the +.RB $ MANPATH +environment variable and causes option +.B \-m +to be ignored. + +A path specified as a manpath must be the root of a manual page hierarchy +structured into sections as described in the man-db manual (under "The +manual page system"). +To view manual pages outside such hierarchies, see the +.B \-l +option. +.TP +\fB\-S\fR \fIlist\/\fR, \ +\fB\-s\fR \fIlist\/\fR, \ +\fB\-\-sections=\fIlist\/\fR +The given +.I list +is a colon- or comma-separated list of sections, used to determine which +manual sections to search and in what order. +This option overrides the +.RB $ MANSECT +environment variable. +(The +.B \-s +spelling is for compatibility with System V.) +.TP +.BI \-e\ sub-extension \fR,\ \fB\-\-extension= sub-extension +Some systems incorporate large packages of manual pages, such as those that +accompany the +.B Tcl +package, into the main manual page hierarchy. +To get around the problem of having two manual pages with the same name +such as +.BR exit (3), +the +.B Tcl +pages were usually all assigned to section +.BR l . +As this is unfortunate, it is now possible to put the pages in the correct +section, and to assign a specific "extension" to them, in this case, +.BR exit (3tcl). +Under normal operation, +.B man +will display +.BR exit (3) +in preference to +.BR exit (3tcl). +To negotiate this situation and to avoid having to know which section the +page you require resides in, it is now possible to give +.B man +a +.I sub-extension +string indicating which package the page must belong to. +Using the above example, supplying the option +.B \-e\ tcl +to +.B man +will restrict the search to pages having an extension of +.BR *tcl . +.TP +.BR \-i ", " \-\-ignore\-case +Ignore case when searching for manual pages. +This is the default. +.TP +.BR \-I ", " \-\-match\-case +Search for manual pages case-sensitively. +.TP +.B \-\-regex +Show all pages with any part of either their names or their descriptions +matching each +.I page +argument as a regular expression, as with +.BR apropos (1). +Since there is usually no reasonable way to pick a "best" page when +searching for a regular expression, this option implies +.BR \-a . +.TP +.B \-\-wildcard +Show all pages with any part of either their names or their descriptions +matching each +.I page +argument using shell-style wildcards, as with +.BR apropos (1) +.BR \-\-wildcard . +The +.I page +argument must match the entire name or description, or match on word +boundaries in the description. +Since there is usually no reasonable way to pick a "best" page when +searching for a wildcard, this option implies +.BR \-a . +.TP +.B \-\-names\-only +If the +.B \-\-regex +or +.B \-\-wildcard +option is used, match only page names, not page descriptions, as with +.BR whatis (1). +Otherwise, no effect. +.TP +.BR \-a ", " \-\-all +By default, +.B man +will exit after displaying the most suitable manual page it finds. +Using this option forces +.B man +to display all the manual pages with names that match the search criteria. +.TP +.BR \-u ", " \-\-update +This option causes +.B man +to update its database caches of installed manual pages. +This is only needed in rare situations, and it is normally better to run +.BR mandb (8) +instead. +.TP +.B \-\-no\-subpages +By default, +.B man +will try to interpret pairs of manual page names given on the command line +as equivalent to a single manual page name containing a hyphen or an +underscore. +This supports the common pattern of programs that implement a number of +subcommands, allowing them to provide manual pages for each that can be +accessed using similar syntax as would be used to invoke the subcommands +themselves. +For example: + +.nf +\& $ man \-aw git diff +\& /usr/share/man/man1/git\-diff.1.gz +.fi + +To disable this behaviour, use the +.B \-\-no\-subpages +option. + +.nf +\& $ man \-aw \-\-no\-subpages git diff +\& /usr/share/man/man1/git.1.gz +\& /usr/share/man/man3/Git.3pm.gz +\& /usr/share/man/man1/diff.1.gz +.fi +.SS "Controlling formatted output" +.TP +.BI \-P\ pager \fR,\ \fB\-\-pager= pager +Specify which output pager to use. +By default, +.B man +uses +.BR "pager" , +falling back to +.B cat +if +.B pager +is not found or is not executable. +This option overrides the +.RB $ MANPAGER +environment variable, which in turn overrides the +.RB $ PAGER +environment variable. +It is not used in conjunction with +.B \-f +or +.BR \-k . + +The value may be a simple command name or a command with arguments, and may +use shell quoting (backslashes, single quotes, or double quotes). +It may not use pipes to connect multiple commands; if you need that, use a +wrapper script, which may take the file to display either as an argument or +on standard input. +.TP +.BI \-r\ prompt \fR,\ \fB\-\-prompt= prompt +If a recent version of +.B less +is used as the pager, +.B man +will attempt to set its prompt and some sensible options. +The default prompt looks like + +.B \ Manual page\c +.IB \ name ( sec )\c +.BI \ line \ x + +where +.I name +denotes the manual page name, +.I sec +denotes the section it was found under and +.I x +the current line number. +.\"The default options are +.\".BR \-six8 . +This is achieved by using the +.RB $ LESS +environment variable. +.\"The actual default will depend on your chosen +.\".BR locale . + +Supplying +.B \-r +with a string will override this default. +.\"You may need to do this if your +.\"version of +.\".B less +.\"rejects the default options or if you prefer a different prompt. +The string may contain the text +.B $MAN_PN +which will be expanded to the name of the current manual page and its +section name surrounded by "(" and ")". +The string used to produce the default could be expressed as + +.B \e\ Manual\e\ page\e\ \e$MAN_PN\e\ ?ltline\e\ %lt?L/%L.: +.br +.B byte\e\ %bB?s/%s..?\e\ (END):?pB\e\ %pB\e\e%.. +.br +.B (press h for help or q to quit) + +It is broken into three lines here for the sake of readability only. +For its meaning see the +.BR less (1) +manual page. +The prompt string is first evaluated by the shell. +All double quotes, back-quotes and backslashes in the prompt must be escaped +by a preceding backslash. +The prompt string may end in an escaped $ which may be followed by further +options for less. +By default +.B man +sets the +.B \-ix8 +options. + +The +.RB $ MANLESS +environment variable described below may be used to set a default prompt +string if none is supplied on the command line. +.TP +.BR \-7 ", " \-\-ascii +When viewing a pure +.IR ascii (7) +manual page on a 7 bit terminal or terminal emulator, some characters may +not display correctly when using the +.IR latin1 (7) +device description with +.B GNU +.BR nroff . +This option allows pure +.I ascii +manual pages to be displayed in +.I ascii +with the +.I latin1 +device. +It will not translate any +.I latin1 +text. +The following table shows the translations performed: some parts of it may +only be displayed properly when using +.B GNU +.BR nroff 's +.IR latin1 (7) +device. + +.ie c \[shc] \ +. ds softhyphen \[shc] +.el \ +. ds softhyphen \(hy +.na +.TS +tab (@); +l c c c. +Description@Octal@latin1@ascii +_ +T{ +continuation hyphen +T}@255@\*[softhyphen]@- +T{ +bullet (middle dot) +T}@267@\(bu@o +T{ +acute accent +T}@264@\(aa@' +T{ +multiplication sign +T}@327@\(mu@x +.TE +.ad + +If the +.I latin1 +column displays correctly, your terminal may be set up for +.I latin1 +characters and this option is not necessary. +If the +.I latin1 +and +.I ascii +columns are identical, you are reading this page using this option or +.B man +did not format this page using the +.I latin1 +device description. +If the +.I latin1 +column is missing or corrupt, you may need to view manual pages with this +option. + +This option is ignored when using options +.BR \-t , +.BR \-H , +.BR \-T , +or +.B \-Z +and may be useless for +.B nroff +other than +.BR GNU's . +.TP +.BI \-E\ encoding\fR,\ \fI \-\-encoding\fR=\fIencoding +Generate output for a character encoding other than the default. +For backward compatibility, +.I encoding +may be an +.B nroff +device such as +.BR ascii ", " latin1 ", or " utf8 +as well as a true character encoding such as +.BR UTF\-8 . +.TP +.BR \-\-no\-hyphenation ", " \-\-nh +Normally, +.B nroff +will automatically hyphenate text at line breaks even in words that do not +contain hyphens, if it is necessary to do so to lay out words on a line +without excessive spacing. +This option disables automatic hyphenation, so words will only be hyphenated +if they already contain hyphens. + +If you are writing a manual page and simply want to prevent +.B nroff +from hyphenating a word at an inappropriate point, do not use this option, +but consult the +.B nroff +documentation instead; for instance, you can put "\e%" inside a word to +indicate that it may be hyphenated at that point, or put "\e%" at the start +of a word to prevent it from being hyphenated. +.TP +.BR \-\-no\-justification ", " \-\-nj +Normally, +.B nroff +will automatically justify text to both margins. +This option disables full justification, leaving justified only to the left +margin, sometimes called "ragged-right" text. + +If you are writing a manual page and simply want to prevent +.B nroff +from justifying certain paragraphs, do not use this option, but consult the +.B nroff +documentation instead; for instance, you can use the ".na", ".nf", ".fi", +and ".ad" requests to temporarily disable adjusting and filling. +.TP +.BI \-p\ string \fR,\ \fB\-\-preprocessor= string +Specify the sequence of preprocessors to run before +.B nroff +or +.BR troff / groff . +Not all installations will have a full set of preprocessors. +Some of the preprocessors and the letters used to designate them are: +.BR eqn " (" e ), +.BR grap " (" g ), +.BR pic " (" p ), +.BR tbl " (" t ), +.BR vgrind " (" v ), +.BR refer " (" r ). +This option overrides the +.RB $ MANROFFSEQ +environment variable. +.B zsoelim +is always run as the very first preprocessor. +.TP +.BR \-t ", " \-\-troff +Use +.I groff \-mandoc +to format the manual page to stdout. +This option is not required in conjunction with +.BR \-H , +.BR \-T , +or +.BR \-Z . +.TP +\fB\-T\fP[\fIdevice\/\fP], \fB\-\-troff\-device\fP[=\fIdevice\/\fP] +This option is used to change +.B groff +(or possibly +.BR troff's ) +output to be suitable for a device other than the default. +It implies +.BR \-t . +Examples (provided with Groff-1.17) include +.BR dvi ", " latin1 ", " ps ", " utf8 , +.BR X75 " and " X100 . +.TP +\fB\-H\fP[\fIbrowser\/\fP], \fB\-\-html\fP[=\fIbrowser\/\fP] +This option will cause +.B groff +to produce HTML output, and will display that output in a web browser. +The choice of browser is determined by the optional +.I browser +argument if one is provided, by the +.RB $ BROWSER +environment variable, or by a compile-time default if that is unset (usually +.BR lynx ). +This option implies +.BR \-t , +and will only work with +.B GNU +.BR troff . +.TP +\fB\-X\fP[\fIdpi\/\fP], \fB\-\-gxditview\fP[=\fIdpi\/\fP] +This option displays the output of +.B groff +in a graphical window using the +.B gxditview +program. +The +.I dpi +(dots per inch) may be 75, 75-12, 100, or 100-12, defaulting to 75; +the -12 variants use a 12-point base font. +This option implies +.B \-T +with the X75, X75-12, X100, or X100-12 device respectively. +.TP +.BR \-Z ", " \-\-ditroff +.B groff +will run +.B troff +and then use an appropriate post-processor to produce output suitable for +the chosen device. +If +.I groff \-mandoc +is +.BR groff , +this option is passed to +.B groff +and will suppress the use of a post-processor. +It implies +.BR \-t . +.SS "Getting help" +.TP +.BR \-? ", " \-\-help +Print a help message and exit. +.TP +.B \-\-usage +Print a short usage message and exit. +.TP +.BR \-V ", " \-\-version +Display version information. +.SH "EXIT STATUS" +.TP +.B 0 +Successful program execution. +.TP +.B 1 +Usage, syntax or configuration file error. +.TP +.B 2 +Operational error. +.TP +.B 3 +A child process returned a non-zero exit status. +.TP +.B 16 +At least one of the pages/files/keywords didn't exist or wasn't matched. +.SH ENVIRONMENT +.\".TP \w'MANROFFSEQ\ \ 'u +.TP +.B MANPATH +If +.RB $ MANPATH +is set, its value is used as the path to search for manual pages. +.TP +.B MANROFFOPT +Every time +.B man +invokes the formatter +.RB ( nroff , +.BR troff , +or +.BR groff ), +it adds the contents of +.RB $ MANROFFOPT +to the formatter's command line. +.TP +.B MANROFFSEQ +If +.RB $ MANROFFSEQ +is set, its value is used to determine the set of preprocessors to pass +each manual page through. +The default preprocessor list is system dependent. +.TP +.B MANSECT +If +.RB $ MANSECT +is set, its value is a colon-delimited list of sections and it is used to +determine which manual sections to search and in what order. +The default is +"1 n l 8 3 2 3posix 3pm 3perl 3am 5 4 9 6 7", +unless overridden by the +.B SECTION +directive in +.IR /etc/manpath.config . +.TP +.BR MANPAGER , " PAGER" +If +.RB $ MANPAGER +or +.RB $ PAGER +is set +.RB ($ MANPAGER +is used in preference), its value is used as the name of the program used to +display the manual page. +By default, +.B pager +is used, falling back to +.B cat +if +.B pager +is not found or is not executable. + +The value may be a simple command name or a command with arguments, and may +use shell quoting (backslashes, single quotes, or double quotes). +It may not use pipes to connect multiple commands; if you need that, use a +wrapper script, which may take the file to display either as an argument or +on standard input. +.TP +.B MANLESS +If +.RB $ MANLESS +is set, its value will be used as the default prompt string for the +.B less +pager, as if it had been passed using the +.B \-r +option (so any occurrences of the text +.B $MAN_PN +will be expanded in the same way). +For example, if you want to set the prompt string unconditionally to +\(lqmy prompt string\(rq, set +.RB $ MANLESS +to +.RB \(oq \-Psmy\ prompt\ string \(cq. +Using the +.B \-r +option overrides this environment variable. +.TP +.B BROWSER +If +.RB $ BROWSER +is set, its value is a colon-delimited list of commands, each of which in +turn is used to try to start a web browser for +.B man +.BR \-\-html . +In each command, +.I %s +is replaced by a filename containing the HTML output from +.BR groff , +.I %% +is replaced by a single percent sign (%), and +.I %c +is replaced by a colon (:). +.TP +.B SYSTEM +If +.RB $ SYSTEM +is set, it will have the same effect as if it had been specified as the +argument to the +.B \-m +option. +.TP +.B MANOPT +If +.RB $ MANOPT +is set, it will be parsed prior to +.B man's +command line and is expected to be in a similar format. +As all of the other +.B man +specific environment variables can be expressed as command line options, and +are thus candidates for being included in +.RB $ MANOPT +it is expected that they will become obsolete. +N.B. All spaces that should be interpreted as part of an option's argument +must be escaped. +.TP +.B MANWIDTH +If +.RB $ MANWIDTH +is set, its value is used as the line length for which manual pages should +be formatted. +If it is not set, manual pages will be formatted with a line length +appropriate to the current terminal (using the value of +.RB $ COLUMNS , +and +.BR ioctl (2) +if available, or falling back to 80 characters if neither is available). +Cat pages will only be saved when the default formatting can be used, that +is when the terminal line length is between 66 and 80 characters. +.TP +.B MAN_KEEP_FORMATTING +Normally, when output is not being directed to a terminal (such as to a file +or a pipe), formatting characters are discarded to make it easier to read +the result without special tools. +However, if +.RB $ MAN_KEEP_FORMATTING +is set to any non-empty value, these formatting characters are retained. +This may be useful for wrappers around +.B man +that can interpret formatting characters. +.TP +.B MAN_KEEP_STDERR +Normally, when output is being directed to a terminal (usually to a pager), +any error output from the command used to produce formatted versions of +manual pages is discarded to avoid interfering with the pager's display. +Programs such as +.B groff +often produce relatively minor error messages about typographical problems +such as poor alignment, which are unsightly and generally confusing when +displayed along with the manual page. +However, some users want to see them anyway, so, if +.RB $ MAN_KEEP_STDERR +is set to any non-empty value, error output will be displayed as usual. +.TP +.BR LANG , " LC_MESSAGES" +Depending on system and implementation, either or both of +.RB $ LANG +and +.RB $ LC_MESSAGES +will be interrogated for the current message locale. +.B man +will display its messages in that locale (if available). +See +.BR setlocale (3) +for precise details. +.SH FILES +.TP +.I /etc/manpath.config +man-db configuration file. +.TP +.I /usr/share/man +A global manual page hierarchy. +.SH "SEE ALSO" +.BR apropos (1), +.BR groff (1), +.BR less (1), +.BR manpath (1), +.BR nroff (1), +.BR troff (1), +.BR whatis (1), +.BR zsoelim (1), +.BR manpath (5), +.BR man (7), +.BR catman (8), +.BR mandb (8) +.PP +Documentation for some packages may be available in other formats, such as +.BR info (1) +or HTML. +.SH HISTORY +1990, 1991 \(en Originally written by John W.\& Eaton (jwe@che.utexas.edu). + +Dec 23 1992: Rik Faith (faith@cs.unc.edu) applied bug fixes +supplied by Willem Kasdorp (wkasdo@nikhefk.nikef.nl). + +30th April 1994 \(en 23rd February 2000: Wilf.\& (G.Wilford@ee.surrey.ac.uk) +has been developing and maintaining this package +with the help of a few dedicated people. + +30th October 1996 \(en 30th March 2001: Fabrizio Polacco +maintained and enhanced this package for the Debian project, with the +help of all the community. + +31st March 2001 \(en present day: Colin Watson is now +developing and maintaining man-db. diff --git a/man/man.1.gz b/man/man.1.gz new file mode 100644 index 0000000..ce6bdb2 Binary files /dev/null and b/man/man.1.gz differ diff --git a/man/man.pdf b/man/man.pdf new file mode 100644 index 0000000..8caa0ac Binary files /dev/null and b/man/man.pdf differ diff --git a/man/man.txt b/man/man.txt new file mode 100644 index 0000000..a587645 --- /dev/null +++ b/man/man.txt @@ -0,0 +1,690 @@ +MAN(1) Manual pager utils MAN(1) + +NAME + man - an interface to the system reference manuals + +SYNOPSIS + man [man options] [[section] page ...] ... + man -k [apropos options] regexp ... + man -K [man options] [section] term ... + man -f [whatis options] page ... + man -l [man options] file ... + man -w|-W [man options] page ... + +DESCRIPTION + man is the system's manual pager. Each page argument given to man is + normally the name of a program, utility or function. The manual page + associated with each of these arguments is then found and displayed. A + section, if provided, will direct man to look only in that section of + the manual. The default action is to search in all of the available + sections following a pre-defined order (see DEFAULTS), and to show only + the first page found, even if page exists in several sections. + + The table below shows the section numbers of the manual followed by the + types of pages they contain. + + 1 Executable programs or shell commands + 2 System calls (functions provided by the kernel) + 3 Library calls (functions within program libraries) + 4 Special files (usually found in /dev) + 5 File formats and conventions, e.g. /etc/passwd + 6 Games + 7 Miscellaneous (including macro packages and conventions), e.g. + man(7), groff(7) + 8 System administration commands (usually only for root) + 9 Kernel routines [Non standard] + + A manual page consists of several sections. + + Conventional section names include NAME, SYNOPSIS, CONFIGURATION, DE‐ + SCRIPTION, OPTIONS, EXIT STATUS, RETURN VALUE, ERRORS, ENVIRONMENT, + FILES, VERSIONS, CONFORMING TO, NOTES, BUGS, EXAMPLE, AUTHORS, and + SEE ALSO. + + The following conventions apply to the SYNOPSIS section and can be used + as a guide in other sections. + + bold text type exactly as shown. + italic text replace with appropriate argument. + [-abc] any or all arguments within [ ] are optional. + -a|-b options delimited by | cannot be used together. + argument ... argument is repeatable. + [expression] ... entire expression within [ ] is repeatable. + + Exact rendering may vary depending on the output device. For instance, + man will usually not be able to render italics when running in a termi‐ + nal, and will typically use underlined or coloured text instead. + + The command or function illustration is a pattern that should match all + possible invocations. In some cases it is advisable to illustrate sev‐ + eral exclusive invocations as is shown in the SYNOPSIS section of this + manual page. + +EXAMPLES + man ls + Display the manual page for the item (program) ls. + + man man.7 + Display the manual page for macro package man from section 7. + (This is an alternative spelling of "man 7 man".) + + man 'man(7)' + Display the manual page for macro package man from section 7. + (This is another alternative spelling of "man 7 man". It may be + more convenient when copying and pasting cross-references to manual + pages. Note that the parentheses must normally be quoted to pro‐ + tect them from the shell.) + + man -a intro + Display, in succession, all of the available intro manual pages + contained within the manual. It is possible to quit between suc‐ + cessive displays or skip any of them. + + man -t bash | lpr -Pps + Format the manual page for bash into the default troff or groff + format and pipe it to the printer named ps. The default output for + groff is usually PostScript. man --help should advise as to which + processor is bound to the -t option. + + man -l -Tdvi ./foo.1x.gz > ./foo.1x.dvi + This command will decompress and format the nroff source manual + page ./foo.1x.gz into a device independent (dvi) file. The redi‐ + rection is necessary as the -T flag causes output to be directed to + stdout with no pager. The output could be viewed with a program + such as xdvi or further processed into PostScript using a program + such as dvips. + + man -k printf + Search the short descriptions and manual page names for the keyword + printf as regular expression. Print out any matches. Equivalent + to apropos printf. + + man -f smail + Lookup the manual pages referenced by smail and print out the short + descriptions of any found. Equivalent to whatis smail. + +OVERVIEW + Many options are available to man in order to give as much flexibility + as possible to the user. Changes can be made to the search path, sec‐ + tion order, output processor, and other behaviours and operations de‐ + tailed below. + + If set, various environment variables are interrogated to determine the + operation of man. It is possible to set the "catch-all" variable + $MANOPT to any string in command line format, with the exception that + any spaces used as part of an option's argument must be escaped (pre‐ + ceded by a backslash). man will parse $MANOPT prior to parsing its own + command line. Those options requiring an argument will be overridden + by the same options found on the command line. To reset all of the op‐ + tions set in $MANOPT, -D can be specified as the initial command line + option. This will allow man to "forget" about the options specified in + $MANOPT, although they must still have been valid. + + Manual pages are normally stored in nroff(1) format under a directory + such as /usr/share/man. In some installations, there may also be pre‐ + formatted cat pages to improve performance. See manpath(5) for details + of where these files are stored. + + This package supports manual pages in multiple languages, controlled by + your locale. If your system did not set this up for you automatically, + then you may need to set $LC_MESSAGES, $LANG, or another system-depen‐ + dent environment variable to indicate your preferred locale, usually + specified in the POSIX format: + + [_[.[,]]] + + If the desired page is available in your locale, it will be displayed + in lieu of the standard (usually American English) page. + + If you find that the translations supplied with this package are not + available in your native language and you would like to supply them, + please contact the maintainer who will be coordinating such activity. + + Individual manual pages are normally written and maintained by the + maintainers of the program, function, or other topic that they docu‐ + ment, and are not included with this package. If you find that a man‐ + ual page is missing or inadequate, please report that to the maintain‐ + ers of the package in question. + + For information regarding other features and extensions available with + this manual pager, please read the documents supplied with the package. + +DEFAULTS + The order of sections to search may be overridden by the environment + variable $MANSECT or by the SECTION directive in /etc/manpath.config. + By default it is as follows: + + 1 n l 8 3 2 3posix 3pm 3perl 3am 5 4 9 6 7 + + The formatted manual page is displayed using a pager. This can be + specified in a number of ways, or else will fall back to a default (see + option -P for details). + + The filters are deciphered by a number of means. Firstly, the command + line option -p or the environment variable $MANROFFSEQ is interrogated. + If -p was not used and the environment variable was not set, the ini‐ + tial line of the nroff file is parsed for a preprocessor string. To + contain a valid preprocessor string, the first line must resemble + + '\" + + where string can be any combination of letters described by option -p + below. + + If none of the above methods provide any filter information, a default + set is used. + + A formatting pipeline is formed from the filters and the primary for‐ + matter (nroff or [tg]roff with -t) and executed. Alternatively, if an + executable program mandb_nfmt (or mandb_tfmt with -t) exists in the man + tree root, it is executed instead. It gets passed the manual source + file, the preprocessor string, and optionally the device specified with + -T or -E as arguments. + +OPTIONS + Non-argument options that are duplicated either on the command line, in + $MANOPT, or both, are not harmful. For options that require an argu‐ + ment, each duplication will override the previous argument value. + + General options + -C file, --config-file=file + Use this user configuration file rather than the default of + ~/.manpath. + + -d, --debug + Print debugging information. + + -D, --default + This option is normally issued as the very first option and re‐ + sets man's behaviour to its default. Its use is to reset those + options that may have been set in $MANOPT. Any options that + follow -D will have their usual effect. + + --warnings[=warnings] + Enable warnings from groff. This may be used to perform sanity + checks on the source text of manual pages. warnings is a comma- + separated list of warning names; if it is not supplied, the de‐ + fault is "mac". See the “Warnings” node in info groff for a + list of available warning names. + + Main modes of operation + -f, --whatis + Equivalent to whatis. Display a short description from the man‐ + ual page, if available. See whatis(1) for details. + + -k, --apropos + Equivalent to apropos. Search the short manual page descrip‐ + tions for keywords and display any matches. See apropos(1) for + details. + + -K, --global-apropos + Search for text in all manual pages. This is a brute-force + search, and is likely to take some time; if you can, you should + specify a section to reduce the number of pages that need to be + searched. Search terms may be simple strings (the default), or + regular expressions if the --regex option is used. + + Note that this searches the sources of the manual pages, not the + rendered text, and so may include false positives due to things + like comments in source files. Searching the rendered text + would be much slower. + + -l, --local-file + Activate "local" mode. Format and display local manual files + instead of searching through the system's manual collection. + Each manual page argument will be interpreted as an nroff source + file in the correct format. No cat file is produced. If '-' is + listed as one of the arguments, input will be taken from stdin. + When this option is not used, and man fails to find the page re‐ + quired, before displaying the error message, it attempts to act + as if this option was supplied, using the name as a filename and + looking for an exact match. + + -w, --where, --path, --location + Don't actually display the manual page, but do print the loca‐ + tion of the source nroff file that would be formatted. If the + -a option is also used, then print the locations of all source + files that match the search criteria. + + -W, --where-cat, --location-cat + Don't actually display the manual page, but do print the loca‐ + tion of the preformatted cat file that would be displayed. If + the -a option is also used, then print the locations of all pre‐ + formatted cat files that match the search criteria. + + If -w and -W are both used, then print both source file and cat + file separated by a space. If all of -w, -W, and -a are used, + then do this for each possible match. + + -c, --catman + This option is not for general use and should only be used by + the catman program. + + -R encoding, --recode=encoding + Instead of formatting the manual page in the usual way, output + its source converted to the specified encoding. If you already + know the encoding of the source file, you can also use man‐ + conv(1) directly. However, this option allows you to convert + several manual pages to a single encoding without having to ex‐ + plicitly state the encoding of each, provided that they were al‐ + ready installed in a structure similar to a manual page hierar‐ + chy. + + Consider using man-recode(1) instead for converting multiple + manual pages, since it has an interface designed for bulk con‐ + version and so can be much faster. + + Finding manual pages + -L locale, --locale=locale + man will normally determine your current locale by a call to the + C function setlocale(3) which interrogates various environment + variables, possibly including $LC_MESSAGES and $LANG. To tempo‐ + rarily override the determined value, use this option to supply + a locale string directly to man. Note that it will not take ef‐ + fect until the search for pages actually begins. Output such as + the help message will always be displayed in the initially de‐ + termined locale. + + -m system[,...], --systems=system[,...] + If this system has access to other operating system's manual + pages, they can be accessed using this option. To search for a + manual page from NewOS's manual page collection, use the option + -m NewOS. + + The system specified can be a combination of comma delimited op‐ + erating system names. To include a search of the native operat‐ + ing system's manual pages, include the system name man in the + argument string. This option will override the $SYSTEM environ‐ + ment variable. + + -M path, --manpath=path + Specify an alternate manpath to use. By default, man uses man‐ + path derived code to determine the path to search. This option + overrides the $MANPATH environment variable and causes option -m + to be ignored. + + A path specified as a manpath must be the root of a manual page + hierarchy structured into sections as described in the man-db + manual (under "The manual page system"). To view manual pages + outside such hierarchies, see the -l option. + + -S list, -s list, --sections=list + The given list is a colon- or comma-separated list of sections, + used to determine which manual sections to search and in what + order. This option overrides the $MANSECT environment variable. + (The -s spelling is for compatibility with System V.) + + -e sub-extension, --extension=sub-extension + Some systems incorporate large packages of manual pages, such as + those that accompany the Tcl package, into the main manual page + hierarchy. To get around the problem of having two manual pages + with the same name such as exit(3), the Tcl pages were usually + all assigned to section l. As this is unfortunate, it is now + possible to put the pages in the correct section, and to assign + a specific "extension" to them, in this case, exit(3tcl). Under + normal operation, man will display exit(3) in preference to + exit(3tcl). To negotiate this situation and to avoid having to + know which section the page you require resides in, it is now + possible to give man a sub-extension string indicating which + package the page must belong to. Using the above example, sup‐ + plying the option -e tcl to man will restrict the search to + pages having an extension of *tcl. + + -i, --ignore-case + Ignore case when searching for manual pages. This is the de‐ + fault. + + -I, --match-case + Search for manual pages case-sensitively. + + --regex + Show all pages with any part of either their names or their de‐ + scriptions matching each page argument as a regular expression, + as with apropos(1). Since there is usually no reasonable way to + pick a "best" page when searching for a regular expression, this + option implies -a. + + --wildcard + Show all pages with any part of either their names or their de‐ + scriptions matching each page argument using shell-style wild‐ + cards, as with apropos(1) --wildcard. The page argument must + match the entire name or description, or match on word bound‐ + aries in the description. Since there is usually no reasonable + way to pick a "best" page when searching for a wildcard, this + option implies -a. + + --names-only + If the --regex or --wildcard option is used, match only page + names, not page descriptions, as with whatis(1). Otherwise, no + effect. + + -a, --all + By default, man will exit after displaying the most suitable + manual page it finds. Using this option forces man to display + all the manual pages with names that match the search criteria. + + -u, --update + This option causes man to update its database caches of in‐ + stalled manual pages. This is only needed in rare situations, + and it is normally better to run mandb(8) instead. + + --no-subpages + By default, man will try to interpret pairs of manual page names + given on the command line as equivalent to a single manual page + name containing a hyphen or an underscore. This supports the + common pattern of programs that implement a number of subcom‐ + mands, allowing them to provide manual pages for each that can + be accessed using similar syntax as would be used to invoke the + subcommands themselves. For example: + + $ man -aw git diff + /usr/share/man/man1/git-diff.1.gz + + To disable this behaviour, use the --no-subpages option. + + $ man -aw --no-subpages git diff + /usr/share/man/man1/git.1.gz + /usr/share/man/man3/Git.3pm.gz + /usr/share/man/man1/diff.1.gz + + Controlling formatted output + -P pager, --pager=pager + Specify which output pager to use. By default, man uses pager, + falling back to cat if pager is not found or is not executable. + This option overrides the $MANPAGER environment variable, which + in turn overrides the $PAGER environment variable. It is not + used in conjunction with -f or -k. + + The value may be a simple command name or a command with argu‐ + ments, and may use shell quoting (backslashes, single quotes, or + double quotes). It may not use pipes to connect multiple com‐ + mands; if you need that, use a wrapper script, which may take + the file to display either as an argument or on standard input. + + -r prompt, --prompt=prompt + If a recent version of less is used as the pager, man will at‐ + tempt to set its prompt and some sensible options. The default + prompt looks like + + Manual page name(sec) line x + + where name denotes the manual page name, sec denotes the section + it was found under and x the current line number. This is + achieved by using the $LESS environment variable. + + Supplying -r with a string will override this default. The + string may contain the text $MAN_PN which will be expanded to + the name of the current manual page and its section name sur‐ + rounded by "(" and ")". The string used to produce the default + could be expressed as + + \ Manual\ page\ \$MAN_PN\ ?ltline\ %lt?L/%L.: + byte\ %bB?s/%s..?\ (END):?pB\ %pB\\%.. + (press h for help or q to quit) + + It is broken into three lines here for the sake of readability + only. For its meaning see the less(1) manual page. The prompt + string is first evaluated by the shell. All double quotes, + back-quotes and backslashes in the prompt must be escaped by a + preceding backslash. The prompt string may end in an escaped $ + which may be followed by further options for less. By default + man sets the -ix8 options. + + The $MANLESS environment variable described below may be used to + set a default prompt string if none is supplied on the command + line. + + -7, --ascii + When viewing a pure ascii(7) manual page on a 7 bit terminal or + terminal emulator, some characters may not display correctly + when using the latin1(7) device description with GNU nroff. + This option allows pure ascii manual pages to be displayed in + ascii with the latin1 device. It will not translate any latin1 + text. The following table shows the translations performed: + some parts of it may only be displayed properly when using GNU + nroff's latin1(7) device. + + Description Octal latin1 ascii + ────────────────────────────────────────── + continuation hy‐ 255 ‐ - + phen + bullet (middle 267 • o + dot) + acute accent 264 ´ ' + multiplication 327 × x + sign + + If the latin1 column displays correctly, your terminal may be + set up for latin1 characters and this option is not necessary. + If the latin1 and ascii columns are identical, you are reading + this page using this option or man did not format this page us‐ + ing the latin1 device description. If the latin1 column is + missing or corrupt, you may need to view manual pages with this + option. + + This option is ignored when using options -t, -H, -T, or -Z and + may be useless for nroff other than GNU's. + + -E encoding, --encoding=encoding + Generate output for a character encoding other than the default. + For backward compatibility, encoding may be an nroff device such + as ascii, latin1, or utf8 as well as a true character encoding + such as UTF-8. + + --no-hyphenation, --nh + Normally, nroff will automatically hyphenate text at line breaks + even in words that do not contain hyphens, if it is necessary to + do so to lay out words on a line without excessive spacing. + This option disables automatic hyphenation, so words will only + be hyphenated if they already contain hyphens. + + If you are writing a manual page and simply want to prevent + nroff from hyphenating a word at an inappropriate point, do not + use this option, but consult the nroff documentation instead; + for instance, you can put "\%" inside a word to indicate that it + may be hyphenated at that point, or put "\%" at the start of a + word to prevent it from being hyphenated. + + --no-justification, --nj + Normally, nroff will automatically justify text to both margins. + This option disables full justification, leaving justified only + to the left margin, sometimes called "ragged-right" text. + + If you are writing a manual page and simply want to prevent + nroff from justifying certain paragraphs, do not use this op‐ + tion, but consult the nroff documentation instead; for instance, + you can use the ".na", ".nf", ".fi", and ".ad" requests to tem‐ + porarily disable adjusting and filling. + + -p string, --preprocessor=string + Specify the sequence of preprocessors to run before nroff or + troff/groff. Not all installations will have a full set of pre‐ + processors. Some of the preprocessors and the letters used to + designate them are: eqn (e), grap (g), pic (p), tbl (t), vgrind + (v), refer (r). This option overrides the $MANROFFSEQ environ‐ + ment variable. zsoelim is always run as the very first pre‐ + processor. + + -t, --troff + Use groff -mandoc to format the manual page to stdout. This op‐ + tion is not required in conjunction with -H, -T, or -Z. + + -T[device], --troff-device[=device] + This option is used to change groff (or possibly troff's) output + to be suitable for a device other than the default. It implies + -t. Examples (provided with Groff-1.17) include dvi, latin1, + ps, utf8, X75 and X100. + + -H[browser], --html[=browser] + This option will cause groff to produce HTML output, and will + display that output in a web browser. The choice of browser is + determined by the optional browser argument if one is provided, + by the $BROWSER environment variable, or by a compile-time de‐ + fault if that is unset (usually lynx). This option implies -t, + and will only work with GNU troff. + + -X[dpi], --gxditview[=dpi] + This option displays the output of groff in a graphical window + using the gxditview program. The dpi (dots per inch) may be 75, + 75-12, 100, or 100-12, defaulting to 75; the -12 variants use a + 12-point base font. This option implies -T with the X75, + X75-12, X100, or X100-12 device respectively. + + -Z, --ditroff + groff will run troff and then use an appropriate post-processor + to produce output suitable for the chosen device. If groff + -mandoc is groff, this option is passed to groff and will sup‐ + press the use of a post-processor. It implies -t. + + Getting help + -?, --help + Print a help message and exit. + + --usage + Print a short usage message and exit. + + -V, --version + Display version information. + +EXIT STATUS + 0 Successful program execution. + + 1 Usage, syntax or configuration file error. + + 2 Operational error. + + 3 A child process returned a non-zero exit status. + + 16 At least one of the pages/files/keywords didn't exist or wasn't + matched. + +ENVIRONMENT + MANPATH + If $MANPATH is set, its value is used as the path to search for + manual pages. + + MANROFFOPT + Every time man invokes the formatter (nroff, troff, or groff), + it adds the contents of $MANROFFOPT to the formatter's command + line. + + MANROFFSEQ + If $MANROFFSEQ is set, its value is used to determine the set of + preprocessors to pass each manual page through. The default + preprocessor list is system dependent. + + MANSECT + If $MANSECT is set, its value is a colon-delimited list of sec‐ + tions and it is used to determine which manual sections to + search and in what order. The default is "1 n l 8 3 2 3posix + 3pm 3perl 3am 5 4 9 6 7", unless overridden by the SECTION di‐ + rective in /etc/manpath.config. + + MANPAGER, PAGER + If $MANPAGER or $PAGER is set ($MANPAGER is used in preference), + its value is used as the name of the program used to display the + manual page. By default, pager is used, falling back to cat if + pager is not found or is not executable. + + The value may be a simple command name or a command with argu‐ + ments, and may use shell quoting (backslashes, single quotes, or + double quotes). It may not use pipes to connect multiple com‐ + mands; if you need that, use a wrapper script, which may take + the file to display either as an argument or on standard input. + + MANLESS + If $MANLESS is set, its value will be used as the default prompt + string for the less pager, as if it had been passed using the -r + option (so any occurrences of the text $MAN_PN will be expanded + in the same way). For example, if you want to set the prompt + string unconditionally to “my prompt string”, set $MANLESS to + ‘-Psmy prompt string’. Using the -r option overrides this envi‐ + ronment variable. + + BROWSER + If $BROWSER is set, its value is a colon-delimited list of com‐ + mands, each of which in turn is used to try to start a web + browser for man --html. In each command, %s is replaced by a + filename containing the HTML output from groff, %% is replaced + by a single percent sign (%), and %c is replaced by a colon (:). + + SYSTEM If $SYSTEM is set, it will have the same effect as if it had + been specified as the argument to the -m option. + + MANOPT If $MANOPT is set, it will be parsed prior to man's command line + and is expected to be in a similar format. As all of the other + man specific environment variables can be expressed as command + line options, and are thus candidates for being included in + $MANOPT it is expected that they will become obsolete. N.B. + All spaces that should be interpreted as part of an option's ar‐ + gument must be escaped. + + MANWIDTH + If $MANWIDTH is set, its value is used as the line length for + which manual pages should be formatted. If it is not set, man‐ + ual pages will be formatted with a line length appropriate to + the current terminal (using the value of $COLUMNS, and ioctl(2) + if available, or falling back to 80 characters if neither is + available). Cat pages will only be saved when the default for‐ + matting can be used, that is when the terminal line length is + between 66 and 80 characters. + + MAN_KEEP_FORMATTING + Normally, when output is not being directed to a terminal (such + as to a file or a pipe), formatting characters are discarded to + make it easier to read the result without special tools. How‐ + ever, if $MAN_KEEP_FORMATTING is set to any non-empty value, + these formatting characters are retained. This may be useful + for wrappers around man that can interpret formatting charac‐ + ters. + + MAN_KEEP_STDERR + Normally, when output is being directed to a terminal (usually + to a pager), any error output from the command used to produce + formatted versions of manual pages is discarded to avoid inter‐ + fering with the pager's display. Programs such as groff often + produce relatively minor error messages about typographical + problems such as poor alignment, which are unsightly and gener‐ + ally confusing when displayed along with the manual page. How‐ + ever, some users want to see them anyway, so, if + $MAN_KEEP_STDERR is set to any non-empty value, error output + will be displayed as usual. + + LANG, LC_MESSAGES + Depending on system and implementation, either or both of $LANG + and $LC_MESSAGES will be interrogated for the current message + locale. man will display its messages in that locale (if avail‐ + able). See setlocale(3) for precise details. + +FILES + /etc/manpath.config + man-db configuration file. + + /usr/share/man + A global manual page hierarchy. + +SEE ALSO + apropos(1), groff(1), less(1), manpath(1), nroff(1), troff(1), + whatis(1), zsoelim(1), manpath(5), man(7), catman(8), mandb(8) + + Documentation for some packages may be available in other formats, such + as info(1) or HTML. + +HISTORY + 1990, 1991 – Originally written by John W. Eaton (jwe@che.utexas.edu). + + Dec 23 1992: Rik Faith (faith@cs.unc.edu) applied bug fixes supplied by + Willem Kasdorp (wkasdo@nikhefk.nikef.nl). + + 30th April 1994 – 23rd February 2000: Wilf. (G.Wilford@ee.surrey.ac.uk) + has been developing and maintaining this package with the help of a few + dedicated people. + + 30th October 1996 – 30th March 2001: Fabrizio Polacco maintained and enhanced this package for the Debian project, + with the help of all the community. + + 31st March 2001 – present day: Colin Watson is + now developing and maintaining man-db. + +2.9.1 2020-02-25 MAN(1)