[kwlug-disc] Successfully recovered a deleted file

Chris Irwin chris at chrisirwin.ca
Fri Jan 16 04:52:38 EST 2015


I made a bit of a mistake. I thought I was doing an `ls *.mdwn`, but I 
actually did `mv *.mdwn`, and effectively deleted a file I had been 
working on for a few hours, but which wasn't old enough to yet be in 
git, a snapshot, or a backup.

I got the file back with `grep`, `vim`, and 100% pure luck.

I wrote up a post of how I did it, and why I didn't do the "right" 
things, like umounting the drive:

     https://chrisirwin.ca/posts/recovering-a-deleted-file-on-btrfs/

Also, I mention btrfs since that was what I'm using, but this would 
likely also apply to other filesystems. I think it was mainly vim's 
behaviour that saved me.

Thought it might be of interest to the list.

-- 
Chris Irwin
e: <chris at chrisirwin.ca>
w: http://chrisirwin.ca






More information about the kwlug-disc mailing list