adrianlopezroche / fdupes

FDUPES is a program for identifying or deleting duplicate files residing within specified directories.
2.42k stars 186 forks source link

feature: option to invert output (show only non-dupes) #165

Open ilf opened 2 years ago

ilf commented 2 years ago

I would love to see an option to invert the output. Instead of showing all files that are dupes, show all files that are not dupes.

I assume most of the logic is already there, and should not be hard to implement.

What do you think?

Thanks, and keep up the good work!

EdwinKM commented 1 year ago

this should not be that difficult to solve with some shell magic. But you hve to create your own filelist also and subtract the items.

The jdupes fork seems to have the feature

[-u --print-unique](https://manpages.debian.org/testing/jdupes/jdupes.1.en.html#u) print only a list of unique (non-duplicate, unmatched) files

ilf commented 1 year ago

@EdwinKM: Thanks for the pointer!

This is their code to achieve this: https://github.com/jbruchon/jdupes/blob/master/act_printmatches.c#L47

This is the commit: https://github.com/jbruchon/jdupes/commit/5f5ef2a03d76c0eba1e12fa08879dbead107bc60

Do you want to add this, @adrianlopezroche?