News for hackers. Stuff that matters.
Re:Suicide Linux (2011) by rwos on Saturday April 18, 2015 @05:54PM (#9401218)
GNU rm has exactly that built-in:

    $ rm -rf /
    rm: it is dangerous to operate recursively on ‘/’
    rm: use --no-preserve-root to override this failsafe
Re:Suicide Linux (2011) by tombrossman on Saturday April 18, 2015 @06:34PM (#9401352)
Go on, fire up a cheap VPS somewhere like DigitalOcean and run "rm -rf / --no-preserve-root". Maybe I am too easily amused but as a long-time Linux user on the desktop this is one of those things I always wanted to try. After it runs, you can't even shut down or run anything else, you just kill the SSH session.
Re:Suicide Linux (2011) by amelius on Saturday April 18, 2015 @06:03PM (#9401246)
The problem with this kind of safety nets is that it may break scripts that rely on this to work.
Re:Suicide Linux (2011) by erydo on Saturday April 18, 2015 @06:13PM (#9401282)
How many daily-use scripts do you suppose intentionally run `rm -rf /`? Cost-benefit for common use seams clearly in favour of adding a failsafe.
Re:Suicide Linux (2011) by Lambdanaut on Saturday April 18, 2015 @06:14PM (#9401286)
It's a good thing you can fix the script by adding that flag into them.