Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

marked as duplicate by Ƭᴇcʜιᴇ007, 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.

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

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

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

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
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

Not the answer you're looking for? Browse other questions tagged .