1.\" $NetBSD: man.1,v 1.28 2014/08/14 15:44:47 apb Exp $ 2.\" 3.\" Copyright (c) 1989, 1990, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. Neither the name of the University nor the names of its contributors 15.\" may be used to endorse or promote products derived from this software 16.\" without specific prior written permission. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28.\" SUCH DAMAGE. 29.\" 30.\" @(#)man.1 8.2 (Berkeley) 1/2/94 31.\" 32.Dd August 14, 2014 33.Dt MAN 1 34.Os 35.Sh NAME 36.Nm man 37.Nd display the on-line manual pages 38.Pq aka Dq Em man pages 39.Sh SYNOPSIS 40.Nm 41.Oo Fl acw Ns \&| Ns Fl h Oc 42.Op Fl C Ar file 43.Op Fl M Ar path 44.Op Fl m Ar path 45.Op Fl S Ar srch 46.Oo 47.Op Fl s 48.Ar section 49.Oc 50.Ar name Ar ... 51.Nm 52.Fl k 53.Op Fl C Ar file 54.Op Fl M Ar path 55.Op Fl m Ar path 56.Ar keyword Ar ... 57.Nm 58.Fl p 59.Sh DESCRIPTION 60The 61.Nm 62utility displays the manual pages named on the command line. 63Its options are as follows: 64.Bl -tag -width indent 65.It Fl a 66Display all of the man pages for a specified 67.Ar section 68and 69.Ar name 70combination. 71(Normally, only the first man page found is displayed.) 72.It Fl C 73Use the specified 74.Ar file 75instead of the default configuration file. 76This permits users to configure their own man environment. 77See 78.Xr man.conf 5 79for a description of the contents of this file. 80.It Fl c 81Copy the man page to the standard output instead of using 82.Xr more 1 83to paginate it. 84This is done by default if the standard output is not a terminal device. 85.It Fl h 86Display only the 87.Dq Tn SYNOPSIS 88lines of the requested man pages. 89For commands, this is typically the command line usage information. 90For library functions, this usually contains the required include 91files and function prototypes. 92.It Fl k 93Display the header lines for any man pages matching 94.Ar keyword Ns Pq s , 95in the same manner as 96.Xr apropos 1 . 97.It Fl M 98Override the list of standard directories which 99.Nm 100searches for man pages. 101The supplied 102.Ar path 103must be a colon 104.Pq Dq \&: 105separated list of directories. 106This search path may also be set using the environment variable 107.Ev MANPATH . 108The subdirectories to be searched, and their search order, 109is specified by the 110.Dq _subdir 111line in the 112.Nm 113configuration file. 114.It Fl m 115Augment the list of standard directories which 116.Nm 117searches for man pages. 118The supplied 119.Ar path 120must be a colon 121.Pq Dq \&: 122separated list of directories. 123These directories will be searched before the standard directories or 124the directories specified using the 125.Fl M 126option or the 127.Ev MANPATH 128environment variable. 129The subdirectories to be searched, and their search order, 130is specified by the 131.Dq _subdir 132line in the 133.Nm 134configuration file. 135.It Fl p 136Print the search path for the manual pages. 137.It Fl s 138Restrict the directories that 139.Nm 140will search to the specified section. 141The 142.Nm 143configuration file (see 144.Xr man.conf 5 ) 145specifies the possible 146.Ar section 147values that are currently available. 148.It Fl S 149Display only man pages that have the specified string in the directory 150part of their filenames. 151This allows the man page search process criteria to be 152narrowed without having to change the MANPATH or 153.Dq _default 154variables. 155.It Fl w 156List the pathnames of the man pages which 157.Nm 158would display for the specified 159.Ar section 160and 161.Ar name 162combination. 163.El 164.Pp 165If the 166.Ql Fl s 167option is not specified, 168there is more than one argument, 169the 170.Ql Fl k 171option is not used, and the first argument is a valid section, then that 172argument will be used as if specified by the 173.Ql Fl s 174option. 175.Pp 176If 177.Ar name 178is given with a full path (beginning with 179.Ql Pa \&/ ) 180or a relative path that begins with 181.Ql Pa .\&/ 182or 183.Ql Pa .\&./ , 184then 185.Nm 186interprets it as a file specification, so that you can do 187.Nm 188.Cm ./foo.5 189or even 190.Nm 191.Cm /cd/foo/bar.1.gz . 192If 193.Ar name 194contains 195.Ql Pa / 196but does not match one of the above cases, then the 197search path is used; this allows you to request 198machine-specific man pages, such as 199.Nm Cm vax/boot . 200.Sh ENVIRONMENT 201.Bl -tag -width MANPATHX 202.It Ev MACHINE 203As some man pages are intended only for specific architectures, 204.Nm 205searches any subdirectories, 206with the same name as the current architecture, 207in every directory which it searches. 208Machine specific areas are checked before general areas. 209The current machine type may be overridden by setting the environment 210variable 211.Ev MACHINE 212to the name of a specific architecture. 213Machine-specific man pages may also be requested by 214prepending the relevant subdirectory name to the page name, 215separated by 216.Ql Pa \&/ . 217.It Ev MANPATH 218The standard search path used by 219.Nm 220may be overridden by specifying a path in the 221.Ev MANPATH 222environment variable. 223The format of the path is a colon 224.Pq Dq \&: 225separated list of directories. 226The subdirectories to be searched as well as their search order 227is specified by the 228.Dq _subdir 229line in the 230.Nm 231configuration file. 232.It Ev PAGER 233The pagination command used for writing the output. 234If the 235.Ev PAGER 236environment variable is null or not set, the standard pagination program 237.Xr more 1 238will be used. 239.El 240.Sh FILES 241.Bl -hang -width /etc/man.conf -compact 242.It Pa /etc/man.conf 243default man configuration file. 244.El 245.Sh SEE ALSO 246.Xr apropos 1 , 247.Xr whatis 1 , 248.Xr whereis 1 , 249.Xr man.conf 5 , 250.Xr mdoc 7 , 251.Xr mdoc.samples 7 252.Sh STANDARDS 253.Nm 254conforms to 255.St -xcu5 . 256.\"and is expected to conform to 257.\".St -p1003.2-?? . 258.Sh BUGS 259The on-line man pages are, by necessity, forgiving toward stupid 260display devices, causing a few man pages to be not as nicely formatted 261as their typeset counterparts. 262