• I keep wanting to try to get it to run :(){:|: &};:. I didn’t think they’d be stupid enough to execute shell commands outside of a disposable container, so I figured rm -rf / wouldn’t really affect anything. But I thought there’d be a chance the containers might not be configured well enough to prevent a fork bomb from impacting that one server.

  • yetAnotherUser@discuss.tchncs.de
    link
    fedilink
    arrow-up
    16
    ·
    5 days ago

    You don’t need the --no-preserve-root flag for that command.

    /* is a shorthand for [every directory in / separated with a space]. rm doesn’t even get to see the *, it is automatically substituted by your shell prior to rm being started.

    sudo rm -rf /* is therefore exactly the same as:

    sudo rm -rf /bin /boot /dev /etc /home /lib /lib64 /lost+found /mnt /opt /proc /root /run /sbin /srv /swapfile /sys /tmp /usr /var