195c635efSGarrett D'Amore.\" Copyright 2014 Garrett D'Amore <garrett@damore.org> 2c10c16deSRichard Lowe.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved. 395c635efSGarrett D'Amore.\" Copyright (c) 1980 Regents of the University of California. 495c635efSGarrett D'Amore.\" The Berkeley software License Agreement specifies the terms and conditions 595c635efSGarrett D'Amore.\" for redistribution. 695c635efSGarrett D'Amore.Dd Jul 18, 2014 795c635efSGarrett D'Amore.Dt MAN 1 895c635efSGarrett D'Amore.Os 995c635efSGarrett D'Amore.Sh NAME 1095c635efSGarrett D'Amore.Nm man 1195c635efSGarrett D'Amore.Nd find and display reference manual pages 1295c635efSGarrett D'Amore.Sh SYNOPSIS 1395c635efSGarrett D'Amore.Nm 1495c635efSGarrett D'Amore.Op Fl 1595c635efSGarrett D'Amore.Op Fl adFlrt 1695c635efSGarrett D'Amore.Op Fl T Ar macro-package 1795c635efSGarrett D'Amore.Op Fl M Ar path 1895c635efSGarrett D'Amore.Op Fl s Ar section 1995c635efSGarrett D'Amore.Ar name ... 2095c635efSGarrett D'Amore.Nm 2195c635efSGarrett D'Amore.Op Fl M Ar path 2295c635efSGarrett D'Amore.Op Fl s Ar section 2395c635efSGarrett D'Amore.Fl k 2495c635efSGarrett D'Amore.Ar keyword 2595c635efSGarrett D'Amore.Ar ... 2695c635efSGarrett D'Amore.Nm 2795c635efSGarrett D'Amore.Op Fl M Ar path 2895c635efSGarrett D'Amore.Op Fl s Ar section 2995c635efSGarrett D'Amore.Fl f 3095c635efSGarrett D'Amore.Ar 3195c635efSGarrett D'Amore.Nm 3295c635efSGarrett D'Amore.Op Fl M Ar path 3395c635efSGarrett D'Amore.Fl w 3495c635efSGarrett D'Amore.Sh DESCRIPTION 3595c635efSGarrett D'AmoreThe 3695c635efSGarrett D'Amore.Nm 3795c635efSGarrett D'Amorecommand displays information from the reference manuals. It 3895c635efSGarrett D'Amoredisplays complete manual pages that you select by 3995c635efSGarrett D'Amore.Ar name , 4095c635efSGarrett D'Amoreor one-line summaries selected either by 4195c635efSGarrett D'Amore.Ar keyword 4295c635efSGarrett D'Amore.Pq Fl k , 4395c635efSGarrett D'Amoreor by the name of an associated file 4495c635efSGarrett D'Amore.Pq Fl f . 4595c635efSGarrett D'AmoreIf no manual page is located, 4695c635efSGarrett D'Amore.Nm 4795c635efSGarrett D'Amoreprints an error message. 4895c635efSGarrett D'Amore.Ss "Source Format" 4995c635efSGarrett D'AmoreReference Manual pages are marked up with either 5095c635efSGarrett D'Amore.Xr man 5 , 5195c635efSGarrett D'Amoreor 5295c635efSGarrett D'Amore.Xr mdoc 5 5395c635efSGarrett D'Amorelanguage tags. The 5495c635efSGarrett D'Amore.Nm 5595c635efSGarrett D'Amorecommand recognizes the type of markup and 5695c635efSGarrett D'Amoreprocesses the file accordingly. 5795c635efSGarrett D'Amore. 5895c635efSGarrett D'Amore.Ss "Location of Manual Pages" 5995c635efSGarrett D'Amore. 60c10c16deSRichard LoweThe online Reference Manual page directories are conventionally located in 6195c635efSGarrett D'Amore.Pa /usr/share/man . 6295c635efSGarrett D'AmoreEach directory corresponds to a 63c10c16deSRichard Lowesection of the manual. Since these directories are optionally installed, they 6495c635efSGarrett D'Amoremight not reside on your host. You might have to mount 6595c635efSGarrett D'Amore.Pa /usr/share/man 66c10c16deSRichard Lowefrom a host on which they do reside. 6795c635efSGarrett D'AmoreThe 6895c635efSGarrett D'Amore.Nm 6995c635efSGarrett D'Amorecommand reformats a page whenever it is requested. 7095c635efSGarrett D'Amore.Pp 7195c635efSGarrett D'AmoreIf the standard output is not a terminal, or if the 7295c635efSGarrett D'Amore.Fl 7395c635efSGarrett D'Amoreflag is given, 7495c635efSGarrett D'Amore.Nm 7595c635efSGarrett D'Amorepipes its output through 7695c635efSGarrett D'Amore.Xr cat 1 . 7795c635efSGarrett D'AmoreOtherwise, 7895c635efSGarrett D'Amore.Nm 7995c635efSGarrett D'Amorepipes its output through a pager such as 8095c635efSGarrett D'Amore.Xr more 1 8195c635efSGarrett D'Amoreto handle paging and underlining on the screen. 8295c635efSGarrett D'Amore.Sh OPTIONS 83c10c16deSRichard LoweThe following options are supported: 8495c635efSGarrett D'Amore.Bl -tag -width indent 8595c635efSGarrett D'Amore.It Fl a 8695c635efSGarrett D'AmoreShows all manual pages matching 8795c635efSGarrett D'Amore.Ar name 8895c635efSGarrett D'Amorewithin the 8995c635efSGarrett D'Amore.Ev MANPATH 9095c635efSGarrett D'Amoresearch path. Manual pages are displayed in the order found. 9195c635efSGarrett D'Amore.It Fl d 92c10c16deSRichard LoweDebugs. Displays what a section-specifier evaluates to, method used for 9395c635efSGarrett D'Amoresearching, and paths searched by 9495c635efSGarrett D'Amore.Nm . 9595c635efSGarrett D'Amore.It Fl f Ar file ... 9695c635efSGarrett D'AmoreAttempts to locate manual pages related to any of the given 9795c635efSGarrett D'Amore.Ar file 9895c635efSGarrett D'Amorenames. It strips the leading path name components from each 9995c635efSGarrett D'Amore.Ar file , 100c10c16deSRichard Loweand then prints one-line summaries containing the resulting basename or names. 10195c635efSGarrett D'AmoreThis option also uses the 10295c635efSGarrett D'Amore.Pa whatis 10395c635efSGarrett D'Amoredatabase. 10495c635efSGarrett D'Amore.It Fl F 10595c635efSGarrett D'AmoreThis option is present for backwards compatibility and is documented 10695c635efSGarrett D'Amorehere for reference only. It performs no function. 10795c635efSGarrett D'Amore.It Fl k Ar keyword ... 10895c635efSGarrett D'AmorePrints out one-line summaries from the 10995c635efSGarrett D'Amore.Pa whatis 11095c635efSGarrett D'Amoredatabase (table of contents) that contain any of the given 11195c635efSGarrett D'Amore.Ar keyword . 11295c635efSGarrett D'AmoreThe 11395c635efSGarrett D'Amore.Pa whatis 11495c635efSGarrett D'Amoredatabase is created using the 11595c635efSGarrett D'Amore.Fl w 11695c635efSGarrett D'Amoreoption. 11795c635efSGarrett D'Amore.It Fl l 11895c635efSGarrett D'AmoreLists all manual pages found matching 11995c635efSGarrett D'Amore.Ar name 12095c635efSGarrett D'Amorewithin the search path. 12195c635efSGarrett D'Amore.It Fl M Ar path 12295c635efSGarrett D'AmoreSpecifies an alternate search path for manual pages. The 12395c635efSGarrett D'Amore.Ar path 12495c635efSGarrett D'Amoreis a colon-separated list of directories that contain manual page directory 12595c635efSGarrett D'Amoresubtrees. For example, if 12695c635efSGarrett D'Amore.Ar path 12795c635efSGarrett D'Amoreis 12895c635efSGarrett D'Amore.Pa /usr/share/man:/usr/local/man , 12995c635efSGarrett D'Amore.Nm 13095c635efSGarrett D'Amoresearches for 13195c635efSGarrett D'Amore.Ar name 13295c635efSGarrett D'Amorein the standard location, and then 13395c635efSGarrett D'Amore.Pa /usr/local/man . 13495c635efSGarrett D'AmoreWhen used with the 13595c635efSGarrett D'Amore.Fl k , 13695c635efSGarrett D'Amore.Fl f , 13795c635efSGarrett D'Amoreor 13895c635efSGarrett D'Amore.Fl w 13995c635efSGarrett D'Amoreoptions, the 14095c635efSGarrett D'Amore.Fl M 14195c635efSGarrett D'Amoreoption must appear first. Each directory in the 14295c635efSGarrett D'Amore.Ar path 14395c635efSGarrett D'Amoreis assumed to contain subdirectories of the form 14495c635efSGarrett D'Amore.Pa man* , 14595c635efSGarrett D'Amoreone for each section. This option overrides the 14695c635efSGarrett D'Amore.Ev MANPATH 14795c635efSGarrett D'Amoreenvironment variable. 14895c635efSGarrett D'Amore.It Fl r 14995c635efSGarrett D'AmoreReformats the manual page, checking for formatting errors, but does not 15095c635efSGarrett D'Amoredisplay it. 15195c635efSGarrett D'Amore.It Fl s Ar section 15295c635efSGarrett D'AmoreSpecifies sections of the manual for 15395c635efSGarrett D'Amore.Nm 15495c635efSGarrett D'Amoreto search. The directories searched for 15595c635efSGarrett D'Amore.Ar name 15695c635efSGarrett D'Amoreare limited to those specified by 15795c635efSGarrett D'Amore.Ar section . 15895c635efSGarrett D'Amore.Ar section 15995c635efSGarrett D'Amorecan be a numerical digit, perhaps followed by one or more letters 16095c635efSGarrett D'Amoreto match the desired section of the manual, for example, 16195c635efSGarrett D'Amore.Li "3libucb". 16295c635efSGarrett D'AmoreAlso, 16395c635efSGarrett D'Amore.Ar section 16495c635efSGarrett D'Amorecan be a word, for example, 16595c635efSGarrett D'Amore.Li local , 16695c635efSGarrett D'Amore.Li new , 16795c635efSGarrett D'Amore.Li old , 16895c635efSGarrett D'Amore.Li public . 16995c635efSGarrett D'Amore.Ar section 17095c635efSGarrett D'Amorecan also be a letter. To specify multiple sections, 17195c635efSGarrett D'Amoreseparate each section with a comma. This option overrides the 17295c635efSGarrett D'Amore.Ev MANPATH 17395c635efSGarrett D'Amoreenvironment variable and the 17495c635efSGarrett D'Amore.Pa man.cf 17595c635efSGarrett D'Amorefile. See 17695c635efSGarrett D'Amore.Sx Search Path 17795c635efSGarrett D'Amorebelow for an explanation of how 17895c635efSGarrett D'Amore.Nm 17995c635efSGarrett D'Amoreconducts its search. 18095c635efSGarrett D'Amore.It Fl t 18195c635efSGarrett D'AmoreArranges for the specified manual pages to be sent to the default 18295c635efSGarrett D'Amoreprinter as PostScript. 18395c635efSGarrett D'Amore.It Fl T Ar macro-package 18495c635efSGarrett D'AmoreThis option is present for backwards compatibility and is documented 18595c635efSGarrett D'Amorehere for reference only. It performs no function. 18695c635efSGarrett D'Amore.It Fl w 18795c635efSGarrett D'AmoreUpdates the 18895c635efSGarrett D'Amore.Nm whatis 18995c635efSGarrett D'Amoredatabase. 19095c635efSGarrett D'Amore.El 19195c635efSGarrett D'Amore.Sh OPERANDS 192c10c16deSRichard LoweThe following operand is supported: 19395c635efSGarrett D'Amore.Bl -tag -width indent 19495c635efSGarrett D'Amore.It Ar name 195c10c16deSRichard LoweThe name of a standard utility or a keyword. 19695c635efSGarrett D'Amore.El 19795c635efSGarrett D'Amore.Sh USAGE 19895c635efSGarrett D'AmoreThe usage of 19995c635efSGarrett D'Amore.Nm 20095c635efSGarrett D'Amoreis described below: 20195c635efSGarrett D'Amore. 20295c635efSGarrett D'Amore.Ss "Manual Page Sections" 20395c635efSGarrett D'Amore. 20495c635efSGarrett D'AmoreEntries in the reference manuals are organized into 20595c635efSGarrett D'Amore.Em sections . 20695c635efSGarrett D'AmoreA section 207c10c16deSRichard Lowename consists of a major section name, typically a single digit, optionally 208c10c16deSRichard Lowefollowed by a subsection name, typically one or more letters. An unadorned 20995c635efSGarrett D'Amoremajor section name, for example, 21095c635efSGarrett D'Amore.Qq 9 , 21195c635efSGarrett D'Amoredoes not act as an abbreviation for 21295c635efSGarrett D'Amorethe subsections of that name, such as 21395c635efSGarrett D'Amore.Qq 9e , 21495c635efSGarrett D'Amore.Qq 9f , 21595c635efSGarrett D'Amoreor 21695c635efSGarrett D'Amore.Qq 9s . 21795c635efSGarrett D'AmoreThat is, each subsection must be searched separately by 21895c635efSGarrett D'Amore.Nm 21995c635efSGarrett D'Amore.Fl s . 220c10c16deSRichard LoweEach section contains descriptions apropos to a particular reference category, 22195c635efSGarrett D'Amorewith subsections refining these distinctions. See the 22295c635efSGarrett D'Amore.Em intro 22395c635efSGarrett D'Amoremanual pages for an explanation of the classification used in this release. 22495c635efSGarrett D'Amore. 22595c635efSGarrett D'Amore.Ss "Search Path" 22695c635efSGarrett D'Amore. 22795c635efSGarrett D'AmoreBefore searching for a given 22895c635efSGarrett D'Amore.Ar name , 22995c635efSGarrett D'Amore.Nm 23095c635efSGarrett D'Amoreconstructs a list of candidate directories and sections. 23195c635efSGarrett D'AmoreIt searches for 23295c635efSGarrett D'Amore.Ar name 23395c635efSGarrett D'Amorein the directories specified by the 23495c635efSGarrett D'Amore.Ev MANPATH 23595c635efSGarrett D'Amoreenvironment variable. 23695c635efSGarrett D'Amore.Lp 23795c635efSGarrett D'AmoreIn the absence of 23895c635efSGarrett D'Amore.Ev MANPATH , 23995c635efSGarrett D'Amore.Nm 24095c635efSGarrett D'Amoreconstructs its search path based upon the 24195c635efSGarrett D'Amore.Ev PATH 24295c635efSGarrett D'Amoreenvironment variable, primarily by substituting 24395c635efSGarrett D'Amore.Li man 24495c635efSGarrett D'Amorefor the last component of the 24595c635efSGarrett D'Amore.Ev PATH 24695c635efSGarrett D'Amoreelement. Special provisions are added 24795c635efSGarrett D'Amoreto account for unique characteristics of directories such as 24895c635efSGarrett D'Amore.Pa /sbin , 24995c635efSGarrett D'Amore.Pa /usr/ucb , 25095c635efSGarrett D'Amore.Pa /usr/xpg4/bin , 25195c635efSGarrett D'Amoreand others. If the file argument contains 25295c635efSGarrett D'Amorea 25395c635efSGarrett D'Amore.Qq / 25495c635efSGarrett D'Amorecharacter, the 25595c635efSGarrett D'Amore.Em dirname 25695c635efSGarrett D'Amoreportion of the argument is used in place of 25795c635efSGarrett D'Amore.Ev PATH 25895c635efSGarrett D'Amoreelements to construct the search path. 25995c635efSGarrett D'Amore.Lp 26095c635efSGarrett D'AmoreWithin the manual page directories, 26195c635efSGarrett D'Amore.Nm 26295c635efSGarrett D'Amoreconfines its search to the 263c10c16deSRichard Lowesections specified in the following order: 26495c635efSGarrett D'Amore.Bl -bullet 26595c635efSGarrett D'Amore.It 26695c635efSGarrett D'Amore.Ar sections 26795c635efSGarrett D'Amorespecified on the command line with the 26895c635efSGarrett D'Amore.Fl s 26995c635efSGarrett D'Amoreoption 27095c635efSGarrett D'Amore.It 27195c635efSGarrett D'Amore.Ar sections 27295c635efSGarrett D'Amoreembedded in the 27395c635efSGarrett D'Amore.Ev MANPATH 27495c635efSGarrett D'Amoreenvironment variable 27595c635efSGarrett D'Amore.It 27695c635efSGarrett D'Amore.Ar sections 27795c635efSGarrett D'Amorespecified in the 27895c635efSGarrett D'Amore.Pa man.cf 27995c635efSGarrett D'Amorefile for each directory specified in the 28095c635efSGarrett D'Amore.Ev MANPATH 28195c635efSGarrett D'Amoreenvironment variable 28295c635efSGarrett D'Amore.El 28395c635efSGarrett D'AmoreIf none of the above exist, 28495c635efSGarrett D'Amore.Nm 28595c635efSGarrett D'Amoresearches each directory in the manual 286c10c16deSRichard Lowepage path, and displays the first matching manual page found. 28795c635efSGarrett D'Amore.Lp 28895c635efSGarrett D'AmoreThe 28995c635efSGarrett D'Amore.Pa man.cf 29095c635efSGarrett D'Amorefile has the following format: 29195c635efSGarrett D'Amore.Lp 29295c635efSGarrett D'Amore.Dl Pf MANSECTS= Ar section , Ns Op Ar section... 29395c635efSGarrett D'Amore.Lp 29495c635efSGarrett D'AmoreLines beginning with 29595c635efSGarrett D'Amore.Sq Li # 29695c635efSGarrett D'Amoreand blank lines are considered comments, and are 29795c635efSGarrett D'Amoreignored. Each directory specified in 29895c635efSGarrett D'Amore.Ev MANPATH 29995c635efSGarrett D'Amorecan contain a manual page 300c10c16deSRichard Loweconfiguration file, specifying the default search order for that directory. 30195c635efSGarrett D'Amore.Sh "Referring to Other Manual Pages" 30295c635efSGarrett D'AmoreIf the first line of the manual page is a reference to another manual 303c10c16deSRichard Lowepage entry fitting the pattern: 30495c635efSGarrett D'Amore.Lp 30595c635efSGarrett D'Amore.Dl \&.so man*/\fIsourcefile\fR 30695c635efSGarrett D'Amore.Lp 30795c635efSGarrett D'Amore.Nm 30895c635efSGarrett D'Amoreprocesses the indicated file in place of the current one. The 309c10c16deSRichard Lowereference must be expressed as a path name relative to the root of the manual 310c10c16deSRichard Lowepage directory subtree. 31195c635efSGarrett D'Amore.Lp 312c10c16deSRichard LoweWhen the second or any subsequent line starts with \fB\&.so\fR, \fBman\fR 313c10c16deSRichard Loweignores it; \fBtroff\fR(1) or \fBnroff\fR(1) processes the request in the usual 314c10c16deSRichard Lowemanner. 31595c635efSGarrett D'Amore.Sh ENVIRONMENT VARIABLES 31695c635efSGarrett D'AmoreSee 31795c635efSGarrett D'Amore.Xr environ 5 31895c635efSGarrett D'Amorefor descriptions of the following environment variables 31995c635efSGarrett D'Amorethat affect the execution of 32095c635efSGarrett D'Amore.Nm man : 32195c635efSGarrett D'Amore.Ev LANG , 32295c635efSGarrett D'Amore.Ev LC_ALL , 32395c635efSGarrett D'Amore.Ev LC_CTYPE , 32495c635efSGarrett D'Amore.Ev LC_MESSAGES , 32595c635efSGarrett D'Amoreand 32695c635efSGarrett D'Amore.Ev NLSPATH . 32795c635efSGarrett D'Amore.Bl -tag -width indent 32895c635efSGarrett D'Amore.It Ev MANPATH 329c10c16deSRichard LoweA colon-separated list of directories; each directory can be followed by a 330c10c16deSRichard Lowecomma-separated list of sections. If set, its value overrides 331c10c16deSRichard Lowe\fB/usr/share/man\fR as the default directory search path, and the \fBman.cf\fR 332c10c16deSRichard Lowefile as the default section search path. The \fB-M\fR and \fB-s\fR flags, in 333c10c16deSRichard Loweturn, override these values.) 33495c635efSGarrett D'Amore.It Ev PAGER 33595c635efSGarrett D'AmoreA program to use for interactively delivering 33695c635efSGarrett D'Amoreoutput to the screen. If not set, 33795c635efSGarrett D'Amore.Sq Nm more Fl s 33895c635efSGarrett D'Amoreis used. See 33995c635efSGarrett D'Amore.Xr more 1 . 34095c635efSGarrett D'Amore.El 34195c635efSGarrett D'Amore.Sh FILES 34295c635efSGarrett D'Amore.Bl -tag -width indent 34395c635efSGarrett D'Amore.It Pa /usr/share/man 344c10c16deSRichard LoweRoot of the standard manual page directory subtree 34595c635efSGarrett D'Amore.It Pa /usr/share/man/man?/* 34695c635efSGarrett D'AmoreUnformatted manual entries 34795c635efSGarrett D'Amore.It Pa /usr/share/man/whatis 348c10c16deSRichard LoweTable of contents and keyword database 34995c635efSGarrett D'Amore.It Pa man.cf 350c10c16deSRichard LoweDefault search order by section 35195c635efSGarrett D'Amore.El 35295c635efSGarrett D'Amore.Sh EXIT STATUS 35395c635efSGarrett D'Amore.Ex -std man 35495c635efSGarrett D'Amore.Sh EXAMPLES 35595c635efSGarrett D'Amore. 35695c635efSGarrett D'Amore.Ss Example 1: Creating a PostScript Version of a man page 35795c635efSGarrett D'Amore. 35895c635efSGarrett D'AmoreThe following example spools the 35995c635efSGarrett D'Amore.Xr pipe 2 36095c635efSGarrett D'Amoreman page in PostScript to the default printer: 36195c635efSGarrett D'Amore.Pp 36295c635efSGarrett D'Amore.Dl % man -t -s 2 pipe 36395c635efSGarrett D'Amore.Pp 36495c635efSGarrett D'AmoreNote that 36595c635efSGarrett D'Amore.Xr mandoc 1 36695c635efSGarrett D'Amorecan be used to obtain the PostScript content directly. 36795c635efSGarrett D'Amore.Ss Example 2: Creating a Text Version of a man page 36895c635efSGarrett D'AmoreThe following example creates the 36995c635efSGarrett D'Amore.Xr pipe 2 37095c635efSGarrett D'Amoreman page in ASCII text: 37195c635efSGarrett D'Amore.Pp 37295c635efSGarrett D'Amore.Dl % man pipe.2 | col -x -b > pipe.text 37395c635efSGarrett D'Amore.Sh CODE SET INDEPENDENCE 37495c635efSGarrett D'AmoreEnabled. 37595c635efSGarrett D'Amore.Sh INTERFACE STABILITY 376*698f87a4SGarrett D'Amore.Sy Committed . 37795c635efSGarrett D'Amore.Sh SEE ALSO 37895c635efSGarrett D'Amore.Xr apropos 1 , 37995c635efSGarrett D'Amore.Xr cat 1 , 38095c635efSGarrett D'Amore.Xr col 1 , 38195c635efSGarrett D'Amore.Xr mandoc 1 , 38295c635efSGarrett D'Amore.Xr more 1 , 38395c635efSGarrett D'Amore.Xr whatis 1 , 38495c635efSGarrett D'Amore.Xr environ 5 , 38595c635efSGarrett D'Amore.Xr man 5 , 38695c635efSGarrett D'Amore.Xr mdoc 5 38795c635efSGarrett D'Amore.Sh NOTES 38895c635efSGarrett D'AmoreThe 38995c635efSGarrett D'Amore.Fl f 39095c635efSGarrett D'Amoreand 39195c635efSGarrett D'Amore.Fl k 39295c635efSGarrett D'Amoreoptions use the 39395c635efSGarrett D'Amore.Nm whatis 39495c635efSGarrett D'Amoredatabase, which is 39595c635efSGarrett D'Amorecreated with the 39695c635efSGarrett D'Amore.Fl w 39795c635efSGarrett D'Amoreoption. 39895c635efSGarrett D'Amore.Sh BUGS 399c10c16deSRichard LoweThe manual is supposed to be reproducible either on a phototypesetter or on an 40095c635efSGarrett D'AmoreASCII terminal. However, on a terminal some information (indicated by 401c10c16deSRichard Lowefont changes, for instance) is lost. 402