News for hackers. Stuff that matters.
Re:Man accidentally 'deletes his entire company' with one li... by megacity on Thursday April 14, 2016 @02:58PM (#11499439)
Is there ever a situation where someone would want to rm -rf / ?
Re:Man accidentally 'deletes his entire company' with one li... by dpv on Friday April 15, 2016 @05:02AM (#11503045)
Well, 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.

Re:Man accidentally 'deletes his entire company' with one li... by __david__ on Thursday April 14, 2016 @04:10PM (#11499957)
Nope (almost never), which is why GNU rm requires the '--no-preserve-root' flag if you actually want to do that for some reason.
Re:Man accidentally 'deletes his entire company' with one li... by timseal on Thursday April 14, 2016 @04:36PM (#11500137)
In 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?
Re:Man accidentally 'deletes his entire company' with one li... by cyphar on Friday April 15, 2016 @03:10AM (#11502715)
No, the default is to do nothing. The (default) refers to "treat root specially" not the flag.
Re:Man accidentally 'deletes his entire company' with one li... by megacity on Thursday April 14, 2016 @04:34PM (#11500119)
What are the almost never situations?

I'd be super interested, because I cannot think of one at all :D

Re:Man accidentally 'deletes his entire company' with one li... by randyrand on Thursday April 14, 2016 @06:52PM (#11500902)
Cops / assailant about to bust down your door and its all you know / have time for?