Foremost is a Linux tool for conducting forensic examinations. Although intended for law enforcement, it may be useful to other community members. Foremost reads through a file, such as a dd image file or a disk partition, and extracts the file.
Source code and additional information may be found here: https://sourceforge.net/projects/foremost/