1c535eb59SGordon Tetlow.\"- 2c535eb59SGordon Tetlow.\" Copyright (c) 2010 Gordon Tetlow 3c535eb59SGordon Tetlow.\" All rights reserved. 4c535eb59SGordon Tetlow.\" 5c535eb59SGordon Tetlow.\" Redistribution and use in source and binary forms, with or without 6c535eb59SGordon Tetlow.\" modification, are permitted provided that the following conditions 7c535eb59SGordon Tetlow.\" are met: 8c535eb59SGordon Tetlow.\" 1. Redistributions of source code must retain the above copyright 9c535eb59SGordon Tetlow.\" notice, this list of conditions and the following disclaimer. 10c535eb59SGordon Tetlow.\" 2. Redistributions in binary form must reproduce the above copyright 11c535eb59SGordon Tetlow.\" notice, this list of conditions and the following disclaimer in the 12c535eb59SGordon Tetlow.\" documentation and/or other materials provided with the distribution. 13c535eb59SGordon Tetlow.\" 14c535eb59SGordon Tetlow.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15c535eb59SGordon Tetlow.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16c535eb59SGordon Tetlow.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17c535eb59SGordon Tetlow.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18c535eb59SGordon Tetlow.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19c535eb59SGordon Tetlow.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20c535eb59SGordon Tetlow.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21c535eb59SGordon Tetlow.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22c535eb59SGordon Tetlow.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23c535eb59SGordon Tetlow.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24c535eb59SGordon Tetlow.\" SUCH DAMAGE. 25c535eb59SGordon Tetlow.\" 26c535eb59SGordon Tetlow.\" $FreeBSD$ 27c535eb59SGordon Tetlow.\" 28a6a3e856SRuslan Ermilov.Dd June 3, 2011 29c535eb59SGordon Tetlow.Dt MAN 1 30c535eb59SGordon Tetlow.Os 31c535eb59SGordon Tetlow.Sh NAME 32c535eb59SGordon Tetlow.Nm man 33c535eb59SGordon Tetlow.Nd display online manual documentation pages 34c535eb59SGordon Tetlow.Sh SYNOPSIS 35c535eb59SGordon Tetlow.Nm 36c535eb59SGordon Tetlow.Op Fl adho 379f0f0b4dSRuslan Ermilov.Op Fl t | w 38c535eb59SGordon Tetlow.Op Fl M Ar manpath 39c535eb59SGordon Tetlow.Op Fl P Ar pager 40c535eb59SGordon Tetlow.Op Fl S Ar mansect 41c535eb59SGordon Tetlow.Op Fl m Ar arch Ns Op : Ns Ar machine 42c535eb59SGordon Tetlow.Op Fl p Op Ar eprtv 43c535eb59SGordon Tetlow.Op Ar mansect 44c535eb59SGordon Tetlow.Ar page ... 45c535eb59SGordon Tetlow.Nm 46c535eb59SGordon Tetlow.Fl f 47c535eb59SGordon Tetlow.Ar keyword ... 48c535eb59SGordon Tetlow.Nm 49c535eb59SGordon Tetlow.Fl k 50c535eb59SGordon Tetlow.Ar keyword ... 51c535eb59SGordon Tetlow.Sh DESCRIPTION 52c535eb59SGordon TetlowThe 53c535eb59SGordon Tetlow.Nm 54c535eb59SGordon Tetlowutility finds and displays online manual documentation pages. 55c535eb59SGordon TetlowIf 56c535eb59SGordon Tetlow.Ar mansect 57c535eb59SGordon Tetlowis provided, 58c535eb59SGordon Tetlow.Nm 59c535eb59SGordon Tetlowrestricts the search to the specific section of the manual. 60c535eb59SGordon Tetlow.Pp 61c535eb59SGordon TetlowOptions that 62c535eb59SGordon Tetlow.Nm 63c535eb59SGordon Tetlowunderstands: 64c535eb59SGordon Tetlow.Bl -tag -width indent 65c535eb59SGordon Tetlow.It Fl M Ar manpath 66c535eb59SGordon TetlowForces a specific colon separated manual path instead of the default 67c535eb59SGordon Tetlowsearch path. 68c535eb59SGordon TetlowSee 69c535eb59SGordon Tetlow.Xr manpath 1 . 70c535eb59SGordon TetlowOverrides the 71c535eb59SGordon Tetlow.Ev MANPATH 72c535eb59SGordon Tetlowenvironment variable. 73c535eb59SGordon Tetlow.It Fl P Ar pager 74c535eb59SGordon TetlowUse specified pager. 75c535eb59SGordon TetlowDefaults to 769f0f0b4dSRuslan Ermilov.Dq Li "less -sR" 77a6a3e856SRuslan Ermilovif color support is enabled, or 789f0f0b4dSRuslan Ermilov.Dq Li "more -s" . 79c535eb59SGordon TetlowOverrides the 80a6a3e856SRuslan Ermilov.Ev MANPAGER 81a6a3e856SRuslan Ermilovenvironment variable, which in turn overrides the 82c535eb59SGordon Tetlow.Ev PAGER 83c535eb59SGordon Tetlowenvironment variable. 84c535eb59SGordon Tetlow.It Fl S Ar mansect 85c535eb59SGordon TetlowRestricts manual sections searched to the specified colon delimited list. 86c535eb59SGordon TetlowDefaults to 87*40449c74SBrooks Davis.Dq Li 1:8:2:3:n:4:5:6:7:9:l . 88c535eb59SGordon TetlowOverrides the 89c535eb59SGordon Tetlow.Ev MANSECT 90c535eb59SGordon Tetlowenvironment variable. 91c535eb59SGordon Tetlow.It Fl a 92c535eb59SGordon TetlowDisplay all manual pages instead of just the first found for each 93c535eb59SGordon Tetlow.Ar page 94c535eb59SGordon Tetlowargument. 95c535eb59SGordon Tetlow.It Fl d 96c535eb59SGordon TetlowPrint extra debugging information. 97c535eb59SGordon TetlowRepeat for increased verbosity. 98c535eb59SGordon TetlowDoes not display the manual page. 99c535eb59SGordon Tetlow.It Fl f 100c535eb59SGordon TetlowEmulate 101c535eb59SGordon Tetlow.Xr whatis 1 . 102c535eb59SGordon Tetlow.It Fl h 103c535eb59SGordon TetlowDisplay short help message and exit. 104c535eb59SGordon Tetlow.It Fl k 105c535eb59SGordon TetlowEmulate 106c535eb59SGordon Tetlow.Xr apropos 1 . 107c535eb59SGordon Tetlow.It Fl m Ar arch Ns Op : Ns Ar machine 108c535eb59SGordon TetlowOverride the default architecture and machine settings allowing lookup of 109c535eb59SGordon Tetlowother platform specific manual pages. 110c535eb59SGordon TetlowSee 111c535eb59SGordon Tetlow.Sx IMPLEMENTATION NOTES 112c535eb59SGordon Tetlowfor how this option changes the default behavior. 113c535eb59SGordon TetlowOverrides the 114c535eb59SGordon Tetlow.Ev MACHINE_ARCH 115c535eb59SGordon Tetlowand 116c535eb59SGordon Tetlow.Ev MACHINE 117c535eb59SGordon Tetlowenvironment variables. 118c535eb59SGordon Tetlow.It Fl o 119c535eb59SGordon TetlowForce use of non-localized manual pages. 120c535eb59SGordon TetlowSee 121c535eb59SGordon Tetlow.Sx IMPLEMENTATION NOTES 122c535eb59SGordon Tetlowfor how locale specific searches work. 123c535eb59SGordon TetlowOverrides the 124c535eb59SGordon Tetlow.Ev LC_ALL , LC_CTYPE , 125c535eb59SGordon Tetlowand 126c535eb59SGordon Tetlow.Ev LANG 127c535eb59SGordon Tetlowenvironment variables. 1289f0f0b4dSRuslan Ermilov.It Fl p Op Cm eprtv 129c535eb59SGordon TetlowUse the list of given preprocessors before running 130c535eb59SGordon Tetlow.Xr nroff 1 131c535eb59SGordon Tetlowor 132c535eb59SGordon Tetlow.Xr troff 1 . 133c535eb59SGordon TetlowValid preprocessors arguments: 1349f0f0b4dSRuslan Ermilov.Pp 135c535eb59SGordon Tetlow.Bl -tag -width indent -compact 136c535eb59SGordon Tetlow.It Cm e 137c535eb59SGordon Tetlow.Xr eqn 1 138c535eb59SGordon Tetlow.It Cm p 139c535eb59SGordon Tetlow.Xr pic 1 140c535eb59SGordon Tetlow.It Cm r 141c535eb59SGordon Tetlow.Xr refer 1 142c535eb59SGordon Tetlow.It Cm t 143c535eb59SGordon Tetlow.Xr tbl 1 144c535eb59SGordon Tetlow.It Cm v 145c535eb59SGordon Tetlow.Xr vgrind 1 146c535eb59SGordon Tetlow.El 1479f0f0b4dSRuslan Ermilov.Pp 148c535eb59SGordon TetlowOverrides the 149c535eb59SGordon Tetlow.Ev MANROFFSEQ 150c535eb59SGordon Tetlowenvironment variable. 151c535eb59SGordon Tetlow.It Fl t 152c535eb59SGordon TetlowSend manual page source through 153c535eb59SGordon Tetlow.Xr troff 1 154c535eb59SGordon Tetlowallowing transformation of the manual pages to other formats. 155c535eb59SGordon Tetlow.It Fl w 156c535eb59SGordon TetlowDisplay the location of the manual page instead of the contents of 157c535eb59SGordon Tetlowthe manual page. 158c535eb59SGordon Tetlow.El 159c535eb59SGordon Tetlow.Sh IMPLEMENTATION NOTES 160c535eb59SGordon Tetlow.Ss Locale Specific Searches 161c535eb59SGordon TetlowThe 162c535eb59SGordon Tetlow.Nm 163c535eb59SGordon Tetlowutility supports manual pages in different locales. 164c535eb59SGordon TetlowThe search behavior is dictated by the first of three 165c535eb59SGordon Tetlowenvironment variables with a nonempty string: 1669f0f0b4dSRuslan Ermilov.Ev LC_ALL , LC_CTYPE , 167c535eb59SGordon Tetlowor 168c535eb59SGordon Tetlow.Ev LANG . 169c535eb59SGordon TetlowIf set, 170c535eb59SGordon Tetlow.Nm 171c535eb59SGordon Tetlowwill search for locale specific manual pages using the following logic: 1729f0f0b4dSRuslan Ermilov.Pp 1739f0f0b4dSRuslan Ermilov.Bl -item -offset indent -compact 174c535eb59SGordon Tetlow.It 1759f0f0b4dSRuslan Ermilov.Va lang Ns _ Ns Va country Ns . Ns Va charset 176c535eb59SGordon Tetlow.It 1779f0f0b4dSRuslan Ermilov.Va lang Ns . Ns Va charset 178c535eb59SGordon Tetlow.It 1799f0f0b4dSRuslan Ermilov.Li en Ns . Ns Va charset 180c535eb59SGordon Tetlow.El 1819f0f0b4dSRuslan Ermilov.Pp 182c535eb59SGordon TetlowFor example, if 183c535eb59SGordon Tetlow.Ev LC_ALL 184c535eb59SGordon Tetlowis set to 1859f0f0b4dSRuslan Ermilov.Dq Li ja_JP.eucJP , 186c535eb59SGordon Tetlow.Nm 187c535eb59SGordon Tetlowwill search the following paths when considering section 1 manual pages in 188c535eb59SGordon Tetlow.Pa /usr/share/man : 1899f0f0b4dSRuslan Ermilov.Pp 1909f0f0b4dSRuslan Ermilov.Bl -item -offset indent -compact 191c535eb59SGordon Tetlow.It 192c535eb59SGordon Tetlow.Pa /usr/share/man/ja_JP.eucJP/man1 193c535eb59SGordon Tetlow.It 194c535eb59SGordon Tetlow.Pa /usr/share/man/ja.eucJP/man1 195c535eb59SGordon Tetlow.It 196c535eb59SGordon Tetlow.Pa /usr/share/man/en.eucJP/man1 197c535eb59SGordon Tetlow.It 198c535eb59SGordon Tetlow.Pa /usr/share/man/man1 199c535eb59SGordon Tetlow.El 200c535eb59SGordon Tetlow.Ss Platform Specific Searches 201c535eb59SGordon TetlowThe 202c535eb59SGordon Tetlow.Nm 203c535eb59SGordon Tetlowutility supports platform specific manual pages. 204c535eb59SGordon TetlowThe search behavior is dictated by the 205c535eb59SGordon Tetlow.Fl m 206c535eb59SGordon Tetlowoption or the 207c535eb59SGordon Tetlow.Ev MACHINE_ARCH 208c535eb59SGordon Tetlowand 209c535eb59SGordon Tetlow.Ev MACHINE 210c535eb59SGordon Tetlowenvironment variables. 211c535eb59SGordon TetlowFor example, if 212c535eb59SGordon Tetlow.Ev MACHINE_ARCH 213c535eb59SGordon Tetlowis set to 2149f0f0b4dSRuslan Ermilov.Dq Li i386 215c535eb59SGordon Tetlowand 216c535eb59SGordon Tetlow.Ev MACHINE 217c535eb59SGordon Tetlowis set to 2189f0f0b4dSRuslan Ermilov.Dq Li pc98 , 219c535eb59SGordon Tetlow.Nm 220c535eb59SGordon Tetlowwill search the following paths when considering section 4 manual pages in 221c535eb59SGordon Tetlow.Pa /usr/share/man : 2229f0f0b4dSRuslan Ermilov.Pp 2239f0f0b4dSRuslan Ermilov.Bl -item -offset indent -compact 224c535eb59SGordon Tetlow.It 225c535eb59SGordon Tetlow.Pa /usr/share/man/man4/pc98 226c535eb59SGordon Tetlow.It 227c535eb59SGordon Tetlow.Pa /usr/share/man/man4/i386 228c535eb59SGordon Tetlow.It 229c535eb59SGordon Tetlow.Pa /usr/share/man/man4 230c535eb59SGordon Tetlow.El 2313d9127f1SGordon Tetlow.Ss Displaying Specific Manual Files 2323d9127f1SGordon TetlowThe 2333d9127f1SGordon Tetlow.Nm 2343d9127f1SGordon Tetlowutility also supports displaying a specific manual page if passed a path 2353d9127f1SGordon Tetlowto the file as long as it contains a 2369f0f0b4dSRuslan Ermilov.Ql / 2373d9127f1SGordon Tetlowcharacter. 238c535eb59SGordon Tetlow.Sh ENVIRONMENT 239c535eb59SGordon TetlowThe following environment variables affect the execution of 240c535eb59SGordon Tetlow.Nm : 2419f0f0b4dSRuslan Ermilov.Bl -tag -width ".Ev MANROFFSEQ" 242c535eb59SGordon Tetlow.It Ev LC_ALL , LC_CTYPE , LANG 243c535eb59SGordon TetlowUsed to find locale specific manual pages. 244c535eb59SGordon TetlowValid values can be found by running the 245c535eb59SGordon Tetlow.Xr locale 1 246c535eb59SGordon Tetlowcommand. 247c535eb59SGordon TetlowSee 248c535eb59SGordon Tetlow.Sx IMPLEMENTATION NOTES 249c535eb59SGordon Tetlowfor details. 250c535eb59SGordon TetlowInfluenced by the 251c535eb59SGordon Tetlow.Fl o 252c535eb59SGordon Tetlowoption. 253c535eb59SGordon Tetlow.It Ev MACHINE_ARCH , MACHINE 254c535eb59SGordon TetlowUsed to find platform specific manual pages. 255c535eb59SGordon TetlowIf unset, the output of 2569f0f0b4dSRuslan Ermilov.Dq Li "sysctl hw.machine_arch" 257c535eb59SGordon Tetlowand 2589f0f0b4dSRuslan Ermilov.Dq Li "sysctl hw.machine" 259c535eb59SGordon Tetlowis used respectively. 260c535eb59SGordon TetlowSee 261c535eb59SGordon Tetlow.Sx IMPLEMENTATION NOTES 262c535eb59SGordon Tetlowfor details. 263c535eb59SGordon TetlowCorresponds to the 264c535eb59SGordon Tetlow.Fl m 265c535eb59SGordon Tetlowoption. 266c535eb59SGordon Tetlow.It Ev MANPATH 267c535eb59SGordon TetlowUsed to find the location of the manual files. 268c535eb59SGordon TetlowSee 269c535eb59SGordon Tetlow.Xr manpath 1 270c535eb59SGordon Tetlowfor additional information. 271c535eb59SGordon TetlowCorresponds to the 272c535eb59SGordon Tetlow.Fl M 273c535eb59SGordon Tetlowoption. 274c535eb59SGordon Tetlow.It Ev MANROFFSEQ 275c535eb59SGordon TetlowUsed to determine the preprocessors for the manual source before running 276c535eb59SGordon Tetlow.Xr nroff 1 277c535eb59SGordon Tetlowor 278c535eb59SGordon Tetlow.Xr troff 1 . 279c535eb59SGordon TetlowIf unset, defaults to 280c535eb59SGordon Tetlow.Xr tbl 1 . 281c535eb59SGordon TetlowCorresponds to the 282c535eb59SGordon Tetlow.Fl p 283c535eb59SGordon Tetlowoption. 284c535eb59SGordon Tetlow.It Ev MANSECT 285c535eb59SGordon TetlowRestricts manual sections searched to the specified colon delimited list. 286c535eb59SGordon TetlowCorresponds to the 287c535eb59SGordon Tetlow.Fl S 288c535eb59SGordon Tetlowoption. 289a0094449SRuslan Ermilov.It Ev MANWIDTH 290a0094449SRuslan ErmilovIf set to a numeric value, used as the width manpages should be displayed. 291a0094449SRuslan ErmilovOtherwise, if set to a special value 292a0094449SRuslan Ermilov.Dq Li tty , 293a0094449SRuslan Ermilovand output is to a terminal, 294a0094449SRuslan Ermilovthe pages may be displayed over the whole width of the screen. 295a6a3e856SRuslan Ermilov.It Ev MANCOLOR 296a6a3e856SRuslan ErmilovIf set, enables color support. 297a6a3e856SRuslan Ermilov.It Ev MANPAGER 298c535eb59SGordon TetlowProgram used to display files. 299a6a3e856SRuslan Ermilov.Pp 300a6a3e856SRuslan ErmilovIf unset, and color support is enabled, 3019f0f0b4dSRuslan Ermilov.Dq Li "less -sR" 302a6a3e856SRuslan Ermilovis used. 303a6a3e856SRuslan Ermilov.Pp 304a6a3e856SRuslan ErmilovIf unset, and color support is disabled, then 305a6a3e856SRuslan Ermilov.Ev PAGER 306a6a3e856SRuslan Ermilovis used. 307a6a3e856SRuslan ErmilovIf that has no value either, 3089f0f0b4dSRuslan Ermilov.Dq Li "more -s" 309c535eb59SGordon Tetlowis used. 310c535eb59SGordon Tetlow.El 311c535eb59SGordon Tetlow.Sh FILES 312c535eb59SGordon Tetlow.Bl -tag -width indent -compact 313c535eb59SGordon Tetlow.It Pa /etc/man.conf 314c535eb59SGordon TetlowSystem configuration file. 315c535eb59SGordon Tetlow.It Pa /usr/local/etc/man.d/*.conf 316c535eb59SGordon TetlowLocal configuration files. 317c535eb59SGordon Tetlow.El 318c535eb59SGordon Tetlow.Sh SEE ALSO 319c535eb59SGordon Tetlow.Xr apropos 1 , 3209f0f0b4dSRuslan Ermilov.Xr intro 1 , 321c535eb59SGordon Tetlow.Xr locale 1 , 322c535eb59SGordon Tetlow.Xr manpath 1 , 323c535eb59SGordon Tetlow.Xr nroff 1 , 324c535eb59SGordon Tetlow.Xr troff 1 , 3259f0f0b4dSRuslan Ermilov.Xr whatis 1 , 3269f0f0b4dSRuslan Ermilov.Xr man.conf 5 327