Case sensitivity is one of the best examples of how programmers expect people to conform to the computer rather then having the computer conform to people. We are human, we make mistakes and we are forgiving in the way we communicate. My name is Gregory but I also go by Greg and sometimes respond to ‘Hey You.’
But Linux/Unix isn’t forgiving, if I want Test.txt, this isn’t the same as test.txt and it’s completely different from TEST.txt.
Why?
The primary reason is that programmers in the late 1960′s & 70′s for C and Unix decided to optimize the compilers and parsers. At the time computers were much slower and it was faster to compare identical strings rather then normalizing the upper/lower case of the strings. Back in 1969 when there were was no such thing as personal computers this optimization made a lot of sense.
Fast forward to today as someone is tying a URL into a web-browser. It doesn’t work. Why? Because the web browser passes the exact case of the web file to the web-server, the web-server is Apache and runs on a Linux server that cares about cases because almost 30 years ago comparing cases took a little extra effort. Today this type of upper/lower case comparison is trivially quick.
But what’s really amazing is that in all those years developers have refused to change this. Some even think of this as a ‘feature.’ This is really stupid, it causes a ton of problems and there is no longer any good reason to have case sensitivity in an OS.
Computers are meant to be used by people, and people make misTakes.

I think your point is valid, although stated way too broadly.
Case-sensitivity IS a feature that we should have the option of taking advantage of (more identifier names, optimized performance, etc).
However, when it comes to users, it becomes a problem. Searches should ignore case. URLs should probably also follow the same precedent. But just like how we have to code searches to handle miss-spellings, synonyms and related words, it isn’t unreasonable to have to code to specify ignoring case (even if it is just a configuration setting).
Where do you draw the like between sequences of characters and text typed by humans ? searches should definitely be as easy as possible in this respect, otherwise, the “more identifier names” argument counts for me, apart from it not being a problem UNLESS people start pressing shift when they don’t have to.
case sensitivity is found in most modern programming languages, where it helps create a unified look of commands. whILe, while and WHILE look different, just saying “while” creates a regular look and strains the little finger least.
Then, HOW could one have changed the rule ? The feature has been in place for over 30 years, and has logically been used. Ripping this rule out of UNIX would have broken half the system, avoiding it in GNU would have broken compatibility.
DOS DESIGNERS MUST have in part LOVED CAPS lock.
Programming languages can be case sensative but if they are they should use things like red spelling squiggles to highlight terms not in the correct case.
To preserve the current code but make it easier for people you simply prevent users from choosing filenames that already exist. You also set the OS to always return files in a consistent way for legacy applications.
When windows moved from 3.1 to 95 they used a similar trick for older applications. Older apps that didn’t recognize long filenames would get back things like c:\progra~1\ while new applications could understand “c:\program files.”
This isn’t rocket science. Both Windows and OSX are not case sensitive.
Panther includes Case-sensitive HFS as a potential file system.
Could someone clarify case-sensitivity for URLs?
Is it the Unix/Linux O/S that is case sensitive, or the WebServer?
For example if I run Apache on a Windows server, will I have to watchout for case?
It’s the OS. If you run Apache on a Windows server it will not be case sensitive. From what I understand there is also an option in Apache to turn off case sensitivity in general.
I hope you don’t mind that this is a really late comment, however, I’ve configured my Linux installation to be very case insensitive.
The file system is all case insensitive, and so is all readline-applications (auto-completion in bash etc).
The file system I use is JFS with -O passed to jfs_mkfs. Works like a charm. But I do get a lot of Linux fanboys running after me with pitchforks calling me a “Windows wannabe”
(same thing as above about the “really late comment”)
I totally agree with the original post.
I’d love that whether the file system is case sensitive or not, it should be just an option we could choose at run-time (I say this, but I haven’t even checked).
Those who say that a case-sensitive language is great because it allow many more identifier names are (in my opinion) too lazy to type more expressive names.
Speaking of modern languages, Ada (83, 95 and now 2005) is case insensitive, but a correct environment keeps a good visual : ada-mode in emacs (!) has a function called ada-adjust-case : the name of procedures and functions are lowercased, the variables are capitalized (only the first letter is upcased), and you can configure the mode to keep some fixed identifiers entirely upcased (awfully for traditionalists, a constant’s name is only capitalized, not upcased)
Of course, I don’t say that commands’ parameters should be insensitive …
Great remarks. Where is the solution or workaround. I have a client that wants to make it easier for users to remember their names by breaking up the URL strings with Upper Lower type. Example: MyNewWebsite.com/ProductCatalog
Their IT dept is satisfied by saying the server canʻt do it. The end.
So, is there some prefernce or script that will allow the apache server to ignore case at directory levels?
Actually something like photo.jpg will be different from photo.JPG.
this one is easier to overlook
BOTH will be identified as a JPEG file, but they will be different files
@Ken – Load Apache’s mod_speling (sic) module and say “CheckSpelling on”.
See http://httpd.apache.org/docs/2.0/mod/mod_speling.html
Another late comment, but want to chime in.
A) URL’s should not be case sensitive because the DNS name is not. http://www.LINUX.org and http://www.linUX.orG are the same thing. So why should what comes after these follow a different set of rules. This is inconsistent. Apache shouldn’t need a mod it should just be case insensitive. I wonder if any of the various “web” RFC say anything about it.
B) Devlopment languages and the File system are two different things. If you refer to a .SO or .DLL or whatever file in your code you should use case sensitivity for good measure. If you have a variable name case sensitivity is usually a good thing because it makes the code “cleaner”. Of course this is preference. I’ve used langauges that do it both ways…honestly it never seems to be that big of a deal. Using “IF” instead of “if” or “iF” is just silly. That is a keyword in the programming langauge…I’m not asking if “IF” exists…I know it does. When I open a file with “Test.txt” or “test.txt” I’m asking for the “test.txt” file…not some sort of programming language construct.
C) To this day I’ve never had anyone be able to give me a good example of why a directory would have two files of the same “name”, but with different case sensitivities. ie. a folder/directory with c:\test.txt and also c:\Test.txt. This seems like it would only cause confusion.
D) Interopability – Like it or not Windows is case insensitive. *nux is typically not. Porting applications then becomes and issue. In order for both systems to be able to talk effectively one has to change. Changing windows breaks current functionality. Changing it in Linux does not because everything was already using the correct sensitivity. The only thing that would break is if a folder had two files of the same name like in point C). If we don’t actually have a reasonable use case for c), then Linux/Unix should change. Give the option today and then make it the default later. I would love some explanation as to why ripping out case sensitivity will break “half the system” in *nix.
E) *nix is being lazy not windows – I’ve heard that the *nix crowd actually thinks Windows is doing less by ignoring case. This usually comes from non developer types of admins. This is just not the case and should realize that *nix is actually the one with less functionality.
F) How much time has been wasted on this issue. *nix crowd seems have problems admitting when their system is less optimal then others muddling the water with programming and what not. Is it an inferiority complex or something? Is your hatred of all things MS so great? Swallow the pride pill and get over it. I think it is the same crowd that thinks their grandma should learn how to use VI.
Please answer either “yes” or “no” to the following questions:
— Is it reasonable to assume that someone who is a programmer is no longer a human?
— Do you want to obscure your files so that nobody can tell them apart?
— Have you named every dog you’ve owned “spot”?
— Do you think that your operating system will break if they make a long-overdue improvement to it? (Exclude all Microsoft software from consideration) =\
— Is it your life’s goal to prove that doing a case-sensitive sort is faster than a case-insensitive sort?
— When you meet someone new, and he says his name is Greg, do you ask him if either of the G’s are uppercase?
— Do you think that working with files and directories is SO easy that you need to add something to make it harder?
— If you are forced to smell a decomposing fish, and asked to describe the smell, do you try to think of what foods it might smell like?
— Do you think it’s not possible to write a case-ambivalent program if your programming language is case-sensitive?
— You won $2,000 from Publisher’s Clearinghouse. The check comes by Fedex, in the afternoon, when the wind is blowing south. If the company’s name was in all caps, should you refuse the package? (careful, this is a trick question…
— Do you have 3 daughters, named susan, Susan, and SUSAN, so that there might be some names left when you have your next 2 or 3 susans?)
— Do you limit all your symbols to 6 characters so that it will assemble faster, uses less memory, and will be compatible with assemblers written in the 70′s? (Oh wait, using all numbers is even better!)
— Do you still write source code that is no wider than 80 characters?
— If your computer asked you to take it on vacation in Barbados, would you?
If you answered “yes” to at least half of the above questions, you deserve a case-sensitive O/S and file-system.
I hope those weren’t too offensive to anyone, but it pretty much sums up all my experiences discussing this issue with the “sensitive” side. :p
A final thought… I am designing my own programming language. It will be going a step farther… Not only will it be case-insensitive, it will also be underscore-blind. If you think about it, underscores in identifiers are meant for readability (as is CamelCase). They are another instance of varying how you write a name, without making any real change in its meaning. Yes, case-following is also the way to go. Real-time if the editor’s hooked up with the compiler, or as a step in building. And actually… If a language is case-following and the source has been all “synchronized”, then your compile can case_sensitive names. So the “decoration ignorance” is not actually in the compiler, it’s a function of the IDE or utility run just before building.
So for example… if someone on your team mentions the function “get time”, you could type it in as gettime, GetTime, get_time, GET_TIME, etc. There’s no need to distinguish between all of those, because they all have the same meaning and are pronounced the same.
Thanks for taking my survey :0)
“CapitalGee-ood morning, CapitalGee-reg,”
-Well, maybe human speech should be case-sensitive too…
Just recently I created a virtual machine in VMWare/Linux, called (e.g.) VirtualMachine. I had already created a folder /home/virtualmachine for it. The result was that the VM was created in the virtualmachine folder, BUT the virtual disk was automatically created in a duplicate folder called VirtualMachine. This was an totally unexpected result, and an extremely undesirable situation, since a backup of the /home/virtualmachine folder would be minus the virtual disk.
Thus, case-sensitivity is more than just a nuisance, it can defeat your backup strategy and lead to a mission-critical loss of data. It doesn’t require human error to fall foul of this either, as seen here it can result from unexpected interactions between naming of objects.
Linux has a lot to commend it as an OS, except for this one piece of 1950′s awfulness. If they’d get rid of the case-sensitive filesystem it would be a truly great OS.
Thanks for the blog. The *nix community’s stance on case sensitivity has always been that it’s hands down a good thing, when the truth is that only case preservation is good, while case sensitivity is, by *all* means, bad
I don’t know of any application I’ve used in the last year that was case sensitive besides the NIX boxes that host a particular site at work and freakin NIX boxes on the web.
Who, seriously, are the individuals who defend this “preference”? It seems like quite a silly thing to stand behind. It must cause countless headaches when your average user has no idea why it is happening. That is the paramount issue with programmers who don’t code for people but rather code for their own principles.
I think it is that type of self-absorbed thinking that kept those operating systems from becoming more widely accepted. (Think Ubuntu or Vector – I realize linux is used EVERYWHERE in the business sector prob just because it’s free) It also causes people to overlook any benefits or qualities of the system simply because the developers can’t get their heads out of their asses long enough to ask their mother to use it for a day and see why she can’t stand it.
Phew.
In absolute agreement, ‘nix case sensitivty is not only a hassle for website end users (mistyping a URL), but also for developers.
Do I want to be forced into lowercasing all filenames and directories? No, not at all, but it’s the easiest way to deal with this ridiculous OS “feature” (read: handicap)
When I test in Windoze and OSX, no problem, can have /ExampleDir and code files as EasyToReadClassName.ext
Squinting to read through a directory with all lcased class files is a pain, but c’est la vie, ‘nix is free after all.
Anders idea of mounting the file system case sensitive is a good one.
The programming language is case sensitive. Great. The FILESYSTEM should NOT be case sensitive, period. Why? Because the real-world, the usability, the English language of NAMES and oh, did I mention USABILITY and the real world are NOT case sensitive. John Whatever Smith and jOHN wHATEVER sMiTh are *NOT* two different people. Come on.
I hate to tell you this, but “Polish” and “polish” are two different things.
Mark, of course they are not the same thing. I’m not saying we shouldn’t have upper and lower case files and file names. I am saying that the OS should allow you to type the wrong case and still find the file.