fdupes
fdupes copied to clipboard
Search dupes for a specific file type/extension
Is there any way to search for duplicates only in a subset of files, matching for example a given extension? Thanks
I would probably create a temporary folder and use find
to filter the original files and generate hard links in the temp folder.
Something like this, (quick and untested),
cd ~/tmp_folder
find ~/source_folder '*.jpg' -exec ln {} . \;
Test it first in a small set of files.
a quicker, one line, solution to this is:
fdupes -r . | grep -e '.js$' -e '^$' | uniq
Essentially, this removes any lines from the output of fdupes
that either have the extension in question or are blank, then uses uniq
to consolidate the blank lines.
Thank you rubenvarela and thavelick ... I will surely give your hints a try (haven't dealt with this any more, actually)
voting also for this option. include (or exclude) extensions to compare.