5 ms·
Is there ever a situation where someone would want to rm -rf / ?
by megacity 11y ago
Is there ever a situation where someone would want to rm -rf / ?
- __david__ 11y agoNope (almost never), which is why GNU rm requires the '--no-preserve-root' flag if you actually want to do that for some reason.
- megacity 11y agoWhat are the almost never situations? I'd be super interested, because I cannot think of one at all :D
- randyrand 11y agoCops / assailant about to bust down your door and its all you know / have time for?
- timseal 11y agoIn the manpage for rm, I see "--no-preserve-root do not treat ‘/’ specially (the default)". For real? The default is to do the worst thing?
- cyphar 11y agoNo, the default is to do nothing. The (default) refers to "treat root specially" not the flag.
- dpv 11y agoWell, it is certainly fun. I never bothered to count exact numbers, but from my experience, close to two thirds of all people, when presented with root shell and no consequences, will run rm -rf in some way. Humble ones issue "rm -rf /usr" or "rm -rf /lib", others go straight to "/bin/rm -rf /". I've seen one person do "rm -rf /* ", immediately followed by "find / -delete". I'd really like to take a peek on his/her thought process at that moment, looked like the desire of destruction was really strong in that one particular brain ;-) So yeah, while its not particularly useful one, there's indeed a situation where one definitely want to run it. disclaimer: I run SELinux playbox with free root access and session recording, and peeking into what others do is also fun. Edit: rm minus rf slash asterisk formatting.