1WHEREIS(1)                  General Commands Manual                 WHEREIS(1)
2
3
4

NAME

6       whereis  -  locate the binary, source, and manual page files for a com‐
7       mand
8

SYNOPSIS

10       whereis [ -bmsu ] [ -BMS directory...  -f ] filename ...
11

DESCRIPTION

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

OPTIONS

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

EXAMPLE

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

FILES

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

SEE ALSO

61       chdir(2V)
62

BUGS

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
70
71
72                                  8 May 1994                        WHEREIS(1)
Impressum