I don't really see the benefit of allowing users to create files with the same name in the same directory, yeah, yeah I know that case sensitivity means that it isn't same name, but imagine talking to a user, guiding them to open the file /tmp/doc/File and they open /tmp/doc/file instead
The reason, I suspect, is fundamentally because there's no relationship between the uppercase and lowercase characters unless someone goes out of their way to create it. That requires that the filesystem contain knowledge of the alphabet, which might work if all you wanted was to handle ASCII in American English, but isn't good for a system which needs to support the whole world.
In fact, the UNIX filesystem isn't ASCII. It's also not unicode. UNIX uses arbitrary byte strings, with special significance given to a very small number of bytes (just '/' and '\0', I think). That means people are free to label files in whatever way they like, and their terminals or other applications are free to render them in whatever way seems appropriate, without the filesystem having to understand unicode.
Adding case insensitivity would therefore actually be significant and unnecessary complexity to add to the filesystem drivers, and we'd probably take a big step backwards in support for other languages
Let's say you have a software that generates randomly named files, having the ability to use both upper case and lower case means you can have more files with the same amount of characters, but that sounds horrible and it's the only thing I can think of atm
In case it's not obvious, I agree that I don't see much of a point in case sensitivity in an OS outside of simply providing additional options for various uses, it absolutely would be confusing for end users having to interact with it in many ways.
This isn't "Windows design"... this is just inherited stone age bullshit from the DOS days when the filesystem was FAT16 and all file names were uppercase 8.3.
NTFS is case sensitive in its underlying design, but was made case insensitive by default, yet case preserving, for reasons of backwards compatibility.
If Microsoft has to design something from scratch, without the need for backwards compatibility, they go for case sensitive themselves. For example: Azure Blob Storage has case sensitive file names.
If you rename a file only changing the casing it doesn't update properly, you need to rename it to something else and back.
This is so userfriendly I have been stumped by it multiple times.
On the other hand in using Linux I have had a number of problems with the casing of files: The number is 0
macOS also does this by default, but you can change it (though you have to reformat the disk in question). This is generally fine for non-system disks if you REALLY need it for some reason, but afaik it is not recommended for the OS disk due to assumptions that macOS-targeted binaries make (similar to the windows regex version matching that caused problems for a while because it became the unofficial best way to check windows versions for app install compatibility). It’s doubly annoying on newer Apple systems because the integrated SSDs are WAY faster than pretty much anything else you can connect to it. But for the most part, I find it’s more of a nuisance to keep in mind than a real problem (I’ve been dealing with dev-issue MBPs since about 2012).
As in the windows case, this is also an appropriate choice for the average Apple user (though the fact that they’re fairly ubiquitous as dev machines in many places is annoying on several levels, despite the generally solid best-case performance and thermals I’ve observed).
It's neat that Linux has the ability to do this, but I honestly can't think of a good usecase for this. I think this is more confusing than it is useful
I feel the same way about programming languages. There is no way that "User" and "user" should refer to different variables. How many times has that screwed people up, especially in a weekly typed language?
One of the many things that I feel modern versions of Pascal got right.
Case is often used to distinguish scope. Lowercase is local while uppercase is public. "Name = name" is a pretty standard convention, especially in constructors.
There is a ubiquitous use case in programming. There is not in the file system.
It's quite useful for stuff like PROGRAM and Program in the same directory where PROGRAM is the program itself and Program is some unrelated files about the program. Bad example, but the case stands.
Same on macOS. Apple has "case-sensitive HFS+" as an option for UNIX compatibility (or at least they used to) but actually running a system on it is a bad idea in general.
You're probably joking, but in case you don't know: LPT stands for Line Printer Terminal, and LPT1, LPT2, LPT3... referred to parallel ports which were typically (though not exclusively) used to connect a printer.
But why though? Do you really want a bunch of file.txt File.txt FILE.txt fIle.txt FiLe.txt FIle.txt flIe.txt… I once had a nasty bug the O in a file name was a 0 and I didn’t notice I can’t imagine the horrors this would cause.
Yeah I've definitely run into issues where case sensitivity causes problems. Especially in programs that are cross-functional between Windows and Linux. Like when I recently downloaded some bios files for a Playstation emulator and I spend time figuring out and troubleshooting why they weren't working until it finally hit me the door McFly it's cause the file name was in lowercase not uppercase. Than I cared to admit to figure out
Yeah, it's super weird. I once named a file with mixed case, but one of the letters was the wrong case. Renaming the file didn't work at first. Renaming a file named PAscalCase.txt to PascalCase.txt resulted in no change to the filename. Windows continued to show it as PAscalCase.txt. I had to rename it to something totally different with different characters entirely, then rename it again to get it right.
Renaming it in Explorer does actually rename the file if all you change is the case (in current Windows, at least, see the pedantry below), but whatever mechanism Explorer uses to determine "has this file's name changed" is apparently case insensitive. So it won't refresh the file list. I imagine this is yet another one of those damn fool Windows 95 holdovers, or something.
You don't have to do any multiple-renaming jiggery pokery. Just press F5 to refresh that Explorer window and magically then it'll show you that the file's name was indeed changed all along.
Lol, I have a NTFS drive in a Linux container so I didn’t have to re download everything I had on windows works perfectly fine, now I’m assuming if I ever try to move it back to windows something horrible will break.
For files of casual users it might be of benefit. They don't care about capitalization. For system files, I find it pretty weird to name them with random capitalization, and it's actually pretty annoying. Only lower- (or upper-)case would be ok tho.
It sounds like a fucking nightmare. Imagine working on something for days and it refuses to work cause you accidentally capitalized 1 file name and dont notice it?
That sounds like the kind of shit they'd do in tech hell.
We regularly have that problem at work. Works on your development PC on Windows. Push to pipeline, get cryptic error messages. Once we were two people trying to figure it out for half an hour.
Even more annoying is that it's very cumbersome to change the case of a file once you've created it.
If you accidentally create fIle.txt when you meant File.txt, the rename function does nothing ... and it will keep displaying as fIle.txt. You have to rename it to something else entirely, then rename it back to the original name with the intended case.
I absolutely fail to see the utility of having a user called Bob and bob, or a dir called Downloads and downloads. Capitalisation makes sense in code - at a glance I can know I'm looking at a Class or a var, but for system administration it has only ever wasted time, and not once made anything easier.
If capitalisation is used to indicate the start of words then it could make sense for a webserver to serve ExpertsExchange and ExpertSexChange. But yeah having 16 possible versions of "main" would be horrendous.
I honestly don't get why everyone is agreeing with Windows on this one. I just love how explicit Linux is.
file.txt is fucking file.txt. Don't do any type extra magic. Do exactly as I'm saying. If I say "open file.txt", it is "open file.txt", not "open File.txt".
The feature isn't being able to create filenames with the same name, nobody does that. The feature is how explicit it is.
It would be so confusing to read some code trying to access FILE.TXT and then find the filesystem has file.txt
Yeah I've been using Linux for a very long time. The amount of time I've spent on the case being incorrect is non-trivial. I've gotten better at not screwing it up throughout the years but the sum of advantages is far outweighed by the sum of debugging time spent.
Case sensitivity is so much of a problem, that in college, people were always told to keep all their filenames all lowercase, to avoid issues with them.
I'm with windows on this one. Case insensitive is much more ergonomics with the only sacrifice represented by this meme. And a little bit of performance of course. But the ergonomics are worth it imo.
so cool story, on linux theres this thing called you can just not make case sensitive files, i do it a lot.
You can also just, use a case insensitive autocomplete setup as well. If you're using a mouse idk why you're even talking about this so that wouldn't matter.
Indeed. Linux audio also allows control characters like backspace to be part of a file name (though it is harder to make such file as you can't just type the name). Which is just horrible.
I don’t think there’s a need for File.txt and fILE.txt
It's not so much about that need. It's about it being programmatically correct. f and F are not the same ASCII or UTF-8 character, so why would a file system treat them the same?
Having a direct char type to filename mapping, without unnecessary hocus pocus in between, is the simple and elegant solution.
That's some suckless level cope. What's correct is the way that creates the least friction for the end users. Who really cares about some programming purity aspect?
The main problem with case-insensitive is that software sometimes is lazily developed: If a file is named “File.txt” and a program opens “file.txt”, then on a case-insensitive file system it will work fine. If you then format your drive to case-sensitive, the same software now fails to load the file.
Source: tried case-sensitive filesystem on macOS some years ago.
Vscode does not handle this well the one time I accidentally created 2 files with different cases. On one level it recognises them both as separate files, but other time thinks they're the same.
The android build system used that limitation of Windows to prevent android from being built on Windows. They purposely had directories with the same name but different capitalization.
Case-sensitive is easier to implement; it's just a string of bytes. Case-insensitive requires a lot of code to get right, since it has to interpret symbols that make sense to humans. So, something over wondered about:
That's not hard for ASCII, but what about Unicode? Is the precomposed ç treated the same lexically and by the API as Latin capital letter c + combining cedilla? Does the OS normalize all of one form to the other? Is ß the same as SS? What about alternate glyphs, like half width or full width forms? Is it i18n-sensitive, so that, say, E and É are treated the same in French localization? Are Katakana and Hiragana characters equivalent?
I dunno, as a long-time Unix and Linux user, I haven't tried these things, but it seems odd to me to build a set of character equivalences into the filesystem code, unless you're going to do do all of them. (But then, they're idiosyncratic and may conflict between languages, like how ö is its letter in the Swedish alphabet.)
This thread is giving me flashbacks to the times before Unicode, when swapping files between Windows and Linux partitions would have a good chance of fucking up every non-ASCII characters in their names.
There was ways to set it up so the ISO character sets would match, but it was still a giant pain to deal with different ones.
A related issue I still see very often, even with files newly created just this year, is when trying to extract zip files on my Linux systems that contain non-ASCII filenames and that were created on Windows systems, especially ones with apparently non-English locales like Japanese. Need to trial and error the locale I give to unzip and sometimes hack together fixed names with iconv until the mojibake seems to fix itself.
What I really like is a naming files with a forbidden windows character in Linux and they wont copy over to a windows partition. I end up using a question mark quite a bit for some reason.
Sure there was mirc bug back in the day if you named yourself something like con or ps2 or any windows device name it would freeze that device on the windows machine.
Strictly speaking, this is a limitation of the default filesystem, and not the core operating system. If you mount a NFS share that is case sensitive, it will still be case sensitive.
Fun things happen whenever you upload 2 files with the same names, but differently capitalized letters to a Nas from a linux box, and then try to delete one of them from windows.
It broke so hard I actually got a bsod....
What a tragedy. Giving files slightly different names seems far more organized and logical than having several files with the same name and different capitalization. Really seems like a non-issue to me.
EDIT: I will never simp for Windows or Microsoft, I definitely think Linux is better in many ways. But my point still stands about this specific topic.
I've used Windows for a bit more than a decade, and I only found out its VFS is case-insensitive (by default) after I fully ditched the OS, when a bunch of Electron applications created directories with different cases - nothing ever broke because of it, save for a single Godot game.
Personally, I think case-insensitivity seldom makes sense, though I'm also aware that not everyone [knows how / is able] to properly operate a keyboard.
This makes installing Skyrim mods harder because mods often contain differing versions of folder names. For example one mod might be "Scripts" and the other might be "scripts". This means you can't have Skyrim mods on Linux if you're allergic to copying files manually as this will generally make mod managers not work as well. People on forums like nexus often have a hard time even grasping the concept of not using a mod manager so it's hard to get help of any kind.
I encountered similar with mods for Transport Fever which has had Linux native builds since the original Train Fever, but many mods have bugs related to inconsistent capitalization in the files that make up the mods. I haven't looked into if it works differently when running via wine/steamplay
Look at a lot of postings in the “insanepeoplefacebook” community. There are a lot of “sovereign citizens” who believe that when you’re born the government makes a corporation using the all caps version of your name. And that the case sensitivity of how your name appears on bills matters as they’re distinctly different people.
Nah, Windows still fucks it up. I was forced to use Windows 11 for a code generation tool from a chip vendor the other week and it screwed everything up by inserting references to a directory with different cases than how it was actually created.
That's more likely to be the tool assuming it's running on a case-insensitive filesystem than it is Windows breaking anything. If you mount networked storage running on a case-sensitive machine, that's something that's worked fine in Windows for a very long time.
you can also use basically anything that's not / in a file name as well, it's pretty based. Meanwhile on windows you have to use SMB mappings if you don't want your directory structure to self immolate, what a good operating system.
I recently renamed a few movie files to something with ':'. That worked fine on Linux, but lead to some issues on windows. With a lot of errors from next cloud for file sync and me not being able to rename them without booting back to Linux. Fun stuff
if you're using samba file sharing across OS's (like you should) you should use something called catia:mappings in order to solve that problem. It means shit like colon will be mapped to a different character, but there are some sane mappings out there that you can use.
Just tried. It processes the escape first and then finds the path with it. Essentially, making it look into a directory made by the characters before the \/.
The above was when I tried:
echo "asd" > asd\/dsa
But then I tried using Dolphin (GUI File Browser) to make a file and:
❯ ls
1 2 3 4 'asd\⁄sad.txt'
❯ ls
1 2 3 4 asd⁄sad.txt
In the first one, the backslash is not the escape character, but part of the text.
Turns out Dolphin just replaces the forward slash with U+2044 "Fraction Slash" character, hence, not requiring any escape. I'd call that cheating, but it works well.
i'm not sure if you're allowed to escape the / character, i feel like it's blatantly illegal. But you could use the funny character set trolling thing instead, where you use a not forward slash instead. (not the \)
Thought experiment: Would you expect a programming language variable name to be case insensitive?
That is, if you set foo = 1 and then print FOO, what should happen? Most programming languages throw an error.
Is this even comparable with filenames, which are, after all, basically variable names that hold large quantities of data?
If there is a difference, is it the fact it's a file, or - for a mad idea - should files with only a few bytes of data retain case insensitivity? And if that idea is followed through, where's the cutoff? 256 bytes? 7?
(Anyway, Windows filenames are case sensitive, in a sense. If you save "Letter to Grandma.txt" it will retain those two capital letters and all the lower case letters exactly as they are. It won't suddenly change to "LETTER to Grandma.txt", despite the fact that if you try to open a file by that name, you'll get the same file.)
PowerShell variable names and function names are not case sensitive.
I understand the conventions of using capitalization of those names having specific meanings in regards to things like constants, but the overwhelming majority of us all use IDEs now with autocomplete.
Personally, I prefer to use prefixes anyway to denote that info. Works better with segmenting stuff for autocomplete, and has less overhead of deriving non-explicit meaning from stuff like formatting or capitalization choices.
On top of that, you really shouldn't be using variables with the same name but different capitalization in the same sections of code anyway. "Did I mean to use $AGE, $Age, or $age here?" God forbid someone come through to enforce standards or something and fuck that all up.
That would be awful for CAD software since they often display part names, which are derived from the file name only in uppercase letters for readability. But Linux doesn't really have any industry standard CAD software anyway.
I sometimes run into this when I extract an archive file on Windows and there are files named with different cases but are otherwise the same. I prefer case-sensitivity because I like precision and fewer assumptions being made about a system and how it's used.