Recoverjpeg tries to identify jpeg pictures from a filesystem image. To achieve this goal, it scans the filesystem image and looks for a jpeg structure at blocks starting at 512 bytes boundaries.
Salvaged jpeg pictures are stored by default under the name imageXXXXX.jpg where XXXXX is a five digit number starting at zero. If there are more than 100,000 recovered pictures, recoverjpeg will start using six figures numbers and more as soon as needed, but the 100,000 first ones will use a five figures number. Options -f and -i can over‐ride this behavior.
Open the terminal and type following command to install recoverjpeg: sudo apt-get install recoverjpeg
Open up the terminal and move to direcotory where you want to store the recovered jpef file and give the following command: sudo recoverjpeg /dev/sda1
Check recoverjpeg man pages to know more options using command: man recoverjpeg
Recoverjpeg does not include a complete jpeg parser. You may need to use sort-pictures afterwards to identify bogus pictures. Some pictures may be corrupted but have a correct structure; in this case, the image may be garbled. There is no automated way to detect those pictures with a 100% success rate.