Quick and dirty de-duplication Perl script

Hacked out this relatively simple Perl script; took the backup of photos and videos from my old iPhone X from 104GB across 41,188 files, to 82G and 25,279 files. One of these days I have to build my “dedupe’d” filesystem. But today is not that day. This script is a little braindead but it worked for this purpose, where I had multiple files that looked like this:

bfea8af574bedb735a089ce423eba8af: 3 files

Removing: ./IMG_8963 1.JPG

Removing: ./IMG_9868 1.JPG

Keeping: ./IMG_9868.JPG

144d98e4b6b79e8ed3ed8baa70cca014: 2 files

Keeping: ./IMG_6323 1.JPG

Removing: ./IMG_6323 5.JPG



Comments