Case sensitive file names

std-unix at ut-sally.UUCP std-unix at ut-sally.UUCP
Fri Oct 3 02:08:21 AEST 1986


>From @SUMEX-AIM.ARPA:MRC at PANDA Thu Oct  2 05:09:39 1986
Date: Thu 2 Oct 86 01:59:26-PDT
From: Mark Crispin <MRC%PANDA at SUMEX-AIM.Stanford.EDU>
Subject: Re: Case sensitive file names
To: std-unix%ut-sally.UUCP at SALLY.UTEXAS.EDU
In-Reply-To: <5860 at ut-sally.UUCP>
Postal-Address: 1802 Hackett Ave.; Mountain View, CA  94043-4431
Phone: +1 (415) 968-1052
Message-Id: <12243533720.7.MRC at PANDA>

I would like to add a loud "Bravo!" to Mark Horton's message!  The present
case sensitivity of the Unix filesystem is a real drag, and something that
has regularly and reliably caused me problems when working in a heterogenous
environment.  As far as I can tell, the only individuals who actually *like*
case sensitivity in Unix are the high-schoolish hackers who think it's really
cute to write programs with separate -1, -l, -I, and -L switches.

I think that the most reasonable proposal is to do a free case match on input,
so that "more foobar" is the same as "More FooBar", etc.  On output, you first
do a free case match to see if there is an extant file and if so preserve the
case of that file.  In other words, if I overwrite FooBar but specify foobar
or FOOBAR, the file is still called FooBar.  Otherwise, use whatever case the
user specifies.  Renaming would always use the case the user specifies, so the
user can rename foobar to FooBar, etc.

Now, if I can convince you guys to do this for usernames, I will take back at
least 50% of the nasty things I've ever said about Unix.  Golly gee, it would
be nice to be MRC or Crispin, not "mrc" or "crispin"...

Another way of doing it is how TOPS-20 does it.  TOPS-20's filesystem isn't
*really* case independent.  All lowercase characters are coerced into upper
case, so if I say foobar.txt it becomes FOOBAR.TXT in the actual filename.
This is both from the user interface and from the filename lookup system call.
It is, however, possible for any of the 128 ASCII characters to be in a filename,
provided that the "oddball" characters are quoted using CTRL/V.  In other words,
a FooBar.Txt file is possible on TOPS-20, but only by F<^V>o<^V>oB<^V>a<^V>r.T<^V>x<^V>t.

For once, I don't favor the TOPS-20 way of doing things.  TOPS-20's scheme is
alright if you started with case independence to begin with, but I don't think
it would fit in well into Unix, and certainly not without a major flag day.  I
hope that my suggestion above could fit in with only minimal inconvenience.

I found on TOPS-20 that no serious user used case-sensitive filenames.  Everybody
appreciated the case-insensitivity of the interface, even though it took the form
of coercing to upper case.  My experience also suggests that case sensitivity is
a pain in the a**; I tried writing a major utility in Interlisp using mixed case
function and variable names and eventually gave up when most of my errors turned
out to be case errors.  It's *so* much easier to keep the shift lock key down...

-- Mark --
-------

Volume-Number: Volume 7, Number 12



More information about the Mod.std.unix mailing list