]> git.ipfire.org Git - thirdparty/util-linux.git/blame - misc-utils/whereis.1
Imported from util-linux-2.8 tarball.
[thirdparty/util-linux.git] / misc-utils / whereis.1
CommitLineData
6dbe3af9
KZ
1.\" Copyright (c) 1980, 1990 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\" notice, this list of conditions and the following disclaimer in the
11.\" documentation and/or other materials provided with the distribution.
12.\" 3. All advertising materials mentioning features or use of this software
13.\" must display the following acknowledgement:
14.\" This product includes software developed by the University of
15.\" California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\" may be used to endorse or promote products derived from this software
18.\" without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)whereis.1 from UCB 4.2
33.TH WHEREIS 1 "8 May 1994"
34.SH NAME
35whereis \- locate the binary, source, and manual page files for a command
36.SH SYNOPSIS
37.B whereis
38[
39.B \-bmsu
40] [
41.B \-BMS
42.IR directory .\|.\|.
43.B \-f
44]
45\fIfilename\fP\|
46\&.\|.\|.
47.IX "whereis command" "" "\fLwhereis\fP \(em find program"
48.IX find "program \(em \fLwhereis\fP"
49.IX "locate program" "" "locate program \(em \fLwhereis\fP"
50.IX command locate "" "locate \(em \fLwhereis\fP"
51.SH DESCRIPTION
52.B whereis
53locates source/binary and manuals sections for specified
54files.
55The supplied names are first stripped of leading pathname components
56and any (single) trailing extension of the form
57.BI . ext,
58for example,
59.BR .c .
60Prefixes of
61.B s.
62resulting from use of source code control are also dealt with.
63.B whereis
64then attempts to locate the desired program in
2b6fc908 65a list of standard Linux places.
6dbe3af9
KZ
66.SH OPTIONS
67.TP
68\fB\-b
69Search only for binaries.
70.TP
71.B \-m
72Search only for manual sections.
73.TP
74.B \-s
75Search only for sources.
76.TP
77.B \-u
78Search for unusual entries. A file is said to be unusual if it does
79not have one entry of each requested type.
80Thus
81.RB ` "whereis\ \ \-m\ \ \-u\ \ *" '
82asks for those files in the current
83directory which have no documentation.
84.TP
85.B \-B
86Change or otherwise limit the places where
87.B whereis
88searches for binaries.
89.TP
90.B \-M
91Change or otherwise limit the places where
92.B whereis
93searches for
94manual sections.
95.TP
96.B \-S
97Change or otherwise limit the places where
98.B whereis
99searches for sources.
100.TP
101.B \-f
102Terminate the last directory list and signals the start of file names,
103and
104.I must
105be used when any of the
106.BR \-B ,
107.BR \-M ,
108or
109.B \-S
110options are used.
111.SH EXAMPLE
112Find all files in
113.B /usr/bin
114which are not documented
115in
116.B /usr/man/man1
117with source in
118.BR /usr/src :
119.IP
120.nf
121.ft B
122example% cd /usr/bin
123example% whereis \-u \-M /usr/man/man1 \-S /usr/src \-f *
124.fi
125.ft R
126.SH FILES
6dbe3af9
KZ
127.TP 20
128.B /{bin,sbin,etc}
129.TP
130.B /usr/{lib,bin,old,new,local,games,include,etc,src,man,sbin,
131.B X386,TeX,g++-include}
132.TP
2b6fc908
KZ
133.B /usr/local/{X386,TeX,X11,include,lib,man,etc,bin,games,emacs}
134.SH "SEE ALSO"
6dbe3af9
KZ
135.BR chdir (2V)
136.SH BUGS
137Since
138.B whereis
139uses
140.BR chdir (2V)
141to run faster, pathnames given with the
142.BR \-M ,
143.BR \-S ,
144or
145.B \-B
146must be full; that is, they must begin with a
147.RB ` / '.
2b6fc908
KZ
148.PP
149.B whereis
150has a hard-coded path, so may not always find what
151you're looking for.