Dot in PATH?

Guy Harris guy at auspex.auspex.com
Sat Jan 26 05:54:33 AEST 1991


>Jeff, why would you want to do this?  I thought Un*x automatically checked the
>directory that you are in (your current directory) for commands you entered.

You thought incorrectly; UNIX shells, and the "exec[lv]p()" routines,
check only if "." is in the current command search path.

In addition to the trojan horse problems mentioned in other postings,
note that the S5R2-and-later Bourne shell's mechanism for doing command
hashing is disabled (or ineffective), as I remember, for directories in
the path that follow a path entry of ".", so even if you do want "." in
your directory you may want to stick it at the end.  I forget whether
the same is true of the Korn shell's "tracked alias" mechanism, and
don't know what effect having "." anywhere other than at the end has on
the C shell's command hashing (although they may be hosed too). 



More information about the Comp.unix.shell mailing list