• yetAnotherUser@discuss.tchncs.de
    link
    fedilink
    arrow-up
    17
    ·
    2 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