whereis
- locate binary, manual, and or source for program
SYNOPSIS
whereis
[-bms
]
[-u
]
[-BMS dir ... -f
]
name ...
DESCRIPTION
Whereis
locates source/binary and manuals sections for specified files.
The supplied names are first stripped of leading pathname components
and of any (single) trailing extension of the form
`.ext'
,
e.g.
`.c'
Prefixes of
`.s'
resulting from use of source code control are also
dealt with.
Whereis
then attempts to locate the desired program in a list of standard places.
Available options:
-B
Change or limit directories searched for binaries. Requires the
-f
flag.
-M
Change or limit directories searched for manual entries. Requires the
-f
flag.
-S
Change or limit directories searched for source. Requires the
-f
flag.
-b
Search for binaries.
-f
Signals the end of a directory list specified by one or more of the
-B , M
or
-S
options and the start of file
names
-m
Search for manual entries.
-s
Search for source.
-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
asks for those files in the current
directory which have no documentation.
EXAMPLE
The following finds all the files in
/usr/bin
which are not documented
in
/usr/share/man/man1
with source in
/usr/src/cmd:
cd /usr/ucb
whereis -u -M /usr/share/man/man1 -S /usr/src/cmd -f *
FILES
/usr/src/*
/usr/{doc,man}/*
/lib, /etc, /usr/{lib,bin,ucb,old,new,local}
BUGS
Since the program uses
chdir(2)
to run faster, pathnames given with the
-M
-S
and
-B
must be full; i.e. they must begin with a
`/'