• @wildbus8979
    link
    84
    edit-2
    1 month ago

    Remember kids, you gotta use rm -rf --no-preserve-root /* now a days!

    • @Barbarian
      link
      48
      edit-2
      1 month ago

      rm -rf /* will work just fine (assuming sudo permissions ofc)

      You need the additional flag for rm -rf --no-preserve-root /

      • @[email protected]
        link
        fedilink
        451 month ago

        Too many people got trolled into “removing the French language pack” on Linux systems that there’s now a check to see if someone is deleting every file off their computer (including the os system files). --no-preserve-root is the option you need to include to actually delete all the files off your system.

        • @Jumuta
          link
          51 month ago

          weird how it doesn’t warn you for rm -rf /* though

      • wander1236
        link
        291 month ago

        Contrary to the memes, Linux does actually sometimes try to stop you from shooting yourself in the foot

      • @CCF_100
        link
        English
        141 month ago

        Overrides the protection in place that prevents you from deleting the root of your filesystem.

  • Onno (VK6FLAB)
    link
    fedilink
    821 month ago

    One of my colleagues managed to accidentally run something like rm -rf /var/tmp/ * on a Solaris machine that was the mail server for the entire organisation.

    After the command finished they realised that the inadvertent space in front of the asterisk meant that the command did slightly more damage than intended.

    They were told to leave the machine running to be able to fix it from a backup, but they rebooted instead.

    An open file is still usable even after it’s been deleted, so the kernel and shell were still up and running … before the reboot …

    If I recall, it took weeks to fix, involving floppy disks, Sun engineers and much egg on face.

    • Kairos
      link
      fedilink
      29
      edit-2
      1 month ago

      The rm command REALLY needs to have the -f flag changed edit: to mean “ignore write protection” not “go turbo fuckery mode”

      • Onno (VK6FLAB)
        link
        fedilink
        241 month ago

        Yeah, except for root that is exactly how it works.

        As root you are permitted to shoot your own foot and are expected to know how to aim.

        • Kairos
          link
          fedilink
          31 month ago

          Actually its the same as it overrides confirmation settings…