WHEREIS(1)
NAME
whereis − locate binary and/or manual for program
USAGE
whereis [ −sbm ] [ −u ] [ −SBM dir ... −f ] name ...
DESCRIPTION
Whereis locates binaries for named programs. It can also be used to locate specified documentation from command reference sources. Whereis first strips the supplied names of leading pathname components and any single trailing extensions consisting of a period followed by one or more characters, e.g., .c. It then attempts to locate the desired program in a list of standard places.
OPTIONS
−b Search only for binaries.
−m Search only for manual sections.
−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 that have no documentation.
−Bdir... Change or otherwise limit search to binaries in the directory specified by dir.
−Mdir... Change or otherwise limit search to manual sections in the directory specified by dir.
−Sdir... Change or otherwise limit search to sources in the directory specified by dir.
−f Terminate the last directory list and signal the start of filenames.
EXAMPLE
To find all the files in /usr/bin that are not documented in /usr/man/man1 with the source in /usr/src/cmd, type the following:
cd /usr/bin
whereis −u −M /usr/man/man1 −S /usr/src/cmd −f *
CAUTIONS
Since the program uses chdir (2) to run faster, pathnames given with the −M, −S, and −B options must be full, i.e., they must begin with a slash (/).
The −f option must be used to delineate directory names from search names if the −M, −S, or −B options are also used on the command line.
FILES
/usr/{doc,man}/*
/lib, /etc, /usr/{lib,bin,ucb,old,new,local}