When you type a command on the command line (shell),
the PATH is searched for that command.  If the current directory
is not in the PATH, it won't find it.  "./mycommand" tells the shell
to execute the "mycommand" file in the current directory.
In other words, you're telling the shell where to look for
"mycommand".

You can solve this by adding the directory "." (no quotes) to your
path, but there a security reasons for not doing this by default.

If you must, though, it's generally safe to add "." to the END of
your PATH.

Bryan Scaringe


> Also when I want to execute a file I have to type  ./ before the command.
> I wonder why?
> Thank you again.

Reply via email to