Possible Duplicate:
Recovering deleted files on fedora
undelete files from local fileserver

I accidentally did rm * in a directory instead of another directory from console in a Ubuntu11 machine.is there any way to recover these files.

marked as duplicate by Gilles, Michael Mrozek Sep 22 '11 at 3:08

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Step 1: Shut down your computer now (i.e. stop using the filesystem that contains the deleted files).

Step 2: Download a Live CD image on another computer (System Rescue CD would be a fine choice), burn it on a CD-R, boot your computer with it and use the available data recovery tools (e.g. photorec). If your data is really valuable to you, consider cloning the disk before attempting any data recovery (you don't want to make things worse, do you?). You can use partimage for that (included in System Rescue CD).

Step 3: Don't make the same mistake twice: Start backing-up your data regularly.


Unfortunately not very easily. To restore those files, you'll need a file recovery program like photorec or foremost.

Not the answer you're looking for? Browse other questions tagged or ask your own question.