Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Table saws should never be used on flesh. rm(1) should always be used on files. How in FSM's noodly universe is the command supposed to intuit which files it should safely delete versus those it shouldn't?

> ...or administrative action.

You mean like, "sudo rm -rf {$undefined_value}/{$other_undefined_value}"? D'oh!



Two different people here have already figured out this wouldn't have happened in OpenVMS due to versioned filesystem w/ rollback. People also claim saner commands for this stuff but I can't recall if remove was smarter.

Anyway, pertaining to RM, here you go:

https://launchpad.net/safe-rm


Make `--one-file-system` the default!


He really should not have made the first element of the path variable. Doing an "rm -rf /folder/{$undefined_value}/{$other_undefined_value}" would have made his day much better.

Also, never having all backup disk volumes mounted at the same time is good practice.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: