WHEREIS(1)                 Commands and Applications                WHEREIS(1)




NAME

       whereis  -  locate the binary, source, and manual page files for a com-
       mand


SYNOPSIS

       whereis [ -bcmsuV ] [ -BMS directory...  -f ] filename


DESCRIPTION

       This manual page documents whereis version 1.0.3.

       whereis locates source/binary and manuals sections for specified files.
       The  supplied  names  are first stripped of leading pathname components
       and any (single) trailing extension of the form .ext, for example,  .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, defined by the /etc/whereis.conf configuration
       file.   (The  location  of  this  file  can  be  overridden  with   the
       WHEREIS_CONF environment variable.)


OPTIONS

       -b     Search only for binaries.

       -c     Make the search case-sensitive.

              NOTE:  In  whereis  versions  1.2 and earlier, this flag had the
              opposite effect.  As of whereis version 1.3, searches  are  case
              insensitive  by  default  since  that is more appropriate to the
              filesystems available to GS/OS.

              This flag is GNO-specific.

       -f     Terminates the last directory list and signals the start of file
              names.   This must be used when any of the -B, -M, or -S options
              are used.

       -m     Search only for manual sections.

       -s     Search only for sources.

       -u     Search for unusual entries.  A file is said to be unusual if  it
              does  not  have  one  entry  of  each  requested type. Therefore
              whereis -m -u * asks for those files in  the  current  directory
              which have no documentation.

       -B     Change  or otherwise limit the places where whereis searches for
              binaries.

       -M     Change or otherwise limit the places where whereis searches  for
              manual sections.

       -S     Change  or otherwise limit the places where whereis searches for
              sources.

       -V     Print version information.


CONFIGURATION FILE

       The configuration file, /etc/whereis.conf, has  three  sections.   Each
       section specifies a list of directories to search.  One section is used
       for programs, another for documentation, and the last for sources.

       Each section starts with the section identifier.  The recognised  iden-
       tifiers  are  bindirs,  mandirs,  and srcdirs.  A colon (:) must follow
       each section identifier.  Following the colon is a whitespace-delimited
       list  of  paths  that whereis will search (these may appear on separate
       lines).  The list is terminated with the first semicolon (;) character.

       The  colon  and semicolon characters must be delimited with whitespace;
       they must not be run together with pathnames or identifiers.

       If the hash (#) character appears on a line, it and any following char-
       acters on that line are taken to be comments, as are blank lines.

       The following is a sample of how the whereis.conf may look.
              # Sample whereis.conf file.
              bindirs :
                   /bin
                   /usr/bin ;
              mandirs :
                   /usr/man/man1
                   /usr/local/man/man1
                   ;
              srcdirs :
                   # none configured here
                   ;


EXAMPLE

       Find   all   files   in   /usr/bin   which   are   not   documented  in
       /usr/share/man/man1 with source in /usr/src/cmd:

              example% cd /usr/ucb
              example% whereis -u -M /usr/share/man/man1 -S /usr/src/cmd -f *


ENVIRONMENT

       WHEREIS_CONF
              If this environment variable is set and non-empty, it  is  taken
              as the pathname of the configuration file, rather than using the
              default /etc/whereis.conf.


ATTRIBUTIONS

       This command was ported from 4.2BSD by Devin Reade.


FILES

       /etc/whereis.conf
              The whereis configuration file.  It contains a list of  directo-
              ries to search for programs, documentation, and sources.


BUGS

       Since whereis uses chdir(2) to run faster, pathnames given with the -M,
       -S, or -B must be full; that is, they must begin with a /.


SEE ALSO

       find(1), locate(1), chdir(2)



GNO                            25 September 1997                    WHEREIS(1)

Man(1) output converted with man2html