• 👁️👄👁️
    link
    fedilink
    English
    218 months ago

    I’ve never actually tried this but feel like rm should have a built in warning specifically for that command letting them know they’ve been trolled and have a y/N prompt.

    • @havokdj
      link
      248 months ago

      There kind of is one, but it is overridden by -f

        • Silejonu
          link
          fedilink
          148 months ago

          No you don’t.

          rm -fr / requires the flag, but rm -fr /* does not.

        • @[email protected]
          link
          fedilink
          English
          48 months ago

          I think that is only if you pass /, I don’t think the flag is required for /* which is what is shown here - if I remember right, it’s because the * triggers the shell to expand the paths and that flag is only built to protect / (from say, having an empty variable alongside /).

          • @[email protected]
            link
            fedilink
            English
            28 months ago

            Yes, the * is expanded by the shell so the rm command just sees lots of individual files being passed in

    • @[email protected]
      link
      fedilink
      4
      edit-2
      8 months ago

      Come on, it is super fun. Just install VirtualBox and set up a virtual machine, make sure there is no funky mount point that touches your host machine, and go nuke that VM !

    • @Moshpirit
      link
      08 months ago

      You can create an alias in “.bashrc” just in case.