Linus Torvalds Expresses His Hatred For Case-Insensitive File-Systems
Linus Torvalds Expresses His Hatred For Case-Insensitive File-Systems
Attention Required! | Cloudflare
Linus Torvalds Expresses His Hatred For Case-Insensitive File-Systems
Attention Required! | Cloudflare
I recall a case-insensitivity bug from the early days of Mac OS X.
There are three command-line utilities that are distributed as part of the Perl HTTP library: GET
, HEAD
, and POST
. These are for performing the HTTP operations of those names from the command line.
But there's also a POSIX-standard utility for extracting the first few lines of a text file. It's called head
.
I think you see where I'm going with this. HEAD
and head
are the same name in a case-insensitive filesystem such as the classic Mac filesystem. They are different names on a Unix-style filesystem.
Installing /usr/bin/HEAD
from libwww-perl
onto a Mac with the classic filesystem overwrote /usr/bin/head
and broke various things.
Hey I have one of these case sensitive Mac OS X stories as well!
I gave it a try one time, and I found out the hard way some developers don't test everything in a case sensitive environment. I don't remember what specifically went wrong, but Adium, The instant messaging client, blew up because it couldn't find certain files on the local hard drive.
Case insensitive is more intuitive and MUCH safer.
You do not want every Windows user to live in a world where Office.exe, office.exe, Offlce.exe and 0fflce.exe are all different files.
OSs and filesystems aren't built for programmers, they're built for grandmas. Programmers just happen to use them. It's much more sensible to give programmers a harder time fixing bugs and incompatibilities than it is to make the user experience even marginally worse.
I mean, all due respect for the guy, but that is an absolutely terrible opinion and I will die on this hill.
Your grandma will never type file names in shell, she'll use Open File dialog, where case sensitivity does not matter.
Case insensitive is more intuitive
Are these the same filename?
What about these?
Databases have different case-insensitive collations - these control what letters are equivalent to each other. The fact that there's multiple options should tell you that there's no one-size-fits-all solution to case insensitivity.
This issue is only simple and obvious if you don't know enough about it.
OSs and filesystems aren't built for programmers, they're built for grandmas.
You're just flat out and completely wrong.
But if someone creates a file called HEAD
, should it overwrite a file called head
?
That shouldn't matter to the "nontechnical" end-user at all. To the nontechnical user, even the abstraction of "creating a file" has largely gone away. You create a document, and changes you make to it are automatically persisted to storage, either local or cloud.
Only the technical command-line user cares about whether /usr/bin/HEAD
and /usr/bin/head
are the same path. And only in a specific circumstance — such as the early days of Mac OS X, where the Macintosh and Unix cultures collided — could the bug that I described emerge.
So every time grandma picks a file name she needs to specify the locale?
What a stupid hill to die on.
I prefer case sensitivity, the filesystem shouldn't do any magic like that. If someone types "file.txt", opening "File.TXT" would be convenient, but also misleading. Ignoring case is what autocompletion/search is for imo.
The best things is when the OS enforces magic onto the filesystem. Ntfs is case sensitive but windoze is not. So expect some real fun times if you use ntfs on other systems.
For real. It's a ton of fun when you have a Linux server presenting a SMB share and you get a folder called MyFolder and one called MYFOLDER. Take a guess about what happens in that situation. I guarantee it's different
Trying to rename a file to use the correct capitalization in a git repository on my Windows laptop for work was tricky. Or maybe it was subversion. Actually I think it was subversion. Either way it was a weird little puzzle for the day.
remember when windows could only handle 8 characters and longer names ended in ~1
To be precise, longer names ending with ~1 are a backwards compatible fix for DOS programs introduced after Windows started supporting longer filenames.
What the hell phoronix, why are you using that cookie vendor that will sell your data to 46396 parties and no worries, you can stop it by deselecting each one of them! You can either accept or spend the day disabling this shit.
If that's how it's going to be, phoronix is done for me, sorry. I'd love to support your work even, but not with this
Yeah, I tried disabling my ad blocker to support them, but the page does not show ads even then and complains as if it were still active, and I think it is because I left Privacy Badger on. There is no way I am turning that off, so too bad for them!
Heck, I would even consider subscribing, but it looks like one first needs to create a forum account before one can even see the subscription price‽ What a very weird site...
Utterly reasonable opinion. Case insensitive filesystems are just lazy programming.
Case insensitive file systems arent lazy, they're a programmer putting in a lot of effort to try and be helpful only to realize that their helpful system doesn't actually cover all the edge cases it needs to and thus just adds a whole extra layer of complication and annoyance to the project.
Kind of the opposite. It takes more effort to make a filesystem case-insensitive. Binary comparison is the laziest approach. (Note that laziness is a virtue.)
I'm on the fence as to which is better. Putting backwards compatibility aside, there's a perfectly good case to be made for case-insensitivity being more intuitive to the human user.
Apple got into a strange position when marrying Mac OS (case-insensitive) and NeXTSTEP (case-sensitive). It used to be possible to install OS X on case-sensitive HFS+ but it was never very well supported and I think they axed it somewhere down the road.
I can with very high confidence say that for the average computer user, case-insensitive is basically the only alternative. At least if you don't want IT and computer support around the world to start going postal.
As soon as someone is at least semi comfortable navigating a unix-style terminal and using a terminal based text editor to at least change config files, case-sensitive starts to become better. And often the more you get into programming, the more you get like Linus here and develop a hate.
Damn straight. I thought bcachefs was a modern filesystem? Why is it case insensitive? Huge red flag.
Isn't bcache the one made by the solo dev who was causing all that drama trying to merge a bunch of crap during a freeze last year?
If so that explains quite a bit lmao
Its' lead dev is also so full of himself, it's insufferable
Such insensetivity!
Conversely: that two files that differ in name only by non-visible and humanly-impossible-to-detect details is an enormous user-experience fail.
TIL case insensitive filesystems are still a thing actually in use.
Why lol
I believe macOS's default partition is case-insensitive but not case-preserving. I remember having to check the HUnit (unit testing library for Haskell) in a special partition because darcs barfed on a file whose case changed.
I remember that the BeFS in BeOS was also case-preserving but not case-sensitive. Scot Hacker, the author of the BeOS Bible, relayed an explanation that resonated with him. (Bear in mind that this was pre-2000 and the computing landscape was much different. This was also the time that macOS was born in.)
The short of it is that it's for usability. The average person doesn't really differentiate between upper- and lowercase; at most, it's just aesthetics. If they want to find their resume, they don't care if it's spelled resume
, Resume
, RESUME
, or even rEsUmE
. Why should the computer require that they conform to a design decision that was made decades prior?
Since then, the world has changed again and the average user of today is even further isolated from the internals of a system. And what was a good idea in 1997 may not longer be relevant now.
What about case insensitive programming languages?
Im a python programmer so I'm used to it, but my coworkers are SAS programmers that is case insensitive and they keep getting errors when trying to write python because of that.
Ouch. Relying on case sensitivity is a lousy coding choice, anyway. No one is made better off by having a case change carry meaning.
Edit: Before anyone asks, I like case convention as a courtesy, too. But my code doesn't rely on it.
Python is case insensitive? Or do mean that it's not? The phrasing is a little confusing.
Python is case sensitive. I think they're saying their coworkers are writing case insensitive code which is causing errors (perhaps writing myFunction
and then calling it via myfunction
which would result in an undefined error)
Good for him. I hate case-sensitivity, and it's what keeps me going back to DOS & Windows. FILE, File, file, and FilE should all be the same thing at all times.
This is really a problem of human vs computer thinking.
F and f are two different characters, encoded differently. Ergo, File and file are different by raw bytes.
Some developers wish to make the interactions for the user more consistent and thus a case-insensitive filesystem is born. The problem is that this is such a low level place to make this decision.
A filesystem, as in the kernel level interactions for files, should be case-sensitive in that every character is a unique series of bits. But there’s nothing stopping a higher level api from helping users out. It would be sensible to have a case-insensitive desktop environment.
The low level functionality should remain intentional though.
FILE, File, file, and FilE should all be the same thing
If these were truly the same thing, you should have not written them differently.
But you did.
Was this really supposed to be a clever point?
you should have not written them differently.
But you did.
Remember that 99% of the time that's gonna be because of a typo for 99% users. They won't have File.txt
, FILE.TXT
and FiLe.tXt
, they'll have ReportMay.docx
and REportMay.docx
or whatever.
And yeah, that includes me. I don't want case-sensitivity for that reason alone. Thanks, but no thanks.
I did, because they're different ways of expressing the same meaning. They all mean (apologies for borrowing mathematical notation for linguistic applications) |file|. I don't care what the expression of a thing is, I care about meaning. And as a result, when I save a file and then search to recall it, it should not matter what case it's in - only for the meaning to match. The state of my shift or capslock should be totally immaterial.
I was looking into this recently and I didn't know this but NTFS is actually designed by competent people and is fully case sensitive.
For backwards of course Microsoft had to make the file APIs case insensitive, but the actual filesystem is case sensitive.
Also, presumably because this is a real turn-off for developers there is actually an option in Windows to sort of make specific directories case sensitive. Wild right?
https://learn.microsoft.com/en-us/windows/wsl/case-sensitivity
Yeah, I think Windows actually handles it quite well, the actual filesystem has no notion of what the filenames are outside of basic "It's UTF-16", it's the OS filesystem layer that handles all the quirks.
Because that's what people seem to dismiss, there's no one standard notion of case folding. It depends on the locale you're using, and that shouldn't be built into the FS itself. The classic one was the German "long S", where "SS" should be case folded with "ß", except they changed it in 2024 so now they shouldn't match ("ß" becomes "ẞ" now), good luck updating your FS to support rules like that.
Now your shell? That's easy, you can just warn the user that a "matching" filename already exists and prompt them to change it, and you can vary those warnings based on the locale, and you can push out updates as easily as any other patch.
Ah, one more reason for me to despise NTFS.
FILE, File, file, and FilE should all be the same thing at all times.
"Let's point many completely different combinations of characters at the same file"
sentences dreamed up by the utterly deranged /hj /lh
Why shouldn't I be able to have the files mare.png (a photo of a horse) and MarE.png (a photo taken on a vacation in March, fifth in the series after MarA, MarB, MarC, and MarD)?
Or rainsley (a text file, no extension, with notes about a story I'm writing) and Rainsley (a directory with art of the same character the file is named after)?
Do I strictly need to be able to do these things? No, of course not. But the file system is more flexible and functional if I am able to.
Couldn't agree more. I literally can not think of a single scenario where case sensitive file names would be anything but an annoyance.