Foremost is a console program for recovering file, from an image (like those generated by dd, dc3dd, Encase…) or directly from a drive based on their headers, footers, and internal data structures. A lot of headers and footers (JPG, GIF, PNG, DOC, XLS…) are built-in in the program others be specified by a configuration file.
In this tutorial we will install foremost on OS X, by downloading it from the official repository.
So, first of all, download the sources from the official repository on sourceforge:
$ wget http://foremost.sourceforge.net/pkg/foremost-1.5.7.tar.gz
Untar the file previously downloaded:
$ tar zxvf foremost-1.5.7.tar.gz
Open the directory where you extracted foremost:
$ cd foremost-1.5.7
$ sudo make mac
$ sudo make macinstall
Foremost is installed in:
/usr/local/bin/
Foremost configuration file is in:
/usr/local/etc/foremost.conf