adrianlopezroche / fdupes

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

Option --order in 1.51 #37

Closed gerritgriebel closed 8 years ago

gerritgriebel commented 8 years ago

My intent was to keep the first file in alphabetic order of any duplicates. So I installed fdupes using macports and got

$ /opt/local/bin/fdupes --version
fdupes 1.51

I found no option for sorting, neither in man page nor in --help output. So I checked back here and found an --order option in source code. So I downloaded sources, build and used "--order name" option successfully.

Two issues:

adrianlopezroche commented 8 years ago

Thanks.

On Mon, Nov 23, 2015, 8:25 AM gerritgriebel notifications@github.com wrote:

My intent was to keep the first file in alphabetic order of any duplicates. So I installed fdupes using macports and got

$ /opt/local/bin/fdupes --version fdupes 1.51

I found no option for sorting, neither in man page nor in --help output. So I checked back here and found an --order option in source code. So I downloaded sources, build and used "--order name" option successfully.

Two issues:

— Reply to this email directly or view it on GitHub https://github.com/adrianlopezroche/fdupes/issues/37.

adrianlopezroche commented 8 years ago

Are you sure sorting doesn't work like it's supposed to? A quick glance at registerpair shows it sorts the whole dupe chain by inserting each new match at the proper spot along the linked list.

On Mon, Nov 23, 2015, 9:10 PM Jody Bruchon notifications@github.com wrote:

The sorting algorithm doesn't work right anyway; the sort is performed on matched pairs when the pairs arrive, but it should be performed on full chains of pairs once all duplicate finding work is finished. As it stands now, if pairs (1,5) (1,2) (2,3) (3,4) arrive, the pairs themselves will be ordered properly but the combined set (1,2,3,4,5) will have errors based on when each pair hits the sorting algorithm and could become (1,5,2,3,4) in the effective final ordering, even though each individual pair is technically properly sorted.

— Reply to this email directly or view it on GitHub https://github.com/adrianlopezroche/fdupes/issues/37#issuecomment-159119273 .

adrianlopezroche commented 8 years ago
Joshfindit commented 8 years ago

Same problem here: brew install fdupes got fdupes 1.5.1, but it did not support --order:

fdupes: unrecognized option `--order=name'
Try `fdupes --help' for more information.

So, cloned the repo and did make successfully.

The more pressing issue is something not actually stated in this issue, but more alluded to: Order doesn't work.

No matter what flags I run: fdupes --order=name --reverse --delete ./ or fdupes --order=name --delete ./or fdupes -r --order='time' --reverse ./ or fdupes -r --order='time' --reverse ./ the order is always the same.