3 ms·
No. That is a fault of rm that it makes it so easy to do something that in 9.99999% of the cases isn’t what the user wants to do. In fact, recognizing that is
by thawaya3113 5y ago
No. That is a fault of rm that it makes it so easy to do something that in 9.99999% of the cases isn’t what the user wants to do.
In fact, recognizing that is precisely why you can’t even do that easily anymore. Setting aside that you probably need to sudo the function, rm prevents you from running the command unless you pass an additional long flag that basically say you really really want to do this.
Programs which expect perfect user input, and allow minor user mistakes to lead to major negative outcomes are faulty programs.
- clhodapp 5y agoAdding a hardcoded extra check for / to rm feels like theater because it barely makes it more safe. It's nearly as damaging to most Linux systems to remove /bin or /usr or any number of other directories. If you wanted to actually solve this problem, it seems like you would need to add some kind of "dangerous-to-remove-this" metadata in the filesystem. Nonetheless, even with rm you can override the check you mentioned with a flag. In principle, that seems to support the post you are referring to, not refute it (not in detail but in spirit).