rm -rf Dangers
Cluster focuses on the risks of accidentally executing destructive 'rm -rf /' or similar commands, which can delete home directories or entire filesystems, with users sharing horror stories, suggesting safer aliases or trash mechanisms, and discussing built-in protections.
Activity Over Time
Top Contributors
Keywords
Sample Comments
Worried about a `sudo rm -rf /` kinda thing?
Heck. Have an rm -rf would probably ruin some peoples day on their home directory.
The problem that it takes a $type="; rm -rf /" to ruin your day.
I bet you've never accidentally rm -rf'ed your home directory or your email archives either.
Defaulting to "rm -rf *" makes me imagine what could possibly go wrong.
agreed. can't wait until I accidentally rm -rf * because I hit an edge case.
Well, that's the last time I'll rm -rf / and not think twice about it.
Sure, but you could also replace "rm -rf /" with "id" or something else non destructive. Somebody is going to copy paste that snippet and have a bad day.
Sorry, was thinking of the awful `rm -rf /` variant...
That's kind of like saying the 'rm' command is not well thought out, because many people wouldn't want to delete the whole file system when running 'rm -r /'.