Subject: Re: Linux emulation and mkdir with trailing /
To: NetBSD Kernel Technical Discussion List <email@example.com>
From: Lucio De Re <firstname.lastname@example.org>
Date: 09/26/2000 08:48:58
On Mon, Sep 25, 2000 at 11:24:39AM -0400, Greg A. Woods wrote:
> You guys are apparently forgetting: directories *ARE* files in Unix!
So are devices, and sockets. That does not mean that one doesn't
superimpose more practical and useful semantics on them. And if there
is an easy way to enforce those semantics (cp foo bar/), then I think
it should be done. After all, having discovered this particularly
nice feature relatively recently, I would be very sore if it got taken
My personal take is that one should err on the side of additional
functionality. The point I made recently about ./bin versus bin in
shell execs is along the same lines: there is no way of adding the
flexibility once the standard is enforced, whereas in the opposite
case the "standard" behaviour can me simulated.
The same applies to "cp foo bar/": if the semantics of the trailing
"/" are dropped, then the safeguard in the above is lost and totally
irrecoverably so. Given Unix's predilection for losing files
irretrivably, anything that enhance safety is a bonus.
In other words, my vote is for the more useful feature, even if it is
not the standard. And if ambiguity forces us to reconsider the
standard, then that should be treated as opportunity knocking.