Quote:
Originally Posted by bobland
I can understand adding the program to the path variable but why wouldn't it run from its own directory?
bobland
|
Because "./" (current dir) is not in $PATH.
You can add it, but it's considered a security risk. If you download some malware or someone place a binary file called "ls" in your home directory, and you have ./ in your $PATH it might be run instead of the system command ls, which might result in very bad things if it's indeed some kind of malware.
I advice you to follow the convention, and run the program as ./myprog, which is what everyone else does.