5 ms·
In the UNIX Hater's Handbook, defenders of rm consider accidental deletion a "rite of passage" and remark that "any decent systems administrator should be doing
by bryik 10y ago
In the UNIX Hater's Handbook, defenders of rm consider accidental deletion a "rite of passage" and remark that "any decent systems administrator should be doing regular backups" (see page 62). The author's response is funny:
“A rite of passage”? In no other industry could a manufacturer take such a cavalier attitude toward a faulty product. “But your honor, the exploding gas tank was just a rite of passage.” “Ladies and gentlemen of the jury, we will prove that the damage caused by the failure of the safety catch on our chainsaw was just a rite of passage for its users.” “May it please the court, we will show that getting bilked of their life savings by Mr. Keating was just a rite of passage for those retirees.” Right.
I'm surprised how relevant parts of this book are 22 years later.
http://www.vbcf.ac.at/fileadmin/user_upload/BioComp/training/unix_haters_handbook.pdf http://www.vbcf.ac.at/fileadmin/user_upload/BioComp/training...
- 0xdeadbeefbabe 10y agoThe author stretches his analogies substantially. It's nice to see this was happening 22 years ago just like it is nice to see UNIX from more than 22 years ago still being used today. Edit: i.e. it isn't so nice. Not much progress.
- nickpsecurity 10y agoYeah, I saw the same problem in the NSA backdoor debate where people liken it to brake failures and such. I pointed out repeatedly that computer breaches rarely maim or kill anyone. Usually don't even cost them their jobs or bankrupt their business. Such analogies are strawmen to try to boost their argument with an emotional response.
- erik14th 10y agoIs there an alternative to allow scripted destructive actions without the risk of deleting important stuff? Modern OS's will warn you if you try to delete stuff, but you can still ultimately do it anyway, I don't see it as something particular to UNIX. The only similar problem I had was on windows, 98 I guess, I deleted all my files that weren't readonly by fiddling with a .bat script.
- Avshalom 10y agowell there's some safe guard checks you can do to prevent the easy abuses like require an additional flag for rm -rf-ing everything in the root or /home/*/, or across device boundaries as some one said. You can redesign rm so people don't find themselves typing -rf as force of habit. You can have multiple delete commands: mark as overwriteable if need and remove from 'ls -a', actually delete, overwrite sectors with zeros; like we have in guis. You can have a permission system that isn't just "this account can do literally anything" or "this account can't do anything"
- Avshalom 10y agohere's a dumb idea off the top of my head: /etc/rmblacklist.conf autopopulated (by the distro) with a list of files (/boot and the actual bootimage for instance) that requires a GNU style long option --nuke to delete. It's still easily scriptable but you'd rarely ever actually need it and requiring a long option would serve as a double check that you meant it when you did. Sure it's still possible to --nuke something due to a bug or negligence but I bet it'd cut down on fatal errors. Plus the user could have their own ~/.rmblacklist.conf to guard against particularly persistent dyslexias. You could even erase the contents entirely if you really think being able to delete root on a whim keeps your kung fu strong.
- justinlardinois 10y agoThis isn't a bad idea.
- nickpsecurity 10y agoGood to see you fighting the fight with many sensible ideas. I've been posting this one in most responses as it's pretty simple: https://launchpad.net/safe-rm https://launchpad.net/safe-rm
- Avshalom 10y agoHah! Beat me to the punch by 5 years.
- nickpsecurity 10y agoThat attitude was pervasive in both UNIX and C. That other systems avoided common problems of both with little work or penalty shows it's unnecessary today. Yet, the results of that attitude continue to do damage.