This is one case where I think Windows is appropriately designed for its target audience.
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
Oh, I realize why it is, I just don’t see it as an advantage, the whole argument is just a technical one, not a usabillity one.
You’re basically arguing that a system shouldn’t support user friendly things because that would add significant burden to the programmer.
The quintessential linux philosophy. Well done! I mean, what is language? Why have named code variables? This is just a random array of bytes!
No, I’m arguing that the extra complexity is something to avoid because it creates new attack surfaces, new opportunities for bugs, and is very unlikely to accurately deal with all of the edge cases.
Especially when you consider that the behaviour we have was established way before there even was a unicode standard which could have been applied, and when the alternative you want isn’t unambiguously better than what it does now.
“What is language” is a far more insightful question than you clearly intended, because our collective best answer to that question right now is the unicode standard, and even that’s not perfect. Making the very core of the filesystem have to deal with that is a can of worms which a competent engineer wouldn’t open without very good reason, and at best I’m seeing a weak and subjective reason here.
Well you’re just asking an economic question, are the costs worth the benefits?
I’d argue that linux will never be a good or user friendly operating system without case insensitive filenames.
That isn’t an opinion but could be verified through scientific study of how confused people act. You don’t even need computers, just ask someone to get the “something SomeTHing” from a labeled box in a cupboard. Presumably science would show that case insensitive naming of things is always less confusing when humans actually use the system.
The truth is that programmers enjoy writing code far more than reading code. And especially to open source developers “usability” is a dirty word. It’s not about the value of a thing, it’s about the beauty of how it is done.
pov: you encode filenames in utf-1, just happens to contain one of those bytes
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
Idiot user! ;)
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.
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).
Huh I had thought case-sensitive was default on APFS/HPFS and you had to choose insensitive specifically but I guess not
Just checked on my work box - if you go into Disk Utility and start the process to add a volume, the default selection is
APFS
, and there’s an option in the dropdown for forAPFS (Case-sensitive)
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
Git likes to have a word with you.
Command ‘Git’ not found
Beautiful
Huh, what makes this a use case in favor of case sensitive file names? How does git use this feature?
Create multiple branches that only differ in cases from a Unix OS so it breaks git for Windows users in the same project.
We had a repo with some really weird (filename) case issues on Mac also. I could only fix it on my home Linux machine, by deleting all the affected files, committing that, then restoring them with all lowercase names. Only time I’ve dealt with that in 20 years but it can happen!
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.
Nope. Completely different.
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.
My point is not about how case is meant to be used my point is that it is very easy to make a mistake that is difficult to spot. I think it makes a lot more sense to the case insensitive, and force different names to be used.
This is the first time I’ve seen uppercase denoting scope. Usually it is done with a “_” or “__” prefix.
Casing styles usually mean different identifier types.
snake_case or pascalCase for functions and variables, CamelCase for types, UPPER_SNAKE_CASE for constants, and so on.
If we want to apply this to file systems, you could argue something like: CamelCase for directories, snake_case for files, pascalCase for symlinks, UPPER_SNAKE_CASE for hidden files.
My naming convention for C++ is that custom types are capitalized and instances aren’t. So I might write
User user;
.
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.
So what you’re telling me is that it’s useful when the software you use is made by absolute idiots?
It’s not about software. Program, PROGRAM were just placeholders for content. I know you can think more abstract and argue in better faith than this.
Replace ‘software’ by w/et placeholder thing
I think if you can write them in two different ways it should consider them two different things
Windows and NTFS support case sensitive filenames. The functionality is disabled for compatibility reasons.
I remember the good old days of Windows MS-DOS where they had an 8 character filename limit lol
8.3, actually!
Gotta go count my files again… oh yeah it’s PROJE~14.BAS
haha that was so infuriating. if their intent was to bastardize the filename horribly to make it noticeable that you defied the DOS limitation, they certainly succeeded. Yuck, totally forgot about the
~1
thing!Funnily enough you can have up to 65536 files in a directory in FAT, so you could technically end up with PR~65536.BAS
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.
And you can enable it: https://learn.microsoft.com/en-us/windows/wsl/case-sensitivity
I actually really like that fsutil case sensitivity can be set on a folder by folder basis so that I can have a safe space to deal with Linux files.
What happens if i put case sensitive files into an ntfs pendrive and plugged into windows?
Windows sees both files
Can it rename it then? What happens if cd into a folder from cmd with same name?
Windows gets confused, I don’t remember what exactly happens.
You can create files with the same name differing only by case through WSL. I’ve had issues with it before.
I can make a file named COM1 on Linux. That’s on the forbidden list for Windows.
The forbidden list:
- CON
- PRN
- AUX
- CLOCK$
- NUL
- COM1
- COM2
- COM3
- COM4
- COM5
- COM6
- COM7
- COM8
- COM9
- LPT1
- LPT2
- LPT3
- LPT4
- LPT5
- LPT6
- LPT7
- LPT8
- LPT9
That’s because Windows is generally very backwards compatible.
So is Linux, but it puts stuff like that in /dev
deleted by creator
LPT1 LPT2 LPT3 LPT4 LPT5 LPT6 LPT7 LPT8 LPT9
Why does Microsoft hate Life Pro Top listicles?
oh no, but com5 is one of my favorite words! literally unusable.
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
Oooh, I’ve had that with some device. I think it was a camera or something like that. I’d forgotten about it. It took me ages to figure it out.
Yours is not too question why, yours is to admire the marvel of technology even if it’s worth than useless
surely this is the only place where we would run into stupid syntax problems, right?
imo syntax bugs will be a thing until the end of time, they certainly beat having to rip out 90% of what you’ve done to fix it that’s for sure.
Oh it’s even better, windows explorer can’t really do case sensitive
But NTFS is a case sensitive file system
This occasionally manifests in mind boggling problems
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.
Nope. Tried that. Tried DIR in a command window too. But I never specified even what version of Windows I was running, so I’m a little unclear why you’re trying to troubleshoot a problem I was experiencing on windows nearly a decade ago. I guess this is what be mansplained too feels like.
You can enable case sensitivity in windows. It’s only disabled by default.
I wouldn’t do it though. It can only lead to problems, especially with poorly coded programs.
It’s generally fine, the vast majority of applications are fine with it, it’s mainly the legacy shit that falls over.
You can also enable it on a per directory basis, and I’ve yet to encounter a Dev tool that has issues with it. Same for the path limit, you can have long paths enabled too.
NTFS is case insensitive because it’s supposed to be more POSIX compatible than its precursors.
deleted by creator
WHAT
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.
And i hate it being case sensitive
Yeah, right? Are we pretending that having case sensitive file names isn’t a bad call, or…? There are literally no upsides to it. Is that the joke?
I’m with you here, i find it infuriating and i never ever had the situation where this was beneficial.
Like who tf actually creates a File.txt, file.txt AND FILE.TXT in one place and actually differentiates them with that.
I mean, it’s less of an issue on Linux for both design and user profile reasons, but imagine a world where somebody can send all the normie Windows users a file called Chromesetup.exe to sit alongside ChromeSetup.exe. Your grandma would never stop calling you to ask why her computer stopped working, ever.
Who sends setup binaries? I would tell my grandma to install it from the repository.
Pfft, I would key her the hexdump of the binary via morse code
Something something emacs
Isn’t it less strain on the Filesystem? keeping a sanitised filename next to the actual filename surely has some drawbacks.
For example I might store blobs of data processed by my database in files that have the Base64 ID of the blob as the filename. If the filesystem was case insensitive, I’d be getting collisions.
Users probably don’t make such files, no. But 99% of files on a computer weren’t created by the user, but are part of some software, where it may matter.
And often software originally written for Linux or macOS and then ported to Windows ends up having problems due to this.
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.
Well, camel case does help readability on file names. But I guess that’s the point of case insensitive names, it doesn’t matter. However you want to call them will work.
And I love it.
CMV: all Linux files should be case insensitive, displayed as lowercase and mandatory
snake_case
.
Is it just me or is that more of a hinderance?
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.
Yeah
Definitely an inconvenient thing.
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
I find it really fucking irritating on Linux tbh. It knew what file I meant.
Yeah as someone who uses both this is really not much of a feature.
It’s a lack of a feature really. Case insensitivity takes way more work.
Windows way is superior, in my opinion. I don’t think there’s a need for File.txt and fILE.txt
FlLE.txt FILE.txt
Indeed. Linux
audioalso 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.Linux audio?
:D.
Fixed
Yeah, Linux can capture and playback the spoken distinction between lowercase and uppercase letters. Windows can’t do that.
You’re not taking advantage of that functionality?
I sense sarcasm but I don’t really get it. I still can’t tell if the OC had a typo or not :)
: D
I think they just fixed it
I was so curious if there was some weird Linux audio system I didn’t begin to understand lol
It sounded plausible kind of because every device is mapped to a file path somewhere!
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.
You can, but assholes out there won’t.
hence the inclusion of the case insensitive auto completion, it’s not 1982, you can use that now.
If I have two folders in my directory,
Dir1
anddir2
, what doesd <TAB>
autocomplete to and what should it do?At least on zsh it would pop both of those as suggestions you can cycle through.
In the case of zsh it will quite happily do either and ask you which you meant just like if they were called Dir1 and Dir2. Also works if you have a dir1 and Dir2 in the same directory as well
When you say "canse insensitive file*, do you mean lowercase files? Or is there an option?
Idk why we talking about mouses. When I’m on Linux, most of the time it’s through ssh.
cd downloads
bash: cd: downloads: No such file or directory
cd Downloads
user@pcname:~/Downloads$
Bash has an option for that you can put in your
.bashrc
:bind "set completion-ignore-case on"
Zsh autocompletes lowercase input to the correct file or folder name when using tab. It’s great!
Fish does this too, it’s super convenient
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.
touch 'C:\WINDOWS\SYSTEM32'
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.)
Yeah the us defaultism really shows here.
More characters than Ascii? Surely you must be mistaken.
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.
Blessed be Unicode.
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.
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…