Recover data and deleted files using testdisk and PhotoRec

You can use testdisk and Photorec from to recover missing files from your SD Cards. There are other tools at too.

You can also install it from your distribution’s repository. It is a part of some digital forensics tools.

In Ubuntu 14.04 open up the Software Manager and look for photorec. When retrieving from a damaged USB device, files are recovered with arbitrary file names, though their extensions may be intact.