First, the directory in which the
command resides must be one of the entries in the PATH
variable; if it is not, it won't be found. So in a sense, whence
and whereis can
only find things if you tell them where to look. They are still
valuable, though: you may not remember which,
of the dozens of directories that may be in your PATH
variable, is where a particular command resides. Also, if you have
two commands of the same name in two different directories, whence
and whereis will
tell you which one will be found first, and thus executed.