Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.shell Subject: Re: Dot in PATH? Message-ID: <5528@auspex.auspex.com> Date: 25 Jan 91 18:54:33 GMT References: <1991Jan24.203423.25084@ux1.cso.uiuc.edu> <1991Jan24.221552.5906@bradley.bradley.edu> Distribution: comp Organization: Auspex Systems, Santa Clara Lines: 14 >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).