BSD 4_3_Tahoe development
[unix-history] / usr / man / cat1 / whereis.0
WHEREIS(1) UNIX Programmer's Manual WHEREIS(1)
N\bNA\bAM\bME\bE
whereis - locate source, binary, and or manual for program
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
w\bwh\bhe\ber\bre\bei\bis\bs [ -\b-s\bsb\bbm\bm ] [ -\b-u\bu ] [ -\b-S\bSB\bBM\bM dir ... -\b-f\bf ] name ...
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
_\bW_\bh_\be_\br_\be_\bi_\bs locates source/binary and manuals sections for
specified files. The supplied names are first stripped of
leading pathname components and any (single) trailing exten-
sion of the form ``.ext'', e.g. ``.c''. Prefixes of ``s.''
resulting from use of source code control are also dealt
with. _\bW_\bh_\be_\br_\be_\bi_\bs then attempts to locate the desired program
in a list of standard places. If any of the -\b-b\bb,\b, -\b-s\bs or -\b-m\bm
flags are given then _\bw_\bh_\be_\br_\be_\bi_\bs searches only for binaries,
sources or manual sections respectively (or any two
thereof). The -\b-u\bu flag may be used to 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.
Finally, the -\b-B\bB -\b-M\bM and -\b-S\bS flags may be used to change or
otherwise limit the places where _\bw_\bh_\be_\br_\be_\bi_\bs searches. The -\b-f\bf
file flags is used to terminate the last such directory list
and signal the start of file names.
E\bEX\bXA\bAM\bMP\bPL\bLE\bE
The following finds all the files in /usr/bin which are not
documented in /usr/man/man1 with source in /usr/src/cmd:
cd /usr/ucb
whereis -u -M /usr/man/man1 -S /usr/src/cmd -f *
F\bFI\bIL\bLE\bES\bS
/usr/src/*
/usr/{doc,man}/*
/lib, /etc, /usr/{lib,bin,ucb,old,new,local}
B\bBU\bUG\bGS\bS
Since the program uses _\bc_\bh_\bd_\bi_\br(2) to run faster, pathnames
given with the -\b-M\bM -\b-S\bS and -\b-B\bB must be full; i.e. they must
begin with a ``/''.
Printed 7/9/88 May 7, 1986 1