Hacker News new | past | comments | ask | show | jobs | submit login

Standard rm (coreutils) has included rootfs protections since at least 2012:

    --no-preserve-root
        do not treat '/' specially
    --preserve-root
        do not remove '/' (default)
https://manpages.debian.org/stretch/coreutils/rm.1.en.html

Mind that if your rm comes from elsewhere (say, Busybox), it may not have that protection.

Very careful use of rm as root is an excellent habit to cultivate.

As are backups.




What about it? I don't think that does anything for "/*"


Interesting, I didn't know that and I stand corrected.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: