2 .\" The Regents of the University of California. All rights reserved.
4 .\" Copyright 2002 Joerg Wunsch
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
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.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
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
30 .\" @(#)whereis.1 8.2 (Berkeley) 12/30/93
41 .Op Fl BMS Ar dir ... Fl f
46 utility checks the standard binary, manual page, and source
47 directories for the specified programs, printing out the paths of any
49 The supplied program names are first stripped of leading
50 path name components, any single trailing extension added by
59 from a source code control system.
61 The default path searched is the string returned by the
67 and the current user's
70 Manual pages are searched by default along the
72 Program sources are located in a list of known standard places,
73 including all the subdirectories of
78 The following options are available:
79 .Bl -tag -width indent
81 Specify directories to search for binaries.
86 Specify directories to search for manual pages.
91 Specify directories to search for program sources.
96 Report all matches instead of only the first of each requested type.
100 Delimits the list of directories after the
105 options, and indicates the beginning of the
109 Search for manual pages.
112 Suppress the output of the utility name in front of the normal
114 This can become handy for use in a backquote substitution of a
115 shell command line, see
118 Search for source directories.
123 A file is said to be unusual if it does not have at least
124 one entry of each requested type.
125 Only the name of the unusual entry is printed.
129 tools when searching for source directories.
130 Normally, after unsuccessfully searching all the first-level
131 subdirectories of the source directory list,
135 to find the entry on its behalf.
136 Since this can take much longer, it can be turned off with
140 The following finds all utilities under
142 that do not have documentation:
144 .Dl whereis -m -u /usr/bin/*
146 Change to the source code directory of
149 .Dl cd `whereis -sq ls`
161 This version re-implements the historical
162 functionality that was lost in
165 This implementation of the
167 command was written by
170 This re-implementation of the
172 utility is not bug-for-bug compatible with historical versions.
173 It is believed to be compatible with the version that was shipping with
181 utility can report some unrelated source entries when the