How Unix searches for commands |
|
When you type a command, Unix looks in all the directories in your search path for executable files whose name matches the command you typed.
echo $PATH
The directories are listed in the order they are searched, first to
last.
.bashrc if you use bash as your shell).
See the man page for your shell for further details.
which foo
where foo is the name of the command. For example,
which bash
might produce the output
/usr/ucb/bash
|
John Shipman, john@nmt.edu
Last updated: 2000/07/29 00:46:34 UT URL: http://www.nmt.edu/tcc/help/unix/searchpath.html |
|