<< First Page    < Previous Page    Next Page >    Last Page >>

10.1) Path

 

Many times programs will not run with the error message "command not found". If you are sure that this program (binary or executable, same) exist, it might be that you do not use the right path for it.

 

In Unix, when running a program, you must state either it's absolute location ('/usr/sbin/traceroute'), or it's relative location (for example '[ezaton@kruvi /usr]$ ./sbin/traceroute' ). If you do not specify the location, the shell will search for the binary in your path, following its order. To see the PATH variable defined for you, write 'echo $PATH'.

 

If you have few binaries with the same name, the first one in the search order defined by PATH will be the one executed. To see what is the path of a binary, run 'which <binary>'.

 

Note that in order to run a local binary file, assuming it has the 'x' tag in its permissions settings, you will need to run './<binary>', else it will not find it in the path list.