NAME
whereis — locate source, binary, and/or manual for program
SYNOPSIS
whereis
[-bsm]
[-u]
[-BMS
dir...
-f]
name...
DESCRIPTION
whereis
locates source, binary, and manuals sections for specified files.
The supplied names are first stripped of leading path name components
and any (single) trailing extension of the form
.ext
(such as
.c).
Prefixes of
s.
resulting from use of
SCCS
are also dealt with.
whereis
then attempts to locate the desired program in a list of standard places.
Options
whereis
recognizes the following command-line options:
- -b
Limit search to binary files.
Can be used in conjunction with
-s
or
-m.
- -s
Limit search to source-code files.
Can be used in conjunction with
-b
or
-m.
- -m
Limit search to manual entry files.
Can be used in conjunction with
-b
or
-s.
- -u
Search for unusual entries.
A file is said to be unusual if it does not have one entry of
each requested type.
Thus,
whereis -m -u *
searches for those files in the current directory
that have no corresponding manual entry.
- -B dir [dir ...]
Limit search to binaries located in one or more specified directories.
Can be used in conjunction with
-S
or
-M.
- -S dir [dir ...]
Limit search to source files located in one or more specified directories.
Can be used in conjunction with
-B
or
-M.
- -M dir [dir ...]
Limit search to manual entry files
located in one or more specified directories.
Can be used in conjunction with
-B
or
-S.
- -f
Terminates the last directory list
(-B,
-S,
or
-M
options) and identifies the start of file names.
EXTERNAL INFLUENCES
International Code Set Support
Single- and multi-byte character code sets are supported.
EXAMPLES
Find all the files in
/usr/bin
that are not documented in
/usr/share/man/man1
with source files in
/usr/src/cmd:
cd /usr/bin
whereis -u -M /usr/share/man/man1 -S /usr/src/cmd -f *
WARNINGS
whereis
uses the
chdir()
system call (see
chdir(2))
to run faster.
Therefore, path names given with the
-B,
-M,
and
-S
options must be absolute path names.
AUTHOR
whereis
was developed by the University of California, Berkeley.
FILES
/usr/src/*
/usr/sbin, /sbin, /usr/bin, /usr/lbin, /usr/ccs/bin
/usr/share/man/*
/usr/local/{man/*, bin, games, include, lib}
/usr/contrib/{man/*, bin, games, include, lib}
/usr/share/man/$LANG/*
/usr/local/man/$LANG/*
/usr/contrib/man/$LANG/*