Print this page
apropos

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man1/apropos.1
          +++ new/usr/src/man/man1/apropos.1
   1      -.\"
   2      -.\" This file and its contents are supplied under the terms of the
   3      -.\" Common Development and Distribution License ("CDDL"), version 1.0.
   4      -.\" You may only use this file in accordance with the terms of version
   5      -.\" 1.0 of the CDDL.
   6      -.\"
   7      -.\" A full copy of the text of the CDDL should have accompanied this
   8      -.\" source.  A copy of the CDDL is also available via the Internet at
   9      -.\" http://www.illumos.org/license/CDDL.
  10      -.\"
  11      -.\"
  12      -.\" Copyright 2012 Nexenta Systems, Inc. All rights reserved.
  13      -.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
  14      -.\"
  15      -.Dd Jul 18, 2014
        1 +.\"  Copyright (c) 1996, Sun Microsystems, Inc.  All Rights Reserved
        2 +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
        3 +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
        4 +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
        5 +.Dd "Jul 20, 2014"
  16    6  .Dt APROPOS 1
  17    7  .Os
  18    8  .Sh NAME
  19      -.Nm apropos ,
  20      -.Nm whatis
  21      -.Nd keyword search in
  22      -.Nm whatis
  23      -database files
        9 +.Nm apropos, whatis
       10 +.Nd locate commands by keyword lookup
  24   11  .Sh SYNOPSIS
  25      -.Nm
       12 +.Nm apropos
  26   13  .Op Fl M Ar path
  27   14  .Op Fl s Ar section
  28   15  .Ar keyword ...
  29   16  .Nm whatis
  30   17  .Op Fl M Ar path
  31   18  .Op Fl s Ar section
  32   19  .Ar keyword ...
  33   20  .Sh DESCRIPTION
  34   21  The
  35      -.Nm
  36      -utility searches a set of
  37      -.Nm whatis
  38      -database files matching each
       22 +.Nm apropos
       23 +utility displays the man page name, section number, and a
       24 +short description for each man page whose
       25 +.Em NAME
       26 +line contains
  39   27  .Ar keyword .
       28 +This information is contained in the
       29 +.Nm whatis
       30 +database created by the
       31 +.Fl w
       32 +option used with
       33 +.Xr man 1 .
       34 +If this database is not present,
       35 +.Nm apropos
       36 +and
       37 +.Nm whatis
       38 +fail.
       39 +.Lp
       40 +Each word is considered
       41 +separately and the case of letters is ignored. Words which are part of other
       42 +words are considered; for example, when looking for
       43 +.Sq compile ,
       44 +.Nm apropos
       45 +finds all instances of
       46 +.Sq compiler
       47 +also.
       48 +.Lp
  40   49  The
  41   50  .Nm whatis
  42      -utility does the same search but only on complete words. The
       51 +command performs the same search, but only matches whole words. In the above
       52 +example,
  43   53  .Nm whatis
  44      -database files are created using the
       54 +would not match the instances of
       55 +.Sq compiler
       56 +when
       57 +.Ar keyword
       58 +is
       59 +.Sq compile .
       60 +.Lp
       61 +The
       62 +.Nm apropos
       63 +command is actually just the
       64 +.Fl -k
       65 +option to the
  45   66  .Xr man 1
  46   67  command.
  47   68  .Sh OPTIONS
  48      -.Bl -tag -width ".Fl d"
       69 +.Bl -tag -width "-s section"
  49   70  .It Fl M Ar path
  50      -Force a specific colon separated manual path instead of the default search path.
  51      -Overrides the
  52      -.Ev MANPATH
  53      -environment variable.
       71 +Force a specific colon separated manual path instead of the
       72 +default search path.  Overrides the MANPATH environment variable.
  54   73  .It Fl s Ar section
  55      -Restrict search to specified
  56      -.Ar section .
       74 +Restrict search to specified section.
  57   75  .El
  58   76  .Sh ENVIRONMENT
  59      -The following environment variables affect the execution of
  60      -.Nm :
  61      -.Bl -tag -width ".Ev MANPATH , PATH"
       77 +.Bl -tag -width "MANPATH, PATH"
  62   78  .It Ev MANPATH , PATH
  63   79  Used to find the location of the
  64   80  .Nm whatis
  65      -database files.
       81 +database.
  66   82  .El
       83 +.Sh FILES
       84 +.Bl -tag -width "/usr/share/man/whatis"
       85 +.It Pa /usr/share/man/whatis
       86 +table of contents and keyword database
       87 +.El
       88 +.Sh EXAMPLES
       89 +.Ss Example 1 To find a man page whose NAME line contains a keyword
       90 +Try
       91 +.Lp
       92 +.Dl example% apropos password
       93 +.Lp
       94 +If the line starts
       95 +.So Ar filename Ns Po Ar section Pc .\|.\|. Sc
       96 +you can run
       97 +.Lp
       98 +.Dl % Nm man Fl s Ar section Ar filename
       99 +.Lp
      100 +to display the man page for \fIfilename\fR.
      101 +.Ss Example 2 To find the man page for the subroutine \fBprintf()
      102 +Try
      103 +.Lp
      104 +.Dl example% Nm apropos Li format
      105 +.Lp
      106 +and then
      107 +.Lp
      108 +.Dl example% Nm man Fl s Ar 3C Li printf
      109 +.Lp
      110 +to get the manual page on the subroutine
      111 +.Xr printf 3C .
  67  112  .Sh DIAGNOSTICS
      113 +.Bl -tag -width Ds
      114 +.It "/usr/share/man/whatis: No such file or directory"
  68  115  The
  69      -.Nm
  70      -utility exits 0 if a keyword matched and 1 if no keywords are matched or no
  71  116  .Nm whatis
  72      -databases are found.
  73      -.Sh INTERFACE STABILITY
  74      -.Nm Committed .
      117 +database does not exist.
      118 +The command
      119 +.Nm man
      120 +.Fl w
      121 +must be run to create it.
      122 +.El
  75  123  .Sh CODE SET INDEPENDENCE
  76  124  Enabled.
      125 +.Sh INTERFACE STABILITY
      126 +.Nm Committed .
  77  127  .Sh SEE ALSO
  78  128  .Xr man 1 ,
  79      -.Xr mandoc 1
      129 +.Xr catman 1M
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX