1WHEREIS(1) General Commands Manual WHEREIS(1)
2
3
4
6 whereis - locate the binary, source, and manual page files for a com‐
7 mand
8
10 whereis [-bmsu] [-BMS directory... -f] filename...
11
13 whereis locates source/binary and manuals sections for specified files.
14 The supplied names are first stripped of leading pathname components
15 and any (single) trailing extension of the form .ext, for example, .c.
16 Prefixes of s. resulting from use of source code control are also
17 dealt with. whereis then attempts to locate the desired program in a
18 list of standard Linux places.
19
21 -b Search only for binaries.
22
23 -m Search only for manual sections.
24
25 -s Search only for sources.
26
27 -u Search for unusual entries. A file is said to be unusual if it
28 does not have one entry of each requested type. Thus
29 `whereis -m -u *' asks for those files in the current direc‐
30 tory which have no documentation.
31
32 -B Change or otherwise limit the places where whereis searches for
33 binaries.
34
35 -M Change or otherwise limit the places where whereis searches for
36 manual sections.
37
38 -S Change or otherwise limit the places where whereis searches for
39 sources.
40
41 -f Terminate the last directory list and signals the start of file
42 names, and must be used when any of the -B, -M, or -S options
43 are used.
44
46 Find all files in /usr/bin which are not documented in /usr/man/man1
47 with source in /usr/src:
48
49 example% cd /usr/bin
50 example% whereis -u -M /usr/man/man1 -S /usr/src -f *
51
53 /{bin,sbin,etc}
54
55 /usr/{lib,bin,old,new,local,games,include,etc,src,man,sbin,
56 X386,TeX,g++-include}
57
58 /usr/local/{X386,TeX,X11,include,lib,man,etc,bin,games,emacs}
59
61 chdir(2V)
62
64 Since whereis uses chdir(2V) to run faster, pathnames given with the
65 -M, -S, or -B must be full; that is, they must begin with a `/'.
66
67 whereis has a hard-coded path, so may not always find what you're look‐
68 ing for.
69
71 The whereis command is part of the util-linux-ng package and is avail‐
72 able from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
73
74
75
76 8 May 1994 WHEREIS(1)