lsdupes is a command line tool that finds files that have identical content and lists them, deletes them, or hard links them together.