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" 6 .Dt APROPOS 1 7 .Os 8 .Sh NAME 9 .Nm apropos, whatis 10 .Nd locate commands by keyword lookup 11 .Sh SYNOPSIS 12 .Nm apropos 13 .Op Fl M Ar path 14 .Op Fl s Ar section 15 .Ar keyword ... 16 .Nm whatis 17 .Op Fl M Ar path 18 .Op Fl s Ar section 19 .Ar keyword ... 20 .Sh DESCRIPTION 21 The 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 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 49 The 50 .Nm whatis 51 command performs the same search, but only matches whole words. In the above 52 example, 53 .Nm whatis 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 66 .Xr man 1 67 command. 68 .Sh OPTIONS 69 .Bl -tag -width "-s section" 70 .It Fl M Ar path 71 Force a specific colon separated manual path instead of the 72 default search path. Overrides the MANPATH environment variable. 73 .It Fl s Ar section 74 Restrict search to specified section. 75 .El 76 .Sh ENVIRONMENT 77 .Bl -tag -width "MANPATH, PATH" 78 .It Ev MANPATH , PATH 79 Used to find the location of the 80 .Nm whatis 81 database. 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 . 112 .Sh DIAGNOSTICS 113 .Bl -tag -width Ds 114 .It "/usr/share/man/whatis: No such file or directory" 115 The 116 .Nm whatis 117 database does not exist. 118 The command 119 .Nm man 120 .Fl w 121 must be run to create it. 122 .El 123 .Sh CODE SET INDEPENDENCE 124 Enabled. 125 .Sh INTERFACE STABILITY 126 .Nm Committed . 127 .Sh SEE ALSO 128 .Xr man 1 , 129 .Xr catman 1M