dupehasher
Shell script for managing duplicate image files in a directory.
...Depending upon the arguments supplied by the user upon invoking dupeshasher, it will also delete all duplicates, keeping either the oldest or newest of all sets of duplicates. Additionally it can batch-rename all remaining (post-deletion) files in a chronologically-sequential manner; or according to the md5sum or sha256 sum of every file.
File extensions (.jpg for example) are preserved, and there is a user option to ensure that the extension is correct (for example, a .jpg file is indeed a jpeg and not, for example, a png).
...