Though the Windows thing was really funny 😂.

  • bort@sopuli.xyz
    link
    fedilink
    arrow-up
    95
    ·
    8 months ago

    the linux-file-deletion is used as a example for good software design. It has a very simple interface with little room for error while doing exactly what the caller intended.

    In John Ousterhout’s “software design philosophy” a chapter is called “define errors out of existence”. In windows “delete” is defined as “the file is gone from the HDD”. So it must wait for all processes to release that file. In Linux “unlink” is defined as “the file can’t be accessed anymore”. So the file is gone from the filesystem immediately and existing file-handles from other processes will life on.

    The trade-off here is: “more errors for the caller of delete” vs “more errors due to filehandles to dead files”. And as it turns out, the former creates issues for both developers and for users, while the later creates virtually no errors in practice.

  • RealFknNito@lemmy.world
    link
    fedilink
    English
    arrow-up
    58
    arrow-down
    1
    ·
    8 months ago

    I like the windows delete philosophy of asking me before I delete something.

    I fucking hate the windows delete philosophy of telling me I don’t have access after I said yes.

    I’m this close to daily driving as Sadmin

  • Koof_on_the_Roof@lemmy.world
    link
    fedilink
    arrow-up
    54
    ·
    8 months ago

    One drive has a trash for the trash. I’m still not convinced those files are gone after the 2nd empty, I think they just don’t show the other trash cans

    • Ziglin@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      8 months ago

      They usually support one but it is generally not provided by the file manager it’s self. This means that assuming that the file managers use the same trash system you can trash a file on one recover it another.

  • flambonkscious
    link
    fedilink
    English
    arrow-up
    44
    ·
    8 months ago

    The windows shell has really gone downhill in recent years, with spontaneous file locks and random hangs

    It’s always the AV…

  • Avid Amoeba@lemmy.ca
    link
    fedilink
    arrow-up
    29
    ·
    edit-2
    8 months ago

    I’m so annoyed when I tell rm to delete a terabyte of data and it’s nowhere near instant. I’d have probably gone insane if I was using Windows.

    • 0x4E4FOP
      link
      fedilink
      English
      arrow-up
      16
      ·
      edit-2
      8 months ago

      1TB for Windows… depends on file size, but let’s presume you have 1TB of Word documents… just hit Enter and go watch the Matrix trilogy.

      • Couldbealeotard@lemmy.world
        link
        fedilink
        English
        arrow-up
        6
        ·
        8 months ago

        “what are you trying to tell me? I’ll be able to select ‘yes’ when it asks me if I’m sure I want to delete?”

        “No, Neo. I’m saying when you switch to Linux you won’t have to.”

    • Andrew@mander.xyz
      link
      fedilink
      arrow-up
      2
      ·
      8 months ago

      Akchooly, what you’re referring to as terabyte (TB) is called tebibyte (TiB), because window$ suck and JADEC made everyone believe that binary units are metric units, which is stupid. But we have the savior IEC which KDE is using in all of their software and I respect that.

      https://en.m.wikipedia.org/wiki/Binary_prefix

  • don@lemm.ee
    link
    fedilink
    arrow-up
    22
    ·
    8 months ago

    Left side: I regularly go bowling with the demon core

    Right side: I have read the demon core’s wiki 314 times

    • 0x4E4FOP
      link
      fedilink
      English
      arrow-up
      6
      ·
      8 months ago

      314 🤔… like as in Pi*100?

        • 0x4E4FOP
          link
          fedilink
          English
          arrow-up
          3
          ·
          8 months ago

          There is no such thing as coincidence.

          Gets down and his knees and starts bowing to the chosen one

      • 0x4E4FOP
        link
        fedilink
        English
        arrow-up
        6
        ·
        edit-2
        8 months ago

        With great power comes great responsibility. Do check twice what you write.

        Jokes aside, it has happened to almost everyone… and then you learn to QUADRUPLE CHECK dd commands.

        • Eccitaze@yiffit.net
          link
          fedilink
          arrow-up
          5
          ·
          8 months ago

          I haven’t accidentally deleted a bunch of data yet (which, considering 99% of my interaction with Linux is when I’m SSH’d into a user’s server, I am very paranoid about not doing), but I have run fsck on a volume without mounting the read/write flashcache with dirty blocks on it first.

          Oops.

          • 0x4E4FOP
            link
            fedilink
            English
            arrow-up
            1
            ·
            8 months ago

            It will happen to you sooner or later 😂… we’re all dead on a long enough time scale 🤷 😂.

          • 0x4E4FOP
            link
            fedilink
            English
            arrow-up
            1
            ·
            8 months ago

            That’s a very bleak future… at least for me.

    • Pete90@feddit.de
      link
      fedilink
      arrow-up
      4
      ·
      edit-2
      8 months ago

      I did, and it was fast. I was a complete noob, so I thought rm -rf /* would delete everything in the current folder. I hit Ctrl + C, but it was too late. Took a few seconds to wipe out the whole system.

  • Honytawk@lemmy.zip
    link
    fedilink
    arrow-up
    18
    arrow-down
    3
    ·
    8 months ago

    Now wonder, which one is will be preferred by people who aren’t tech savvy.

    • porl@lemmy.world
      link
      fedilink
      English
      arrow-up
      13
      ·
      8 months ago

      They are not likely to be using the terminal. Pretty much every graphical file browser will ask for confirmation upon delete, and many will use a rubbish bin by default.

    • Ziglin@lemmy.world
      link
      fedilink
      arrow-up
      6
      ·
      8 months ago

      To be fair, assuming you are not using a wastebasket which comes pre installed in a lot of distros, you still need the right permissions to delete files that belong to the system and if you’re using rm you have to use the -rf option to remove a folder and it’s contents.

    • 0x4E4FOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      8 months ago

      Yeah, but get this! It’s not enough to just envoke cmd in Windows with just Win+R (sorry, sorry… Super+R 😁), even though you’re invoking it from an admin account, no sir, it’s still just a plain user as long as cmd is concerned 😂.

      And this is what you get when you wanna do backwards compatibility all the way down to DOS 😂.

      • Ziglin@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        8 months ago

        We have pretty good backwards compatibility too, to my knowledge it’s actually better.

        • 0x4E4FOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          8 months ago

          My point was, MS has backwards compatibility all the way down to an OS that has no sense of users and permissions and that is why Windows, even nowadays, has these problems. If you get rid of the DOS legacy stuff, you can have decent user permission and security in place, but too much shit relies on legacy code, so they keep it.

    • 0x4E4FOP
      link
      fedilink
      English
      arrow-up
      20
      arrow-down
      2
      ·
      edit-2
      8 months ago

      Not just every file deleted, every file written to disk as well (downloaded, extracted from an archive, whatever).

      It’s also how most AV software works, except Defender is slow AF.

      • voxel@sopuli.xyz
        link
        fedilink
        arrow-up
        8
        ·
        8 months ago

        also, defender is synchronous by default (e.g. nothing gets written until it gets scanned, and scanning parallelization is limited), and can only act asynchronously (aka write first, then queue check) on “trusted dev drives” (aka ReFS-based virtual vhdx partitions aimed at developers as a solution to horrible ntfs throughput, especially if defender is enabled)

        • 0x4E4FOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          8 months ago

          Not true, it does get written before it gets scanned. In fact, it doesn’t even always scan before the file is read by explorer (yes, it’s the worst AV ever). It’s easy to prove this, just extract FFF’s WinRAR keygen and you’ll see what I mean.

      • HStone32@lemmy.world
        link
        fedilink
        arrow-up
        8
        arrow-down
        1
        ·
        8 months ago

        Huh. All that security, and yet there are still so many viruses capable of infecting windows.

        • deur@feddit.nl
          link
          fedilink
          arrow-up
          9
          arrow-down
          2
          ·
          8 months ago

          Huh… all that immune system yet there are still so many viruses capable of infecting humans.

          • 0x4E4FOP
            link
            fedilink
            English
            arrow-up
            1
            ·
            8 months ago

            Humans are easy targets 😁… we’ve lived semi-isolated from nature at least the last few hundred years.

        • 0x4E4FOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          8 months ago

          No, it scans file headers when you do read/write operations on disk. Every AV works this way, except, as I said, Defender is slow AF.

          • uis@lemm.ee
            link
            fedilink
            arrow-up
            1
            ·
            8 months ago

            I can’t find talk I watched, but I found github issue it was based on.

            Short version: Defender is triggered not on open, not on read or write, but on CloseHandle.

  • EnderMB@lemmy.world
    link
    fedilink
    arrow-up
    7
    ·
    8 months ago

    One of my first experiences with Linux at university was watching a classmate install Slackware, and then (for a laugh) dragging everything into the recycle bin.

    They got a passing grade, because the lecturer saw their working installation, but they learned a valuable lesson in Linux that if you delete something, it’ll fucking delete it.