Print this page
5025 import and use mandoc
Reviewed by: Hans Rosenfeld <hans.rosenfeld@nexenta.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Albert Lee <trisk@nexenta.com>
Approved by: TBD
   1 '\" te
   2 .\"  Copyright (c) 1996, Sun Microsystems, Inc.  All Rights Reserved
   3 .\" 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.
   4 .\" 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.
   5 .\" 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]
   6 .TH APROPOS 1 "Dec 20, 1996"
   7 .SH NAME
   8 apropos \- locate commands by keyword lookup
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 \fBapropos\fR \fIkeyword\fR...
  13 .fi
  14 
  15 .SH DESCRIPTION
  16 .sp
  17 .LP
  18 The \fBapropos\fR utility displays the man page name, section number, and a
  19 short description for each man page whose \fBNAME\fR line contains
  20 \fIkeyword\fR. This information is contained in the \fB/usr/share/man/windex\fR
  21 database created by \fBcatman\fR(1M). If \fBcatman\fR(1M) was not run, or was
  22 run with the \fB-n\fR option, \fBapropos\fR fails. Each word is considered
  23 separately and the case of letters is ignored. Words which are part of other
  24 words are considered; for example, when looking for `compile', \fBapropos\fR
  25 finds all instances of `compiler' also.
  26 .sp
  27 .LP
  28 \fBapropos\fR is actually just the \fB-k\fR option to the \fBman\fR(1) command.
  29 .SH EXAMPLES
  30 .LP
  31 \fBExample 1 \fRTo find a man page whose NAME line contains a keyword
  32 .sp
  33 .LP
  34 Try
  35 
  36 .sp
  37 .in +2
  38 .nf
  39 example% \fBapropos password\fR
  40 .fi
  41 .in -2
  42 .sp
  43 
  44 .sp
  45 .LP
  46 and
  47 
  48 .sp
  49 .in +2
  50 .nf
  51 example% \fBapropos editor\fR
  52 .fi
  53 .in -2
  54 .sp
  55 
  56 .sp
  57 .LP
  58 If the line starts `\fIfilename\fR(\fIsection\fR) .\|.\|.' you can run
  59 
  60 .sp
  61 .in +2
  62 .nf
  63 man -s \fIsection filename\fR
  64 .fi
  65 .in -2
  66 .sp
  67 
  68 .sp
  69 .LP
  70 to display the man page for \fIfilename\fR.
  71 
  72 .LP
  73 \fBExample 2 \fRTo find the man page for the subroutine \fBprintf()\fR
  74 .sp
  75 .LP
  76 Try
  77 
  78 .sp
  79 .in +2
  80 .nf
  81 example% \fBapropos format\fR
  82 .fi
  83 .in -2
  84 .sp
  85 
  86 .sp
  87 .LP
  88 and then
  89 
  90 .sp
  91 .in +2
  92 .nf
  93 example% \fBman -s 3s printf\fR
  94 .fi
  95 .in -2
  96 .sp
  97 
  98 .sp
  99 .LP
 100 to get the manual page on the subroutine \fBprintf()\fR.
 101 
 102 .SH FILES
 103 .sp
 104 .ne 2
 105 .na
 106 \fB\fB/usr/share/man/windex\fR \fR
 107 .ad
 108 .RS 26n
 109 table of contents and keyword database
 110 .RE
 111 
 112 .SH ATTRIBUTES
 113 .sp
 114 .LP
 115 See \fBattributes\fR(5) for descriptions of the following attributes:
 116 .sp
 117 
 118 .sp
 119 .TS
 120 box;
 121 c | c
 122 l | l .
 123 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 124 _
 125 CSI     Enabled
 126 .TE
 127 
 128 .SH SEE ALSO
 129 .sp
 130 .LP
 131 \fBman\fR(1), \fBwhatis\fR(1), \fBcatman\fR(1M), \fBattributes\fR(5)
 132 .SH DIAGNOSTICS
 133 .sp
 134 .ne 2
 135 .na
 136 \fB\f(CW/usr/share/man/windex: No such file or directory\fR\fR
 137 .ad
 138 .sp .6
 139 .RS 4n
 140 This database does not exist. \fBcatman\fR(1M) must be run to create it.
 141 .RE
 142 
   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
  16 .Dt APROPOS 1
  17 .Os
  18 .Sh NAME
  19 .Nm apropos ,
  20 .Nm whatis
  21 .Nd keyword search in
  22 .Nm whatis
  23 database files
  24 .Sh SYNOPSIS
  25 .Nm
  26 .Op Fl M Ar path
  27 .Op Fl s Ar section
  28 .Ar keyword ...
  29 .Nm whatis
  30 .Op Fl M Ar path
  31 .Op Fl s Ar section
  32 .Ar keyword ...
  33 .Sh DESCRIPTION
  34 The
  35 .Nm
  36 utility searches a set of
  37 .Nm whatis
  38 database files matching each
  39 .Ar keyword .
  40 The
  41 .Nm whatis
  42 utility does the same search but only on complete words. The
  43 .Nm whatis
  44 database files are created using the
  45 .Xr man 1
  46 command.
  47 .Sh OPTIONS
  48 .Bl -tag -width ".Fl d"
  49 .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.
  54 .It Fl s Ar section
  55 Restrict search to specified
  56 .Ar section .
  57 .El
  58 .Sh ENVIRONMENT
  59 The following environment variables affect the execution of
  60 .Nm :
  61 .Bl -tag -width ".Ev MANPATH , PATH"
  62 .It Ev MANPATH , PATH
  63 Used to find the location of the
  64 .Nm whatis
  65 database files.
  66 .El
  67 .Sh DIAGNOSTICS
  68 The
  69 .Nm
  70 utility exits 0 if a keyword matched and 1 if no keywords are matched or no
  71 .Nm whatis
  72 databases are found.
  73 .Sh INTERFACE STABILITY
  74 .Nm Committed .
  75 .Sh CODE SET INDEPENDENCE
  76 Enabled.
  77 .Sh SEE ALSO
  78 .Xr man 1 ,
  79 .Xr mandoc 1