Find missing files but with same file name

rikona rikona at sonic.net
Sat May 21 21:58:53 UTC 2016


Thursday, May 19, 2016, 6:47:45 AM, Ralf wrote:

> You could use exiftools and search for something special in the
> pictures meta data.

That's a good idea. I've been checking this data, and the oldest
photos don't seem to have a lot of information, but do have the date.
This is important because the oldest cameras did not use the year as
part of the filename, and thus ended up with the same filename for the
same date. This is particularly bad for December 25 when quite a few
pictures were typically taken. In snooping, I may have lost quite a
few such pictures.

> You might remember geotagging or cameras that you used.
> To find duplicated file names you could use fslint.

I do use that pgm...

> sudo apt-get update && sudo apt-get install fslint libimage-exiftool-perl

> $ /usr/share/fslint/fslint/findsn ~/Desktop/
> -rw-r--r-- 1 rocketmouse rocketmouse 5 May 19 15:26 1/1
> -rw-r--r-- 1 rocketmouse rocketmouse 5 May 19 15:27 2/1
> -rw-r--r-- 1 rocketmouse rocketmouse 0 May 19 14:56 1/pattern_structure-1.jpg
> -rw-r--r-- 1 rocketmouse rocketmouse 5 May 19 15:36 2/pattern_structure-1.jpg
> -rw-r--r-- 1 rocketmouse rocketmouse 0 May 19 15:42 pattern_structure-1.jpg

> Use exiftools to compare the content of files.

> $ exiftool ~/Desktop/pattern_structure-1.jpg | grep "Lens Model"

> $ exiftool pattern_structure-1.jpg | grep "Lens Model"
> Lens Model                      : iPad 2 back camera 2.03mm f/2.4

> $ exiftool ~/Desktop/pattern_structure-1.jpg
> ExifTool Version Number         : 10.15
> File Name                       : pattern_structure-1.jpg
> Directory                       : /home/rocketmouse/Desktop
> File Size                       : 0 bytes
> File Modification Date/Time     : 2016:05:19 14:56:49+02:00
> File Access Date/Time           : 2016:05:19 14:56:49+02:00
> File Inode Change Date/Time     : 2016:05:19 14:56:49+02:00
> File Permissions                : rw-r--r--
> Error                           : File format error

> $ exiftool pattern_structure-1.jpg
> ExifTool Version Number         : 10.15
> File Name                       : pattern_structure-1.jpg
> Directory                       : .
> File Size                       : 124 kB
> File Modification Date/Time     : 2015:04:29 21:48:43+02:00
> File Access Date/Time           : 2016:05:06 19:35:22+02:00
> File Inode Change Date/Time     : 2016:04:06 15:30:38+02:00
> File Permissions                : rw-r--r--
> File Type                       : JPEG
> File Type Extension             : jpg
> MIME Type                       : image/jpeg
> Exif Byte Order                 : Little-endian (Intel, II)
> Make                            : Apple
> Camera Model Name               : iPad 2
> X Resolution                    : 72
> Y Resolution                    : 72
> Resolution Unit                 : inches
> Software                        : 8.3
> Modify Date                     : 2015:04:29 14:35:07
> Y Cb Cr Positioning             : Centered
> Exposure Time                   : 1/5348
> F Number                        : 2.4
> Exposure Program                : Program AE
> ISO                             : 40
> Exif Version                    : 0221
> Date/Time Original              : 2015:04:29 14:35:07
> Create Date                     : 2015:04:29 14:35:07
> Components Configuration        : Y, Cb, Cr, -
> Shutter Speed Value             : 1/5348
> Aperture Value                  : 2.4
> Brightness Value                : 11.70565553
> Exposure Compensation           : 0
> Metering Mode                   : Multi-segment
> Flash                           : No flash function
> Focal Length                    : 2.0 mm
> Run Time Scale                  : 1000000000
> Run Time Value                  : 56489914011125
> Run Time Epoch                  : 0
> Run Time Flags                  : Valid
> Sub Sec Time Original           : 298
> Sub Sec Time Digitized          : 298
> Flashpix Version                : 0100
> Color Space                     : sRGB
> Exif Image Width                : 720
> Exif Image Height               : 960
> Sensing Method                  : One-chip color area
> Scene Type                      : Directly photographed
> Exposure Mode                   : Auto
> White Balance                   : Auto
> Focal Length In 35mm Format     : 44 mm
> Scene Capture Type              : Standard
> Lens Info                       : 2.03mm f/2.4
> Lens Make                       : Apple
> Lens Model                      : iPad 2 back camera 2.03mm f/2.4
> Compression                     : JPEG (old-style)
> Thumbnail Offset                : 1054
> Thumbnail Length                : 4327
> Image Width                     : 720
> Image Height                    : 960
> Encoding Process                : Baseline DCT, Huffman coding
> Bits Per Sample                 : 8
> Color Components                : 3
> Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
> Aperture                        : 2.4
> Image Size                      : 720x960
> Megapixels                      : 0.691
> Run Time Since Power Up         : 15:41:29
> Scale Factor To 35 mm Equivalent: 21.7
> Shutter Speed                   : 1/5348
> Create Date                     : 2015:04:29 14:35:07.298
> Date/Time Original              : 2015:04:29 14:35:07.298
> Thumbnail Image                 : (Binary data 4327 bytes, use -b option to extract)
> Circle Of Confusion             : 0.001 mm
> Field Of View                   : 44.5 deg
> Focal Length                    : 2.0 mm (35 mm equivalent: 44.0 mm)
> Hyperfocal Distance             : 1.24 m
> Light Value                     : 16.2

> On Wed, 18 May 2016 23:48:53 -1000, Joel Roth wrote
>>For this type of job, I would typically write a perl script,
>>[snip]
>>pc050049.jpg:
>> - /home/rikona/photos/2012-5-16
>>   size: 25683934
>>   md5: adfec80203fedcab
>> - /mnt/backup1/dvd12/photos/2003-4-8
>>   size: 18403456
>>   md5: 8938475deadbeef8383894
>>[snip]

> Why not simply using diff for this task?

> $ diff pattern_structure-1.jpg ~/Desktop/1/pattern_structure-1.jpg
> Binary files pattern_structure-1.jpg
> and /home/rocketmouse/Desktop/1/pattern_structure-1.jpg differ

Including the many archives, I have a VERY large number of photos. It
looks like I would have to use diff in a script, and transfer the
results, if they're different, to some kind of a data file.

Thanks much for the reply and help!

-- 

 rikona        





More information about the ubuntu-users mailing list