Build:
go build find-dups.go
Usage:
./find-dups --dir directory1 [--dir directory [--dir ...]]
Notice:
- Output of the program are the list of duplicate files grouped by --dir params.
- Duplicate files under the same --dir params would be shown the first one.
- Directories would be checked:
- if valid (existing.)
- if duplicated, appointed multiple times by --dir,
- a/b/c/.. and a/b would be recognized as same,
- links would be checked.
To speedup the finding, the program traverse the directories to find all same-size files. Only the same-size files would be compared with md5sum.