Re: Undelete files on ext3 ??

John Bradford
2003-01-07T08:50:37Z

> Is there any way to revert the stupid mistyping of "rm file *" on ext3??

There is no simple way, no.

> I hope there is a way, because I dont have a backup of some files i
> mistakenly deleted

The only thing I can suggest is this:

* Do not write anything else to the partition, and immediately
re-mount it read-only.

E.G.:

mount -oremount -oro /dev/hda3

* Use dd to copy the entire contents of the partition to a file on
another partition.

E.G.:

dd if=/dev/hda3 of=/partition_image

* Search through that file for the fragments of your lost files.

E.G.:

grep "Some text that you are looking for" /partition_image

If it is a text file that you've lost, it's possible that you might be
able to recover some of it quite easily, using grep to search for the
fragments. If it's anything else, you'll probably not be able to
recover it, unless you have the details of the file format.

John.