2 .\" Copyright (c) 2000, Sun Microsystems, Inc.
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 WHEREIS 1B "Jan 10, 2000"
8 whereis \- locate the binary, source, and manual page files for a command
12 \fB/usr/ucb/whereis\fR [\fB-bmsu\fR] [\fB-BMS\fR \fIdirectory\fR... \fB-f\fR] \fIfilename\fR...
18 The \fBwhereis\fR utility locates source/binary and manuals sections for
19 specified files. The supplied names are first stripped of leading pathname
20 components and any (single) trailing extension of the form \fB\&.\fR\fIext\fR,
21 for example, \fB\&.c\fR. Prefixes of \fBs.\fR resulting from use of source code
22 control are also dealt with. \fBwhereis\fR then attempts to locate the desired
23 program in a list of standard places:
54 The following options are supported:
61 Searches only for binaries.
70 Changes or otherwise limits the places where \fBwhereis\fR searches for
80 Terminates the last directory list and signals the start of file names, and
81 \fImust\fR be used when any of the \fB-B\fR, \fB-M\fR, or \fB-S\fR options are
91 Searches only for manual sections.
100 Changes or otherwise limits the places where \fBwhereis\fR searches for manual
110 Searches only for sources.
119 Changes or otherwise limit the places where \fBwhereis\fR searches for sources.
128 Searches for unusual entries. A file is said to be unusual if it does not have
129 one entry of each requested type. Thus `\fBwhereis\fR \fB-m\fR \fB-u\fR
130 \fB*\fR' asks for those files in the current directory which have no
136 \fBExample 1 \fRFinding files
139 Find all files in \fB/usr/bin\fR which are not documented in
140 \fB/usr/share/man/man1\fR with source in \fB/usr/src/cmd\fR:
145 example% \fBcd /usr/ucb\fR
146 example% \fBwhereis -u -M /usr/share/man/man1 -S /usr/src/cmd -f *\fR
162 \fB/usr/{doc,man}/*\fR
168 \fB/etc, /usr/{lib,bin,ucb,old,new,local}\fR
173 \fBchdir\fR(2), \fBattributes\fR(5)
177 Since \fBwhereis\fR uses \fBchdir\fR(2) to run faster, pathnames given with the
178 \fB-M\fR, \fB-S\fR, or \fB-B\fR must be full; that is, they must begin with a