RECOVERJPEG(1) | RECOVERJPEG(1) |
recoverjpeg - recover jpeg pictures from a filesystem image
recoverjpeg [options] device
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 override this behaviour.
recoverjpeg stores the recovered pictures into the current directory. If you want it to store them elsewhere, just go to the directory you want recoverjpeg to save the images into (using the cd command at the shell prompt) and start recoverjpeg from there, or use the -o option.
Note that device is not necessarily a physical device. It may also be a file containing a copy of the faulty device in order to reduce the actual processing time and the stress imposed to an already defective hardware. dd(1) or ddrescue(1) may be used to create such a working copy.
All the sizes may be suffixed by a k, m, g, or t letter to indicate KiB, MiB, GiB, or TiB. For example, 6m correspond to 6 MiB (6291456 bytes).
Recover as many pictures as possible from the memory card located in /dev/sdc:
recoverjpeg /dev/sdc
Do the same thing but ignore files smaller than one megabyte:
recoverjpeg -s 1m /dev/sdc
Recover as many pictures as possible from a crashed ReiserFS file system (which does not necessarily store pictures at block boundaries) in /dev/sdb1:
recoverjpeg -b 1 /dev/sdb1
Do the same thing in a memory constrained environment where no more than 16MB of RAM can be used for the operation:
recoverjpeg -b 1 -r 16m /dev/sdb1
Copyright (c) 2004-2016 Samuel Tardieu <sam@rfc1149.net>. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If recoverjpeg saves your day and you liked it, you are welcome to send me the best rescued ones by email (please send only 800x600 versions of the pictures) and authorize me to put them online (indicate which contact information you want me to use for credits).
recovermov(1) sort-pictures(1) remove-duplicates(1)
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.
Samuel Tardieu <sam@rfc1149.net>.
November 12, 2016 | Recoverjpeg User Manuals |