1RECOVERJPEG(1)                                                  RECOVERJPEG(1)
2
3
4

NAME

6       recoverjpeg - recover jpeg pictures from a filesystem image
7

SYNOPSIS

9       recoverjpeg [options] device
10

DESCRIPTION

12       Recoverjpeg  tries  to  identify jpeg pictures from a filesystem image.
13       To achieve this goal, it scans the filesystem image  and  looks  for  a
14       jpeg structure at blocks starting at 512 bytes boundaries.
15
16       Salvaged  jpeg  pictures  are  stored  by  default  under  the name im‐
17       ageXXXXX.jpg where XXXXX is a five digit number starting at  zero.   If
18       there  are more than 100,000 recovered pictures, recoverjpeg will start
19       using six figures numbers and more as soon as needed, but  the  100,000
20       first ones will use a five figures number.  Options -f and -i can over‐
21       ride this behaviour.
22
23       recoverjpeg stores the recovered pictures into the  current  directory.
24       If  you  want  it to store them elsewhere, just go to the directory you
25       want recoverjpeg to save the images into (using the cd command  at  the
26       shell prompt) and start recoverjpeg from there, or use the -o option.
27
28       Note  that device is not necessarily a physical device.  It may also be
29       a file containing a copy of the faulty device in order  to  reduce  the
30       actual  processing  time and the stress imposed to an already defective
31       hardware.  dd(1) or ddrescue(1) may be used to create  such  a  working
32       copy.
33

OPTIONS

35       -h     Display an help message.
36
37       -b blocksize
38              Set  the size of blocks in bytes.  On most file systems, setting
39              it to 512 (the default) will work fine as any large file will be
40              stored  on  512  bytes boundaries.  Setting it to 1 maximize the
41              chances of finding very small files if  the  filesystems  aggre‐
42              gates  them  (UFS  for  example) at the expense of a much longer
43              running time.
44
45       -d formatstring
46              Set the directory format string (printf-style, default: use  the
47              current directory).  When used, 0 will be used for the 100 first
48              images, 1 for the 100 next images, and so on.  The goal of  this
49              option is to circumvent the directory size limit imposed by some
50              file systems.
51
52       -f formatstring
53              Set the file name format  string  (printf-style,  default:  "im‐
54              age%05d.jpg").   It  is  used with the image index as an integer
55              argument.
56
57       -i integerindex
58              Set the initial index value for image numbering (default: 0).
59
60       -m maxsize
61              Maximum size of extract jpeg files.  If a file would  be  larger
62              than that, it is discarded.  The default is 6 MiB.
63
64       -o directory
65              Change  the  working directory before restoring files.  Use this
66              option to restore files into a directory with enough  space  in‐
67              stead of the current directory.  This option can be repeated.
68
69       -q     Be quiet and do not display anything.
70
71       -r readsize
72              Set  the readsize in bytes.  By default, this is 128 MiB.  Using
73              a large readsize reduces the number of system calls but consumes
74              more  memory.  The readsize will automatically be adjusted to be
75              a multiple of the system page size.  It must be greater than the
76              maxsize parameter.
77
78       -s cutoffsize
79              Set  the  cutoff size in bytes.  Files smaller than that will be
80              ignored.
81
82       -S skipsize
83              Set the number of bytes to skip at the beginning of the filesys‐
84              tem  image.   This can be used to resume an interrupted session,
85              in conjunction with -i.  The number of bytes may be rounded down
86              to  be a multiple of a memory page size in order to improve per‐
87              formances.
88
89       -v     Be verbose and describes the process of jpeg identification.  By
90              default,  if  this  flag  is  not used, recoverjpeg will print a
91              progress bar showing how much it has analyzed  already  and  how
92              many jpeg pictures have been recovered.
93
94       -V     Display program version and exit.
95
96       All  the  sizes  may  be suffixed by a k, m, g, or t letter to indicate
97       KiB, MiB, GiB, or TiB.  For example, 6m correspond to  6  MiB  (6291456
98       bytes).
99

EXAMPLES

101       Recover  as  many  pictures as possible from the memory card located in
102       /dev/sdc:
103
104              recoverjpeg /dev/sdc
105
106       Do the same thing but ignore files smaller than one megabyte:
107
108              recoverjpeg -s 1m /dev/sdc
109
110       Recover as many pictures as possible from a crashed ReiserFS file  sys‐
111       tem  (which does not necessarily store pictures at block boundaries) in
112       /dev/sdb1:
113
114              recoverjpeg -b 1 /dev/sdb1
115
116       Do the same thing in a memory constrained  environment  where  no  more
117       than 16MB of RAM can be used for the operation:
118
119              recoverjpeg -b 1 -r 16m /dev/sdb1
120
122       Copyright (c) 2004-2016 Samuel Tardieu <sam@rfc1149.net>.  This is free
123       software; see the source for copying conditions.  There is NO warranty;
124       not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
125
126       If recoverjpeg saves your day and you liked it, you are welcome to send
127       me the best rescued ones by email (please send only 800x600 versions of
128       the  pictures) and authorize me to put them online (indicate which con‐
129       tact information you want me to use for credits).
130

SEE ALSO

132       recovermov(1) sort-pictures(1) remove-duplicates(1)
133

KNOWN BUGS

135       Recoverjpeg does not include a complete jpeg parser.  You may  need  to
136       use sort-pictures afterwards to identify bogus pictures.  Some pictures
137       may be corrupted but have a correct structure; in this case, the  image
138       may  be  garbled.   There  is no automated way to detect those pictures
139       with a 100% success rate.
140

AUTHORS

142       Samuel Tardieu <sam@rfc1149.net>.
143
144
145
146Recoverjpeg User Manuals       November 12, 2016                RECOVERJPEG(1)
Impressum