Subject: Re: Linux emulation and mkdir with trailing /
To: None <>
From: Lucio De Re <>
List: tech-kern
Date: 09/25/2000 15:02:25
On Mon, Sep 25, 2000 at 12:54:45PM +0200, Alan Barrett wrote:
> I don't know what the standards say, or what traditional behaviour was.
> But if I ever type a name with a trailing slash, then I intend that name
> to be interpreted as a directory, and I expect to get an error if it
> is a (non-directory) file.  For example, if foo exists as a file and I
> say "mv foo bar/", then I want to get an error if bar does not already
> exist as a directory; I certainly don't want to end up with bar as a
> file.  Similarly, if I type "install myprogram /usr/local/bin/" but
> /usr/local/bin does not exist, then I want an error message, I don't
> want to end up with /usr/local/bin as an executable program.
I agree entirely with you, it is the most natural and reasonable way
to deal with it (and Windows doesn't come near it, in case you
wonder).  But different flavours of Unix _do_ behave peculiarly on
this score: I have seen directories being converted to files and worse
because of the different options with trailing slashes.

It's a hornet's nest.  It probably can be fixed, but it needs more
than a few voices in the wilderness to come up with a solution that
will satisfy common sense, convention and die-hards.

But we're certainly approaching it with some useful wisdom.