[BACK]Return to man.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / man

Annotation of src/usr.bin/man/man.1, Revision 1.51

1.51    ! jmc         1: .\"    $OpenBSD: man.1,v 1.50 2011/10/09 02:20:39 schwarze Exp $
1.3       deraadt     2: .\"
1.1       deraadt     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.
1.18      millert    14: .\" 3. Neither the name of the University nor the names of its contributors
1.1       deraadt    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: .\"
1.51    ! jmc        32: .Dd $Mdocdate: October 9 2011 $
1.1       deraadt    33: .Dt MAN 1
1.4       millert    34: .Os
1.1       deraadt    35: .Sh NAME
                     36: .Nm man
1.46      jmc        37: .Nd display manual pages
1.1       deraadt    38: .Sh SYNOPSIS
                     39: .Nm man
                     40: .Op Fl achw
                     41: .Op Fl C Ar file
                     42: .Op Fl M Ar path
                     43: .Op Fl m Ar path
1.21      jmc        44: .Op Fl S Ar subsection
1.4       millert    45: .Op Fl s Ar section
1.1       deraadt    46: .Op Ar section
1.37      sobrado    47: .Ar name ...
1.5       art        48: .Nm man
1.39      jmc        49: .Fl f Ar command ...
1.21      jmc        50: .Nm man
1.39      jmc        51: .Fl k Ar keyword ...
1.1       deraadt    52: .Sh DESCRIPTION
                     53: The
1.9       aaron      54: .Nm
1.1       deraadt    55: utility
                     56: displays the
                     57: .Bx
                     58: manual pages entitled
                     59: .Ar name .
1.33      jmc        60: Pages may be selected according to
                     61: a specific category
                     62: .Pq Ar section
                     63: or
                     64: machine architecture
                     65: .Pq Ar subsection .
1.1       deraadt    66: .Pp
                     67: The options are as follows:
1.13      aaron      68: .Bl -tag -width Ds
1.21      jmc        69: .It Fl a
                     70: Display all of the manual pages for a specified
                     71: .Ar section
                     72: and
                     73: .Ar name
                     74: combination.
1.29      jmc        75: Normally, only the first manual page found is displayed.
1.21      jmc        76: .It Fl C Ar file
                     77: Use the specified
                     78: .Ar file
                     79: instead of the default configuration file.
                     80: This permits users to configure their own manual environment.
                     81: See
                     82: .Xr man.conf 5
                     83: for a description of the contents of this file.
                     84: .It Fl c
                     85: Copy the manual page to the standard output instead of using
                     86: .Xr more 1
                     87: to paginate it.
                     88: This is done by default if the standard output is not a terminal device.
                     89: .It Fl f Ar command
1.30      jmc        90: A synonym for
                     91: .Xr whatis 1 .
                     92: It looks up a given command and
                     93: gives the header line from the manual page.
1.41      jmc        94: .Ar command
                     95: is case insensitive.
1.21      jmc        96: .It Fl h
                     97: Display only the
                     98: .Dq SYNOPSIS
                     99: lines of the requested manual pages.
                    100: .It Fl k Ar keyword
1.30      jmc       101: A synonym for
                    102: .Xr apropos 1 .
                    103: It shows which manual pages contain instances of any of the given
                    104: keywords in their title line.
1.7       deraadt   105: .Ar keyword
1.30      jmc       106: is case insensitive.
1.7       deraadt   107: .Pp
1.30      jmc       108: For instance,
                    109: to list all man pages which contain
1.27      jmc       110: .Dq mount
1.7       deraadt   111: in the
1.21      jmc       112: .Dq NAME
1.30      jmc       113: line of the man page:
                    114: .Pp
                    115: .Dl $ man -k mount
                    116: .Pp
                    117: Which would produce a list much like this:
