Frequently I come across queries on how to retrieve files in Linux wherein the most probably answer will be that it is almost impossible due to the journaling nature of the standard file systems for most Linux systems. Ext2 is not a journaled file system but its use for large partitions (>128MB) is not recommended since a premature crash (system-induced or external like a power shut-off) will cause the file system to be marked as dirty and be subjected to a file system check and possible data loss. At this time where terabytes of disk space are becoming available to us members of the unwashed masses, I don’t think anybody in a right mindset will even consider using ext2 on a 20GB partition.

Back to the topic, previously you are screwed if you were clicker/presser happy with delete operations (rm -rf ~ /tmp comes into mind, ouch!) then it only takes a split second from the time you confirmed the delete operation to switch between nonchalance and an agitated mental anguish. It may be a single document or your whole directory (I hope you are not in the habit of running as root for day-to-day use), but if you really need to get that file you just delete and you are using ext2/ext3 then there might still be some hope. I just came across the page for ext3undel which promises a set of utilities and scripts that will help you in getting your precious files back. The project is not available on official Mandriva and Arch repositories :( but the project provides RPM and Deb downloads.

I haven’t used it yet as I am fortunate enough to haven’t gotten the need but the documentation on the project’s wiki seems to be simple enough. I am going to try installing this on my systems this weekend since this would be a handy tool to have when my stupidity arises need beckons.