Hack and / - When Disaster Strikes: Attack of the rm Command

Can the rm -rf / command ever be tamed? Learn how to pick up the pieces when rm runs rampant on your filesystem.

Kyle Rankin is a director of engineering operations in the San Francisco Bay Area, the author of a number of books including DevOps Troubleshooting and The Official Ubuntu Server Book, and is a columnist for Linux Journal.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Great article... I used photorec to recover files

Shannon VanWagner's picture

Great article, Thanks!

I had a user that deleted some files because he used 'rm -rf stuff *.' instead of 'rm -rf stuff/*'.

So the solution I used to get back his files was the program call photorec from http://www.cgsecurity.org/wiki/PhotoRec

The recovery took a long time and the recovered file names were randomized but we were able to get back the most important files.

Shannon VanWagner
humans enabled