Suppose you are writing a script for use under cron or other environments where the $PATH may not be properly initialized. So to make sure your script will work regardless you want to include the full path of the command, but you don't know the full path. Here is how to find out. On the machine in question, bring up a terminal window and type:

which command

For example let's say you want to know where curl is:

which curl

/usr/bin/curl

Returns the path to curl.

This will only work if the command is contained in one of the directories in your $PATH variable but most often this will be the case.