This command is helpful for located where a command is.
Example
#which java
return
/usr/bin/java
Not really sure what is the difference between which and whereis but sometime whereis does not return any results.