1WHEREIS(1)                       User Commands                      WHEREIS(1)
2
3
4

NAME

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

SYNOPSIS

10       whereis [options] [-BMS directory... -f] name...
11

DESCRIPTION

13       whereis locates the binary, source and manual files for the specified
14       command names. The supplied names are first stripped of leading
15       pathname components. Prefixes of s. resulting from use of source code
16       control are also dealt with. whereis then attempts to locate the
17       desired program in the standard Linux places, and in the places
18       specified by $PATH and $MANPATH.
19
20       The search restrictions (options -b, -m and -s) are cumulative and
21       apply to the subsequent name patterns on the command line. Any new
22       search restriction resets the search mask. For example,
23
24          whereis -bm ls tr -m gcc
25
26       searches for "ls" and "tr" binaries and man pages, and for "gcc" man
27       pages only.
28
29       The options -B, -M and -S reset search paths for the subsequent name
30       patterns. For example,
31
32          whereis -m ls -M /usr/share/man/man1 -f cal
33
34       searches for "ls" man pages in all default paths, but for "cal" in the
35       /usr/share/man/man1 directory only.
36

OPTIONS

38       -b
39           Search for binaries.
40
41       -m
42           Search for manuals.
43
44       -s
45           Search for sources.
46
47       -u
48           Only show the command names that have unusual entries. A command is
49           said to be unusual if it does not have just one entry of each
50           explicitly requested type. Thus 'whereis -m -u *' asks for those
51           files in the current directory which have no documentation file, or
52           more than one.
53
54       -B list
55           Limit the places where whereis searches for binaries, by a
56           whitespace-separated list of directories.
57
58       -M list
59           Limit the places where whereis searches for manuals and
60           documentation in Info format, by a whitespace-separated list of
61           directories.
62
63       -S list
64           Limit the places where whereis searches for sources, by a
65           whitespace-separated list of directories.
66
67       -f
68           Terminates the directory list and signals the start of filenames.
69           It must be used when any of the -B, -M, or -S options is used.
70
71       -l
72           Output the list of effective lookup paths that whereis is using.
73           When none of -B, -M, or -S is specified, the option will output the
74           hard-coded paths that the command was able to find on the system.
75
76       -h, --help
77           Display help text and exit.
78
79       -V, --version
80           Print version and exit.
81

FILE SEARCH PATHS

83       By default whereis tries to find files from hard-coded paths, which are
84       defined with glob patterns. The command attempts to use the contents of
85       $PATH and $MANPATH environment variables as default search path. The
86       easiest way to know what paths are in use is to add the -l listing
87       option. Effects of the -B, -M, and -S are displayed with -l.
88

ENVIRONMENT

90       WHEREIS_DEBUG=all
91           enables debug output.
92

EXAMPLES

94       To find all files in /usr/bin which are not documented in /usr/man/man1
95       or have no source in /usr/src:
96
97       cd /usr/bin whereis -u -ms -M /usr/man/man1 -S /usr/src -f *
98

REPORTING BUGS

100       For bug reports, use the issue tracker at
101       https://github.com/util-linux/util-linux/issues.
102

AVAILABILITY

104       The whereis command is part of the util-linux package which can be
105       downloaded from Linux Kernel Archive
106       <https://www.kernel.org/pub/linux/utils/util-linux/>.
107
108
109
110util-linux 2.38.1                 2022-05-11                        WHEREIS(1)
Impressum