Tony Arnold tony.arnold at
Tue Jan 16 19:49:29 UTC 2007


Linda Hanigan wrote:

>   Is there a good source to learn how PATH works with ubuntu. I have the
> following line in .bash_profile
> PATH=/home/general/cprog:/usr/local/lbin/General:/usr/local/lbin/Awning:/usr/local/lbin/Tent:/usr/tmp:"$PATH"
> Yet if I have ran a program as /usr/local/lbin/Tent/Program1 and then
> make changes to the program as /home/general/cprog/Program1 recompile
> and test it just saying Program1 it runs the program
> in /usr/local/lbin/Tent not the program in /home/general/cprog even
> though it is listed first in Path. Granted I can insure the right one
> runs by typing the complete path but it is a pain.

Have a look at the hash built-in command (help hash). You might try
typing 'hash -r' after rebuilding the program to get bash to forget
where commands are. Alternatively, you could run the program by typing

Tony Arnold, IT Security Coordinator, University of Manchester,
IT Services Division, Kilburn Building, Oxford Road, Manchester M13 9PL.
T: +44 (0)161 275 6093, F: +44 (0)870 136 1004, M: +44 (0)773 330 0039
E: tony.arnold at, H:

More information about the ubuntu-users mailing list