Freedup walks through the file trees (directories) you specify.

When it finds two identical files on the same device, it hard links
them together. In this case two or more files still exist in their
respective directories, but only one copy of the data is stored on
disk; both directory entries point to the same data blocks.
