adrianlopezroche / fdupes

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

Order by filesize for use with -dN flags #149

Closed pluja closed 3 years ago

pluja commented 3 years ago

When deleting files with the norpompt option, one could be losing the 'better quality files'. From noprompt definition:

together with --delete, preserve the first file in each set of duplicates and delete the rest without prompting the user

And from orderby:

select sort order for output and deleting; by file modification time (BY='time'; default), status change time (BY='ctime'), or filename (BY='name')

One could use the orderby option to order by filesize so fdupes always preserves the biggest file (the one with more quality).

jbruchon commented 3 years ago

Only files of identical size can be duplicates. The program isn't content-aware. All files in a group are sorted by size already because all files in each duplicate group are the exact same size. In fact, one of the biggest speed boosts in the software is a size comparison before reading any actual files.

pluja commented 3 years ago

Okay! Nice!