by jrockway · 15y ago · 0 comments
my $path = something_that_can_return_undef_on_failure;
`rm -rf /$path`;
during the execution of its test suite. The author didn't catch it in testing because he never ran "make test" as root (who would?). But people on the Internet ran "make test" as root, with disastrous consequences.rm: it is dangerous to operate recursively on `/'
rm: use --no-preserve-root to override this failsafe
Brilliant, at long last at least a bit of protection! :) Sadly, I can still remember doing this to my one of my first Linux installs, albeit via the classic:
rm -fr .*
On the plus side, that day I learned one hell of a lot about how Linux works ;)