• FQQD@lemmy.ohaa.xyz
    link
    fedilink
    English
    arrow-up
    112
    arrow-down
    4
    ·
    edit-2
    13 days ago

    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

    • Kusimulkku@lemm.ee
      link
      fedilink
      arrow-up
      2
      arrow-down
      2
      ·
      13 days ago

      I think if you can write them in two different ways it should consider them two different things

    • gramie@lemmy.ca
      link
      fedilink
      arrow-up
      11
      arrow-down
      2
      ·
      13 days ago

      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.

      • Serinus@lemmy.world
        link
        fedilink
        arrow-up
        12
        arrow-down
        1
        ·
        edit-2
        13 days ago

        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.

        • calcopiritus@lemmy.world
          link
          fedilink
          arrow-up
          3
          ·
          13 days ago

          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.

        • gramie@lemmy.ca
          link
          fedilink
          arrow-up
          5
          ·
          13 days ago

          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.

        • OrganicMustard@lemmy.world
          link
          fedilink
          arrow-up
          25
          ·
          13 days ago

          Create multiple branches that only differ in cases from a Unix OS so it breaks git for Windows users in the same project.

          • TrickDacy@lemmy.world
            link
            fedilink
            arrow-up
            9
            ·
            13 days ago

            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!

    • 5714@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      12 days ago

      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.

      • redisdead@lemmy.world
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        11 days ago

        So what you’re telling me is that it’s useful when the software you use is made by absolute idiots?

        • 5714@lemmy.dbzer0.com
          link
          fedilink
          arrow-up
          2
          ·
          11 days ago

          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.

  • PenisDuckCuck9001@lemmynsfw.com
    link
    fedilink
    arrow-up
    13
    arrow-down
    1
    ·
    edit-2
    13 days ago

    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.

    • Trainguyrom@reddthat.com
      link
      fedilink
      English
      arrow-up
      1
      ·
      13 days ago

      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

  • radamant@lemmy.world
    link
    fedilink
    English
    arrow-up
    41
    arrow-down
    15
    ·
    13 days ago

    Windows way is superior, in my opinion. I don’t think there’s a need for File.txt and fILE.txt

    • DefederateLemmyMl@feddit.nl
      link
      fedilink
      arrow-up
      19
      arrow-down
      8
      ·
      13 days ago

      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.

      • Serinus@lemmy.world
        link
        fedilink
        arrow-up
        9
        arrow-down
        2
        ·
        13 days ago

        It turns out that the easiest thing to program isn’t always the best application design.

        • DefederateLemmyMl@feddit.nl
          link
          fedilink
          English
          arrow-up
          5
          arrow-down
          4
          ·
          edit-2
          13 days ago

          I would argue that elegance and being easy to program are virtues by themselves, because it makes code easy to understand and easy to maintain.

          A one-to-one string to filename mapping is straightforward and elegant. It’s easy to understand (“a filename is a unique string of characters”), it makes file name comparisons easy (a bit level compare suffices) and as long as you consistently use the case that you intend, it doesn’t behave unexpectedly. It really is the way of the least surprise.

          After all, case often does have meaning, so why shouldn’t it be treated as a meaningful part of a filename? For example: “French fries.jpg” could contain a picture of fries specifically made in France, whereas “french fries.jpg” could contain a picture of fries made anywhere. Or “November rain.mp3” could be the sound of rain falling in the month of November, whereas “November Rain.mp3” is a Guns N’ Roses song. All silly examples of course, but they’re merely to demonstrate that capitalization does have meaning, and so we should be able to express that canonically in filenames as well.

        • DefederateLemmyMl@feddit.nl
          link
          fedilink
          arrow-up
          8
          arrow-down
          4
          ·
          edit-2
          13 days ago

          Because it’s designed for average people

          It is not. It is designed for all purposes, automated processes and people alike. A filesystem is not just for grandma’s Word documents.

          And even people’s names are case sensitive. My name has the format Aaa Bbb ccc Ddd. It is not the same as the person with the name Aaa Bbb Ccc Ddd, who also exists. So why shouldn’t file names be?

            • DefederateLemmyMl@feddit.nl
              link
              fedilink
              English
              arrow-up
              5
              arrow-down
              5
              ·
              edit-2
              13 days ago

              give me one use case where it makes sense having several files with the same name but different cases in the same directory

              Imagine a table in a database where the primary key is a case sensitive character field, because you know varchars, just like C char types and string types in other languages are case sensitive.

              Imagine a database administrator does the following:

              • Export all data with primary key = ‘Abcde’ to ‘Abcde.csv’

              Imagine a second database adminstrator around the same time does the following:

              • Export all data with primary key = ‘abcde’ to ‘abcde.csv’

              Now imagine this is the GDPR data of two different users.

              If you have a case insensitive file system, you’ve just overwritten something you shouldn’t have and possibly even leaked confidential data.

              If you have a case sensitive file system you don’t have to account for this scenario. If the PK is unique, the filename will be unique, end of story.

                • DefederateLemmyMl@feddit.nl
                  link
                  fedilink
                  English
                  arrow-up
                  6
                  arrow-down
                  1
                  ·
                  13 days ago

                  The point is you have to take this into account, so the decision to go with a case insensitive file system has ripple effects much further down your system. You have to design around it at every step in code where a string variable results in a file being written to or read from.

                  It’s much more elegant if you can simply assume that a particular string will 1-on-1 match with a unique filename.

                  Even Microsoft understands this btw, their Azure Blob Storage system is case sensitive. The only reason NTFS isn’t (by default) is because of legacy. It had to be compatible with all uppercase 8.3 filenames from DOS/FAT16.

      • radamant@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        2
        ·
        12 days ago

        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?

        • DefederateLemmyMl@feddit.nl
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          12 days ago

          That’s some suckless level cope

          Thanks, really constructive way of arguing your point…

          Who really cares about some programming purity aspect?

          People who create operating systems and file systems, or programs that interface with those should, because behind every computing aspect is still a physical reality of how that data is structured and stored.

          What’s correct is the way that creates the least friction for the end users

          Treating different characters as different characters is objectively the most correct and predictable way. Case has meaning, both in natural language as well as in almost anything computer related, so users should be allowed to express case canonically in filenames as well. If you were never exposed to a case insensitive filesystem first, you would find case sensitive the most natural way. Give end users some credit, it’s really not rocket science to understand that f and F are not the same, most people handle this “mindblowing” concept just fine.

          Also the reason Microsoft made NTFS case insensitive by default was not because of “user friction” but because of backwards compatibility with MSDOS FAT16 all upper case 8.3 file names. However, when they created a new file system for the cloud, Azure Blob Storage, guess what: they made it case sensitive.

    • lily33@lemm.ee
      link
      fedilink
      arrow-up
      18
      arrow-down
      1
      ·
      edit-2
      13 days ago

      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.

  • 9point6@lemmy.world
    link
    fedilink
    arrow-up
    44
    arrow-down
    1
    ·
    13 days ago

    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

      • Scrollone@feddit.it
        link
        fedilink
        arrow-up
        9
        ·
        13 days ago

        I wouldn’t do it though. It can only lead to problems, especially with poorly coded programs.

        • Kushan@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          13 days ago

          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.

      • dan@upvote.au
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        12 days ago

        Same on MacOS - when you format a drive, you can pick whether it’s case sensitive or not.

    • stupidcasey@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      13 days ago

      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.

    • Wolf314159@startrek.website
      link
      fedilink
      arrow-up
      14
      ·
      13 days ago

      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.

      • dual_sport_dork 🐧🗡️@lemmy.world
        link
        fedilink
        arrow-up
        12
        arrow-down
        1
        ·
        edit-2
        13 days ago

        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.

        • Wolf314159@startrek.website
          link
          fedilink
          arrow-up
          2
          arrow-down
          8
          ·
          13 days ago

          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.

  • stupidcasey@lemmy.world
    link
    fedilink
    arrow-up
    47
    arrow-down
    1
    ·
    13 days ago

    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.

    • KillingTimeItself@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      2
      ·
      13 days ago

      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.

    • Moah@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      4
      arrow-down
      1
      ·
      13 days ago

      Yours is not too question why, yours is to admire the marvel of technology even if it’s worth than useless

    • inverted_deflector@startrek.website
      link
      fedilink
      arrow-up
      9
      ·
      13 days ago

      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

      • AnUnusualRelic@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        12 days ago

        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.

  • fadhl3y@lemmy.world
    link
    fedilink
    English
    arrow-up
    17
    ·
    13 days ago

    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.

  • mrvictory1@lemmy.world
    link
    fedilink
    arrow-up
    53
    arrow-down
    1
    ·
    13 days ago

    Windows and NTFS support case sensitive filenames. The functionality is disabled for compatibility reasons.

  • calcopiritus@lemmy.world
    link
    fedilink
    arrow-up
    33
    arrow-down
    3
    ·
    13 days ago

    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.

    • KillingTimeItself@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      7
      arrow-down
      7
      ·
      13 days ago

      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.

          • exu@feditown.com
            link
            fedilink
            English
            arrow-up
            2
            ·
            12 days ago

            If I have two folders in my directory, Dir1 and dir2, what does d <TAB> autocomplete to and what should it do?

            • boomzilla@programming.dev
              link
              fedilink
              arrow-up
              0
              ·
              12 days ago

              In fish it would immediately expand to dir2.

              If you have “Dir1” and “DIR2” and you type “cd d”, your prompt will look like in the next picture. Fish automatically transforms “d” into “D”, because there is no dir starting with the lowercase “d”.

              On a subsequent <TAB> you’ll get a list of dirs matching your prompt so far in which you choose an entry with the cursor key and enter it with the enter key.

            • KillingTimeItself@lemmy.dbzer0.com
              link
              fedilink
              English
              arrow-up
              1
              ·
              12 days ago

              it depends on your shell configs. In my case it sits at dir/Dir (case insensitive) waiting for me to specify 1 or 2, where as if you disable it, it’s dependent on whether or not you type d or D.

            • ReCursing@lemmings.world
              link
              fedilink
              arrow-up
              2
              ·
              12 days ago

              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

      • calcopiritus@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        13 days ago

        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.

        • KillingTimeItself@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          2
          ·
          12 days ago

          either or, whatever the fuck you want really.

          You can just not use capital letters if you feel like it. Works pretty well. Or just use a case insensitive shell handler for pretending it’s not actually cased at all.

          Hell im pretty sure you could just render all of the text in a certain case and call it a day lol.

  • potentiallynotfelix@lemdro.id
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    2
    ·
    13 days ago

    you mean ntfs and fat are, not windows itself. if windows supported ext4, it wouldn’t have case sensitivity on an ext4 drive

  • arthurpizza@lemmy.world
    link
    fedilink
    English
    arrow-up
    49
    ·
    13 days ago

    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
    • cygnus@lemmy.ca
      link
      fedilink
      arrow-up
      8
      ·
      13 days ago

      LPT1 LPT2 LPT3 LPT4 LPT5 LPT6 LPT7 LPT8 LPT9

      Why does Microsoft hate Life Pro Top listicles?

      • DefederateLemmyMl@feddit.nl
        link
        fedilink
        arrow-up
        3
        ·
        13 days ago

        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.

    • lud@lemm.ee
      link
      fedilink
      arrow-up
      18
      ·
      13 days ago

      That’s because Windows is generally very backwards compatible.

        • DefederateLemmyMl@feddit.nl
          link
          fedilink
          arrow-up
          13
          arrow-down
          1
          ·
          13 days ago

          The thing is, a lot of the legacy backwards compatible stuff that’s in Linux is because a lot of things in Unix were actually pretty well thought out from the get go, unlike many of the ugly hacks that went into MSDOS and later Windows and overstayed their welcome.

          Things like: long case sensitive file names from the beginning instead of forced uppercase 8.3 , a hierarchical filesystem instead of drive letters, “everything is a file” concept, a notion of multiple users and permissions, pre-emptive multitasking, proper virtual memory management instead of a “640k is enough” + XMS + EMS, and so on.

          • the_crotch@sh.itjust.works
            link
            fedilink
            arrow-up
            4
            ·
            13 days ago

            Unix was designed for mainframes, qdos/msdos was designed to be a cpm knockoff the local nerd could use to play commander keen and do his taxes. It’s actually impressive how much modern/business functionality they were able to cram into that.

            • DefederateLemmyMl@feddit.nl
              link
              fedilink
              English
              arrow-up
              6
              ·
              13 days ago

              Unix was designed for mainframes

              Unix was never for mainframes. It was for 16-bit minicomputers that sat below mainframes, but yes they were more advanced than the first personal computers.

              It’s actually impressive how much modern/business functionality they were able to cram into that.

              Absolutely, but you have to admit that it’s a less solid foundation to build a modern operating system on.

              In the 80s, there were several Unices for PC too btw: AT&T, SCO, even Microsoft’s own Xenix. Most of them were prohibitively expensive though.

          • BCsven@lemmy.ca
            link
            fedilink
            arrow-up
            8
            ·
            13 days ago

            It still amazes me how well thought out unix was for the era when computing was in its infancy. But I guess that is what you get with computer science nerds from Universities and a budget for development based on making a product the goal, not quarterly profit the goal.

            • superkret@feddit.org
              link
              fedilink
              arrow-up
              4
              ·
              edit-2
              12 days ago

              It’s what you get when you design an OS for a mainframe computer that is accessed by many users sharing its resources.
              DOS was designed for single-user PC’s with very limited processing power, memory and storage, and no access to networked drives. Lots of its hacks and limitations saved a few hundred bytes of memory, which was crucial at the time.

              • BCsven@lemmy.ca
                link
                fedilink
                arrow-up
                3
                arrow-down
                1
                ·
                12 days ago

                I guess i was meaning compared to DOS but modern Windows, where stupid stuff is broken, and they care more about ads than creating a clean OS

  • palordrolap@fedia.io
    link
    fedilink
    arrow-up
    9
    arrow-down
    1
    ·
    13 days ago

    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.)

    • MonkderVierte@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      13 days ago

      That is, if you set foo = 1 and then print FOO, what should happen? Most programming languages throw an error.

      JS would say ok

    • wizardbeard@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      13 days ago

      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.

  • MehBlah@lemmy.world
    link
    fedilink
    arrow-up
    18
    ·
    13 days ago

    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.

    • platypus_plumba@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      8 days ago

      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

    • plumbercraic@lemmy.sdf.org
      link
      fedilink
      arrow-up
      16
      arrow-down
      1
      ·
      12 days ago

      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.

      • letsgo@lemm.ee
        link
        fedilink
        arrow-up
        5
        ·
        12 days ago

        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.

        • Eiri@lemmy.ca
          link
          fedilink
          arrow-up
          2
          ·
          12 days ago

          URLs aren’t case-sensitive though, so wouldn’t those necessarily have another kind of differentiator?