💀☠️

  • hddsx@lemmy.ca
    link
    fedilink
    arrow-up
    9
    ·
    2 days ago

    Nobody deletes “./“. It’s far far more likely to be “/ tmp/file”

    Also, without the -f it will prompt you. Chances are, the meme is with -f

    The other possibility, though I haven’t tested it, is the working directory is / and they did “rm -rf .” Without first checking with pwd. I know that most OS will refuse to remove root without passing in a special flag nowadays. Only a few OS still respect you as sudo.

    • T156@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 day ago

      Though the check isn’t very sophisticated, if memory serves. It more or less checks whether / is passed to rm -r.

      If you did something like rm -r $VAR/*, but didn’t check to make sure that $VAR was set and not empty, it could still fire, since rm wouldn’t see that root got passed, only a bunch of directories in root.