Possible Duplicate:
Location of file folders of installed programs
For example the following are the same
# /usr/bin/php updateDatabase.php
# php updateDatabase.php
But how would I infer the location of the php command to be in /usr/bin?
Possible Duplicate:
Location of file folders of installed programs
For example the following are the same
# /usr/bin/php updateDatabase.php
# php updateDatabase.php
But how would I infer the location of the php command to be in /usr/bin?
You can use the
whereis
command to find the location of an executable binary on your system.Example:
EDIT: From this answer to a similar question, you can also use the
which
command.Example:
When the program can be run without specifying the full path, then its directory is in your
$PATH
variable.Run