Subject: Re: Linux emulation and mkdir with trailing /
To: Alan Barrett <>
From: Greywolf <>
List: tech-kern
Date: 09/25/2000 15:18:25
On Mon, 25 Sep 2000, Alan Barrett wrote:

# Saith Greg Woods.
# > Why not?  If you don't know for sure that "bar" is an existing directory
# > file before you run such a command then why would you expect the
# > trailing '/' to do anything special?
# If bar is a non-directory file, why would you expect to be able to
# open "bar/" (with a trailing slash)?  What's the point of the trailing
# slash?

1.  The whole trailing slash thing is something I've seen in the past --
    if it ended in '/', it tended to reference, e.g., "foo/.".  The
    reference is implicit and is historically supported, viz:

    	rm: foo/: Is a directory

    	# ls /bin/chmod/
	ls: /bin/chmod/: Not a directory

    Now, I can't quote for its being historically supported by Missed 'em
    III or V for sure, but to have something that ends in "/" refer to
    a regular file violates the Principle of Least Astonishment.

2.  What direction do the majority of the ULOS lean (one should check
    Solaris, AIX, IRIX, HP/UX, OSF/2 and Linux to be sure; does SCO
    still exist?)?

3.  What's POSIX got to say about it?

BSD: it'll be there when you're ready for it.