Yesterday I sat down at my Linux computer to transfer some rather special New Year’s Eve photos from my new camera. I can’t say for sure exactly what happened, but I believe it went down like this:

Instead of hooking camera to computer via USB I removed my SD card from the camera to read directly off of that.

The volume mounted, but my photos didn’t — they had somehow been corrupted.

I put the memory card back into the camera, which couldn’t read it and therefore (I think) proceeded to reformat the card.

I reacted appropriately.

But thankfully all was not lost — in fact nothing ended up being lost at all, thanks to a free GPL app called PhotoRec.

I’m not at all sure how PhotoRec works on OS X or Windows; on Linux it’s a command-line app, available through most package managers as part of a bigger suite called TestDisk. Once installed, launching it is as easy as typing the following command into a terminal window:

sudo photorec

Using PhotoRec is just a matter of navigating through the text prompts. I wasn’t able to recover anything the first time I ran it due to a pebkac issue; paying closer attention to the existing format on my SD card got every single missing photo safely restored to a folder on my desktop hard drive.

If you ask me PhotoRec is a life-saver worth almost any price, but as an added bonus it’s absolutely free to download and use. You can also make a donation to the author if you like; I just did. 😎

Oh, and in case you were interested in what PhotoRec recovered, it’s all been uploaded to Flickr for posterity…