sudo apt-get install recoverjpeg

sudo recoverjpeg /dev/sda1

man recoverjpeg













Deleted or lost files can usually be recovered from failed or formatted drives and partitions, CD-ROMs and memory cards using the free software available in the Ubuntu repositories. The data is recoverable because the information is not immediately removed from the disk.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:Open up the terminal and move to direcotory where you want to store the recovered jpef file and give the following command:Check recoverjpeg man pages to know more options using command: