How freedup works
- scan all directory trees recursively for all regular files
- build a list of those files and keep their name, lstat() and arg position
- sort the files by comparing their sizes using qsort()
- in case the comparison has to report equal file size
additional properties are compared
- most property checks have to be added using command line options
- if all demands are fullfilled, the files are compared block by block (4k)
- if both files are identical and on the same file system they will
be renamed, hard linked, renamed file removed.
- if hardlinking is not possible soft links are tried,
except one of the paths is not starting at root (but can be forced)
- sorting is repeated, the reason why it is needed was not checked yet
- finally a short report is delivered