
WHEREIS(1)                   UNIX Reference Manual                  WHEREIS(1)

NNAAMMEE
     wwhheerreeiiss - locate binary, manual, and or source for program

SSYYNNOOPPSSIISS
     wwhheerreeiiss [--bbmmss] [--uu] [--BBMMSS _d_i_r _._._. --ff] _n_a_m_e _._._.

DDEESSCCRRIIPPTTIIOONN
     WWhheerreeiiss 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'. Pre-
     fixes of `.s' resulting from use of source code control are also dealt
     with.  WWhheerreeiiss then attempts to locate the desired program in a list of
     standard places.

     Available options:

     --BB      Change or limit directories searched for binaries. Requires the
             --ff flag.

     --MM      Change or limit directories searched for manual entries. Requires
             the --ff flag.

     --SS      Change or limit directories searched for source. Requires the --ff
             flag.

     --bb      Search for binaries.

     --ff      Signals the end of a directory list specified by one or more of
             the --BB, --MM or --SS options and the start of file _n_a_m_e_s.

     --mm      Search for manual entries.

     --ss      Search for source.

     --uu      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 docu-
             mentation.

EEXXAAMMPPLLEE
     The following finds all the files in _/_u_s_r_/_b_i_n which are not documented in
     _/_u_s_r_/_s_h_a_r_e_/_m_a_n_/_m_a_n_1 with source in _/_u_s_r_/_s_r_c_/_c_m_d_:
           cd /usr/ucb
           whereis -u -M /usr/share/man/man1 -S /usr/src/cmd -f *

FFIILLEESS
     /usr/src/*
     /usr/{doc,man}/*
     /lib, /etc, /usr/{lib,bin,ucb,old,new,local}

BBUUGGSS
     Since the program uses chdir(2) to run faster, pathnames given with the
     --MM --SS and --BB must be full; i.e. they must begin with a `/'.

HHIISSTTOORRYY
     The wwhheerreeiiss command appeared in 3.0BSD.

3rd Berkeley Distribution       April 23, 1991                               1


