COHERENT manpages

This page displays the COHERENT manpage for whereis [Locate source, binary, and manual files].

List of available manpages
Index


whereis -- Command

Locate source, binary, and manual files
whereis [-bmrsu] [-BMS dir ... -f] name ...

The command  whereis locates source files,  binary files (executables), and
manual pages  (documentation) that match a given  name. Prior to searching,
whereis strips name of any path information, extensions, and the s. prefix.

By default, whereis searches the following directories:

Sources        Binaries       Manual Pages
/usr/src/cmd   /bin           /usr/man/*
/usr/src/games /usr/bin
/usr/src/local /usr/games
/usr/src/alien /usr/local
/usr/include   /etc
/usr/include/sys              /lib
               /usr/lib

Options

whereis recognizes the following command-line options:

-b  Search only for binary files.

-B  Use  the  directory  list  specified  by  dir instead  of  the  default
    directory list for binary files.

-f  Terminate the  directory list introduced by options -B,  -M, or -S, and
    treat  any  additional  command-line  arguments  as  file names  to  be
    searched for.

-m  Search only for manual pages (documentation files).

-M  Use  the  directory  list  specified  by  dir instead  of  the  default
    directory list for manual pages.

-r  Search recursively  downward from the  directories specified by  dir or
    from the default directories.   This option is useful when the searched
    directories contain sub-directories.  By default, whereis searches only
    the directories specified or the default directories.

-s  Search only for source files.

-S  Use  the  directory  list  specified  by  dir instead  of  the  default
    directory list for source files.

-u  Search for ``unusual'' files.  A file  is said to be unusual if it does
    not have one entry for each of the three search categories.

Please note  that if you  use options -B,  -S, or -M,  you must use  the -f
option to terminate the directory list specified by dir.

Example

The following example finds all  commands in directory bin that have either
no  corresponding  source   code  in  directory  src  or  no  corresponding
documentation in directory doc:

    whereis -u -M doc -S src -B bin -f bin/*

See Also

commands,
find,
qfind,
which

Notes

whereis is  copyright © 1980,1990 by The Regents  of the University of
California.  All rights reserved.

whereis is  distributed as a service  to COHERENT customers, as  is.  It is
not supported by Mark Williams Company.  Caveat utilitor.