Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
How to recover a removed file under linux

I have run the rm -rf * command mistakenly at the [user]@localhost location. Because of that I lost all the files in my user account. Please tell me if there a way to recover those deleted files.

share|improve this question
    
In order for any tool to have success you need to boot to another hdd and from this point on only have read access to the hdd with the data you want to recover. If you don't have access to this capability then you are pretty much out of luck. –  Ramhound Aug 27 '12 at 11:08
1  
add comment

marked as duplicate by techie007, Indrek, grawity, Tog, slhck Aug 27 '12 at 14:51

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.

2 Answers

Just copy everything from the last backup. Do you make backups, right?

share|improve this answer
1  
Any data not worth backing up is not worth recovering. –  David Schwartz Aug 27 '12 at 12:28
add comment

I don't have enough rep to comment, but this is quite urgent: To expand on what Ramhound said, if you seriously need to have this data recovered, you need to unmount the filesystem immediately, before any of the data is overwritten by subsequent writes. You must not remount the file system read/write (you can mount it read-only). If in doubt about how to do this, shut down the machine and do not reboot it.

Recovering the data out of a unix filesystem is tricky - your best bet is to find a data recovery company in your area. I'm guessing this won't be cheap though.

share|improve this answer
    
...even better, shut down by pulling the plug. –  grawity Aug 27 '12 at 13:50
    
@grawity. Pulling the plug, while preventing the cache from writing to the disk could exacerbate his problem by corrupting it. –  Tog Aug 27 '12 at 14:05
1  
Hurrah, comment rep. Yeah I did think about suggesting pulling the plug, but like Tog says, there are risks there too. If it's a journalled FS, and he happens to mount it r/w later, the journal replay may also overwrite data; as well as the remote possibility of a head crash (although I don't know if that's a problem with modern non-SSD drives). –  Faelkle Aug 28 '12 at 11:41
add comment

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