On January 08 2009 02:17 azndsh wrote:
lolol... I've never seen so much bad/wrong/completely offtopic responses in one thread
your original question has already been answered, but to summarize very quickly:
in linux, the command you type has to be built-in command ("cd", "ls", etc.) or a program in one of your executable folders which is specified by the PATH stuff (most likely "emacs", and tons of other common stuff "top", "less", etc. can be run just by typing their name)
"./" simply specifies the current folder you're in. you need need to specify a location to run programs not in the default executable folders (or you can add it to your PATH like people have mentioned though I don't recommend it).
basically, you don't need extra permissions to edit stuff in your personal folders, so you can't accidentally run a program and screw yourself over, and the "./" also means that you know you're running a program that's not in the executable folders
lolol... I've never seen so much bad/wrong/completely offtopic responses in one thread
your original question has already been answered, but to summarize very quickly:
in linux, the command you type has to be built-in command ("cd", "ls", etc.) or a program in one of your executable folders which is specified by the PATH stuff (most likely "emacs", and tons of other common stuff "top", "less", etc. can be run just by typing their name)
"./" simply specifies the current folder you're in. you need need to specify a location to run programs not in the default executable folders (or you can add it to your PATH like people have mentioned though I don't recommend it).
basically, you don't need extra permissions to edit stuff in your personal folders, so you can't accidentally run a program and screw yourself over, and the "./" also means that you know you're running a program that's not in the executable folders
^This.
If you type this: echo $PATH
It will tell you what your current PATH variable is set to, which will be a list of a bunch of directories. This means that the shell looks for executables in those directories. Now, your a.out file is not in one of those directories - therefore it can't just run by command.
If you added your folder to the PATH variable (google that), you would be able to run an executable without specifying the entire path.