On Thu, Mar 31, 2005 at 01:02:23AM +0200, Nadav Har'El wrote:
> On Wed, Mar 30, 2005, Yedidyah Bar-David wrote about "Re: A second glibc on 
> Linux ( there's a keren  in the darkness )":
> > > P.S. I disagree that having the current directory in the path is only the
> > > "DOS way". It has always been the Unix way too, and I still like it to
> > > this day. I think that many books even recommended (or perhaps even still
> > > recommend) that non-root users have a colon starting their path, meaning
> > > that the programs in the current directory take preference. This is useful
> > > for programmers, but indeed is probably less useful for non-programmers,
> > > which is why this practice fell out of favor over the years.
> > 
> > Nadav, of all the things you said until today, this is surely the one I
> > least agree with you about.
> 
> Like I said, this is perhaps because I learnt Unix twenty years ago (wow,
> time flies...), and fashions have changed. I am still used to having almost
> the same PATH setting I had 20 years ago...
> 
> > Can you show a concrete example of such a book?
> 
> Sure. The classic (but a bit long in the tooth...) "The UNIX Programming
> Environment" by Kernighan and Pike, first mentions the PATH in page 37,
> and gives the following example:
[snip]

Well, you caught me. I did not read it.

> 
> So perhaps this tradition is no longer in vogue, and perhaps there are a
> 1001 security reasons and other valid reasons to avoid it, but it still is
> a generation-old Unix tradition. Not a DOS tradition :)

Ok, ok ...

> 
> > Just to give a small "proof" that I am not entirely wrong, in tcsh there
> > are two relevant compile-time options - one is to move '.' to the end of
> > the path and one is to omit it altogether. So enough people found it
> > useful to add to tcsh.
> 
> The fact they even had to deal with this "." means that having it was
> a common tradition, I think.

This makes sense.

> 
> > I am also not sure why it's so much more useful for programmers. You do
> > not have to add './', right, but you have to add a few chars for tab
> > completion to work (because it searches the entire path).
> 
> Perhaps. Although if you have a command called "nu", then typing "nu" (2
> characters) is definitely faster than "./n<TAB>" (4 characters). Silly
> example? I know. Never mind.

And what if you want to run /usr/bin/nu?
I must admit (again showing my ignorance) that your example made me see
for the first time that there is such a thing, without a manpage or
anything. Part of the netatalk package, which probably isn't commonly
installed, though.

> I'm not trying to defend the dot in my PATH. It's probably a thing
> of the past. I just didn't want it to be called... DOS-like. <shudder> :)

Let's just say this: I suggest that at least on public machines, you
stop having '.' in your path, and also that you do not recommend this
to others. Unix (not the OS but the average user) and the Internet
aren't what they used to be 20 years ago.
-- 
Didi


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to