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

I accidentally deleted my files with "find -delete". Is there anyway I could recover those files?

share|improve this question

migrated from Jan 18 '12 at 6:23

This question came from our site for professional and enthusiast programmers.

I dont think so – Balaswamy vaddeman Jan 18 '12 at 6:03
What filesystem? – Paulo Scardine Jan 18 '12 at 6:04
deletion is forever. this is why its best to test first , act on a copy and keep backups. – Dan D. Jan 18 '12 at 6:06
In theory no. In practice maybe. You might have some success with recovery tools depending on the file system in use -- do you know what it is? If not run mount to see it. However this action is not intended to be recoverable. At least it was a learning lesson. – Edd Steel Jan 18 '12 at 6:07
file system is ext4 – Tom Lin Jan 18 '12 at 6:08

Here's a tutorial claiming around 70% success with ext4. The tutorial works on an encrypted /home which you may or may not have.

Key is to stop using the filesystem ASAP (i.e. stop using your computer soon), and run the recovery from a live CD. If you have the regular ubuntu installation CD you should be OK. It will be a rather lengthy process.

share|improve this answer

You should have had a backup, and then you could use it. Very probably, your files are lost for ever.

If you really want to undelete some of them, be prepared to spend hours or days, perhaps weeks. Read documentation about ext4 file system tools. Read (tomorrow) the ext3 wikipedia page

Copy the raw disk partition before working on it. Don't work on the original file system partition, but on a bit copy.

You could try extundelete, but don't hope too much.

Of course, all these are command-line tools.

Next time, back up your files. If your files are source code, use a version control system.

share|improve this answer

Chances are you're probably boned. You might have good luck with extundelete, but possibly the best way to keep this from happening again is to give yourself a rudimentary equivalent to a recycle bin; you might be interested in this:

share|improve this answer

You must log in to answer this question.

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