[uClibc] Why do I have to add ./ to execute programs

Charlie Brady charlieb-uclibc at e-smith.com
Tue Jun 22 17:52:01 UTC 2004


On Mon, 21 Jun 2004, Bennett Todd wrote:

> 2004-06-21T01:30:19 Hoffknecht:
> > Pretty much all programs require that I add ./ in front of the
> > executable in the current directory, such as ./gdb. Why is that?
> 
> Because your environment isn't properly set up.
...
> I recommend against adding "." to your PATH; that approach (a)
> leaves you having to change directories to tell your shell where to
> find things, and (b) leaves you vulnerable to trojan horses if you
> ever change to a dir that anyone else can write.

Bennett meant, of course, "because your environment *is* properly set up"  
- to protect you from trojan horses.

:-)

--
Charlie




More information about the uClibc mailing list