1.\" $NetBSD: man.1,v 1.21 2009/10/07 08:30:31 cegger 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 October 6, 2009 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.Op 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.Sh DESCRIPTION 58The 59.Nm 60utility displays the manual pages named on the command line. 61Its options are as follows: 62.Bl -tag -width indent 63.It Fl a 64Display all of the man pages for a specified 65.Ar section 66and 67.Ar name 68combination. 69(Normally, only the first man page found is displayed.) 70.It Fl C 71Use the specified 72.Ar file 73instead of the default configuration file. 74This permits users to configure their own man environment. 75See 76.Xr man.conf 5 77for a description of the contents of this file. 78.It Fl c 79Copy the man page to the standard output instead of using 80.Xr more 1 81to paginate it. 82This is done by default if the standard output is not a terminal device. 83.It Fl h 84Display only the 85.Dq Tn SYNOPSIS 86lines of the requested man pages. 87For commands, this is typically the command line usage information. 88For library functions, this usually contains the required include 89files and function prototypes. 90.It Fl k 91Display the header lines for any man pages matching 92.Ar keyword Ns Pq s , 93in the same manner as 94.Xr apropos 1 . 95.It Fl M 96Override the list of standard directories which 97.Nm 98searches for man pages. 99The supplied 100.Ar path 101must be a colon 102.Pq Dq \&: 103separated list of directories. 104This search path may also be set using the environment variable 105.Ev MANPATH . 106The subdirectories to be searched, and their search order, 107is specified by the 108.Dq _subdir 109line in the 110.Nm 111configuration file. 112.It Fl m 113Augment the list of standard directories which 114.Nm 115searches for man pages. 116The supplied 117.Ar path 118must be a colon 119.Pq Dq \&: 120separated list of directories. 121These directories will be searched before the standard directories or 122the directories specified using the 123.Fl M 124option or the 125.Ev MANPATH 126environment variable. 127The subdirectories to be searched, and their search order, 128is specified by the 129.Dq _subdir 130line in the 131.Nm 132configuration file. 133.It Fl s 134Restrict the directories that 135.Nm 136will search to the specified section. 137The 138.Nm 139configuration file (see 140.Xr man.conf 5 ) 141specifies the possible 142.Ar section 143values that are currently available. 144.It Fl S 145Display only man pages that have the specified string in the directory 146part of their filenames. 147This allows the man page search process criteria to be 148narrowed without having to change the MANPATH or 149.Dq _default 150variables. 151.It Fl w 152List the pathnames of the man pages which 153.Nm 154would display for the specified 155.Ar section 156and 157.Ar name 158combination. 159.El 160.Pp 161If the 162.Ql Fl s 163option is not specified, 164there is more than one argument, 165the 166.Ql Fl k 167option is not used, and the first argument is a valid section, then that 168argument will be used as if specified by the 169.Ql Fl s 170option. 171.Pp 172If 173.Ar name 174is given with a full or relative path then 175.Nm 176interprets it as a file specification, so that you can do 177.Nm 178.Cm ./foo.5 179or even 180.Nm 181.Cm /cd/foo/bar.1.gz . 182.Sh ENVIRONMENT 183.Bl -tag -width MANPATHX 184.It Ev MACHINE 185As some man pages are intended only for specific architectures, 186.Nm 187searches any subdirectories, 188with the same name as the current architecture, 189in every directory which it searches. 190Machine specific areas are checked before general areas. 191The current machine type may be overridden by setting the environment 192variable 193.Ev MACHINE 194to the name of a specific architecture. 195.It Ev MANPATH 196The standard search path used by 197.Nm 198may be overridden by specifying a path in the 199.Ev MANPATH 200environment 201variable. 202The format of the path is a colon 203.Pq Dq \&: 204separated list of directories. 205The subdirectories to be searched as well as their search order 206is specified by the 207.Dq _subdir 208line in the 209.Nm 210configuration file. 211.It Ev PAGER 212The pagination command used for writing the output. 213If the 214.Ev PAGER 215environment variable is null or not set, the standard pagination program 216.Xr more 1 217will be used. 218.El 219.Sh FILES 220.Bl -hang -width /etc/man.conf -compact 221.It Pa /etc/man.conf 222default man configuration file. 223.It Pa /usr/{share,X11R6,pkg,local}/man/whatis.db 224standard whatis/apropos database search path, 225set in 226.Pa /etc/man.conf . 227.El 228.Sh SEE ALSO 229.Xr apropos 1 , 230.Xr whatis 1 , 231.Xr whereis 1 , 232.Xr man.conf 5 , 233.Xr mdoc 7 , 234.Xr mdoc.samples 7 235.Sh STANDARDS 236.Nm 237conforms to 238.St -xcu5 . 239.\"and is expected to conform to 240.\".St -p1003.2-?? . 241.Sh BUGS 242The on-line man pages are, by necessity, forgiving toward stupid 243display devices, causing a few man pages to be not as nicely formatted 244as their typeset counterparts. 245