35.15 Duplicate Photos
20200411 As presented in Section @ref(duplicate_files), duplicate files (photos in our case) can readily be found. Duplicates are easy to create when we are copying photos around on our storage and attempting to manage large collections of photos with different file naming schemes.
$ fdupes . ./20180323_122434_02.jpg ./20180323_122434_01.jpg ./20180323_122434_00.jpg ./20030102_092312_03.jpg ./20031012_092312_00.jpg ./20200531_151245_01.jpg ./20200531_151245_00.jpg
-r option to recurse into
A summary of duplicates is obtained using the
$ fdupes --summarize . 13567 duplicate files (in 6407 sets), occupying 16996.0 megabytes
Deleting duplicates will retain the first listed file and so sometimes
it is useful to use
$ fdupes --order='name' --reverse . ./20180323_122434_00.jpg ./20180323_122434_01.jpg ./20180323_122434_02.jpg ./20031012_092312_00.jpg ./20030102_092312_03.jpg ./20200531_151245_00.jpg ./20200531_151245_01.jpg
The following command will then delete duplicates, keeping the first file in the list:
$ fdupes --delete --noprompt --order='name' --reverse .
Your donation will support ongoing development and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2021 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0.