1.19      jmc       118: .Bd -literal
1.27      jmc       119: amd (8) \(en automatically mount file systems
                    120: amq (8) \(en automounter query tool
                    121: domountroothooks (9) \(en run all mountroot hooks
                    122: exports (5) \(en define remote mount points for NFS mount requests
                    123: getfsstat (2) \(en get list of all mounted file systems
                    124: getmntinfo (3) \(en get information about mounted file systems
                    125: mount (8) \(en mount file systems
                    126: mount, unmount (2) \(en mount or dismount a filesystem
                    127: mount_cd9660 (8) \(en mount an ISO-9660 filesystem
                    128: mount_ext2fs (8) \(en mount an ext2fs file system
                    129: mount_ffs (8) \(en mount a Berkeley Fast File System
                    130: mount_msdos (8) \(en mount an MS-DOS file system
                    131: mount_nfs (8) \(en mount NFS file systems
1.43      jmc       132: mount_nnpfs (8) \(en mount the nnpfs filesystem
1.27      jmc       133: mount_ntfs (8) \(en mount an NTFS file system
                    134: mount_procfs (8) \(en mount the process file system
                    135: mount_udf (8) \(en mount a UDF filesystem
1.48      jmc       136: mount_vnd, vnconfig (8) \(en configure vnode disks
1.27      jmc       137: mountd (8) \(en service remote NFS mount requests
1.11      deraadt   138: \&...
                    139: .Ed
1.8       aaron     140: .It Fl M Ar path
1.1       deraadt   141: Override the list of standard directories which
1.9       aaron     142: .Nm
1.1       deraadt   143: searches for manual pages.
                    144: The supplied
                    145: .Ar path
1.9       aaron     146: must be a colon
                    147: .Pq Ql \&:
                    148: separated list of directories.
1.1       deraadt   149: This search path may also be set using the environment variable
                    150: .Ev MANPATH .
                    151: The subdirectories to be searched, and their search order,
1.21      jmc       152: are specified by the
1.9       aaron     153: .Dq _subdir
                    154: line in the
                    155: .Nm
1.1       deraadt   156: configuration file.
1.8       aaron     157: .It Fl m Ar path
1.1       deraadt   158: Augment the list of standard directories which
1.9       aaron     159: .Nm
1.1       deraadt   160: searches for manual pages.
                    161: The supplied
                    162: .Ar path
1.9       aaron     163: must be a colon
                    164: .Pq Ql \&:
                    165: separated list of directories.
1.1       deraadt   166: These directories will be searched before the standard directories or
                    167: the directories specified using the
                    168: .Fl M
                    169: option or the
                    170: .Ev MANPATH
                    171: environment variable.
                    172: The subdirectories to be searched, and their search order,
1.21      jmc       173: are specified by the
1.9       aaron     174: .Dq _subdir
                    175: line in the
                    176: .Nm
1.1       deraadt   177: configuration file.
1.8       aaron     178: .It Fl S Ar subsection
1.28      jmc       179: Restricts the directories that
                    180: .Nm
1.41      jmc       181: will search to those of a specific
                    182: .Xr machine 1
                    183: architecture.
                    184: .Ar subsection
                    185: is case insensitive.
                    186: .Pp
1.31      jmc       187: By default manual pages for all architectures are installed.
                    188: Therefore this option can be used to view pages for one
                    189: architecture whilst using another.
                    190: .Pp
1.41      jmc       191: This option overrides the
1.4       millert   192: .Ev MACHINE
1.41      jmc       193: environment variable.
1.33      jmc       194: .It Xo
                    195: .Op Fl s
1.1       deraadt   196: .Ar section
1.33      jmc       197: .Xc
                    198: Restricts the directories that
1.9       aaron     199: .Nm
1.28      jmc       200: will search to a specific section.
1.19      jmc       201: The currently available sections are:
                    202: .Pp
1.32      jmc       203: .Bl -tag -width "localXXX" -offset indent -compact
1.19      jmc       204: .It 1
                    205: General commands
                    206: .Pq tools and utilities .
                    207: .It 2
                    208: System calls and error numbers.
                    209: .It 3
                    210: Libraries.
1.38      jmc       211: .It 3f
                    212: Fortran programmer's reference guide.
1.19      jmc       213: .It 3p
                    214: .Xr perl 1
                    215: programmer's reference guide.
                    216: .It 4
                    217: Device drivers.
                    218: .It 5
                    219: File formats.
                    220: .It 6
                    221: Games.
                    222: .It 7
                    223: Miscellaneous.
                    224: .It 8
                    225: System maintenance and operation commands.
                    226: .It 9
                    227: Kernel internals.
1.32      jmc       228: .It X11
                    229: An alias for X11R6.
                    230: .It X11R6
                    231: X Window System.
                    232: .It local
                    233: Pages located in
                    234: .Pa /usr/local .
1.40      deanna    235: .It n
                    236: Tcl/Tk commands.
1.19      jmc       237: .El
                    238: .Pp
1.1       deraadt   239: The
1.9       aaron     240: .Nm
1.28      jmc       241: configuration file,
                    242: .Xr man.conf 5 ,
1.1       deraadt   243: specifies the possible
                    244: .Ar section
1.19      jmc       245: values, and their search order.
1.32      jmc       246: Additional sections may be specified.
1.33      jmc       247: .It Fl w
                    248: List the pathnames of the manual pages which
                    249: .Nm
                    250: would display for the specified
                    251: .Ar section
                    252: and
                    253: .Ar name
                    254: combination.
                    255: .El
1.22      jmc       256: .Pp
                    257: Guidelines for
                    258: .Ox
                    259: man pages can be found in
                    260: .Xr mdoc 7 .
1.47      schwarze  261: .Pp
                    262: If both a formatted and an unformatted version of the same manual page,
                    263: for example
                    264: .Pa cat1/foo.0
                    265: and
                    266: .Pa man1/foo.1 ,
                    267: exist in the same directory, and at least one of them is selected,
                    268: only the newer one is used.
                    269: However, if both the
                    270: .Fl a
                    271: and the
                    272: .Fl w
                    273: options are specified, both file names are printed.
1.1       deraadt   274: .Sh ENVIRONMENT
                    275: .Bl -tag -width MANPATHX
                    276: .It Ev MACHINE
                    277: As some manual pages are intended only for specific architectures,
1.9       aaron     278: .Nm
1.1       deraadt   279: searches any subdirectories,
                    280: with the same name as the current architecture,
                    281: in every directory which it searches.
                    282: Machine specific areas are checked before general areas.
                    283: The current machine type may be overridden by setting the environment
                    284: variable
                    285: .Ev MACHINE
1.28      jmc       286: to the name of a specific architecture,
                    287: or with the
                    288: .Fl S
                    289: option.
1.41      jmc       290: .Ev MACHINE
                    291: is case insensitive.
1.20      millert   292: .It Ev MANPAGER
                    293: Any non-null value of the environment variable
                    294: .Ev MANPAGER
                    295: will be used instead of the standard pagination program,
                    296: .Xr more 1 .
1.1       deraadt   297: .It Ev MANPATH
                    298: The standard search path used by
1.9       aaron     299: .Nm
1.1       deraadt   300: may be overridden by specifying a path in the
                    301: .Ev MANPATH
                    302: environment
                    303: variable.
1.9       aaron     304: The format of the path is a colon
                    305: .Pq Ql \&:
                    306: separated list of directories.
1.21      jmc       307: The subdirectories to be searched, as well as their search order,
                    308: are specified by the
1.9       aaron     309: .Dq _subdir
                    310: line in the
                    311: .Nm
1.1       deraadt   312: configuration file.
                    313: .It Ev PAGER
1.20      millert   314: Specifies the pagination program to use when
                    315: .Ev MANPAGER
                    316: is not defined.
1.1       deraadt   317: .El
                    318: .Sh FILES
                    319: .Bl -tag -width /etc/man.conf -compact
                    320: .It Pa /etc/man.conf
1.8       aaron     321: default man configuration file
1.1       deraadt   322: .El
1.45      jmc       323: .Sh EXIT STATUS
                    324: .Ex -std man
1.1       deraadt   325: .Sh SEE ALSO
                    326: .Xr apropos 1 ,
1.19      jmc       327: .Xr intro 1 ,
1.1       deraadt   328: .Xr whatis 1 ,
                    329: .Xr whereis 1 ,
1.19      jmc       330: .Xr intro 2 ,
                    331: .Xr intro 3 ,
                    332: .Xr intro 4 ,
                    333: .Xr intro 5 ,
                    334: .Xr man.conf 5 ,
                    335: .Xr intro 6 ,
                    336: .Xr intro 7 ,
1.22      jmc       337: .Xr mdoc 7 ,
1.19      jmc       338: .Xr intro 8 ,
                    339: .Xr intro 9
1.34      jmc       340: .Sh STANDARDS
                    341: The
                    342: .Nm
                    343: utility is compliant with the
1.42      jmc       344: .St -p1003.1-2008
1.34      jmc       345: specification.
                    346: .Pp
                    347: The flags
                    348: .Op Fl aCcfhMmSsw
                    349: are extensions to that specification.
1.1       deraadt   350: .Sh HISTORY
                    351: A
                    352: .Nm
1.50      schwarze  353: command first appeared in
1.17      mickey    354: .At v3 .
1.51    ! jmc       355: .Pp
1.50      schwarze  356: The
                    357: .Fl w
                    358: option first appeared in
                    359: .At v7 ;
                    360: .Fl f
                    361: and
                    362: .Fl k
                    363: in
                    364: .Bx 4 ;
                    365: .Fl M
                    366: in
                    367: .Bx 4.3 ;
                    368: .Fl a
                    369: in
                    370: .Bx 4.3 Tahoe ;
                    371: .Fl c
                    372: and
                    373: .Fl m
                    374: in
                    375: .Bx 4.3 Reno ;
                    376: .Fl h
                    377: in
                    378: .Bx 4.3 Net/2 ;
                    379: .Fl C
                    380: in
                    381: .Nx 1.0 ;
                    382: and
                    383: .Fl s
                    384: and
                    385: .Fl S
                    386: in
                    387: .Ox 2.3 .