Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

WHEREIS(1)  —  USER COMMANDS

NAME

whereis − locate source, binary, and/or manual for program

SYNOPSIS

whereis [ −sbm ] [ −u ] [ −BMS dir ...  −f ] filename ...

DESCRIPTION

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:

/bin
/usr/bin
/usr/5bin
/usr/games
/usr/hosts
/usr/include
/usr/local
/usr/etc
/usr/lib
/usr/man
/usr/src
/usr/ucb

OPTIONS

−bSearch only for binaries. 

−sSearch only for sources. 

−mSearch only for manual sections. 

−uSearch 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. 

−BChange or otherwise limit the places where whereis searches for binaries. 

−MChange or otherwise limit the places where whereis searches for manual sections. 

−SChange or otherwise limit the places where whereis searches for sources. 

−fTerminates the last directory list and signals the start of file names, and must be used when any of the −B, −M, or −S options are used. 

EXAMPLE

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

angel% cd /usr/ucb
angel% whereis −u −M /usr/man/man1 −S /usr/src/cmd −f ∗

FILES

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

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 ‘/’. 

Sun Release 3.2  —  Last change: 1 February 1985

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026