Skip to content

Instantly share code, notes, and snippets.

@raidoz
Last active October 22, 2016 21:29
Show Gist options
  • Save raidoz/15084b784e5f513d884403c4c9ce6633 to your computer and use it in GitHub Desktop.
Save raidoz/15084b784e5f513d884403c4c9ce6633 to your computer and use it in GitHub Desktop.
md5deep hashing
# Inside the directory that needs to be hashed
# recursive, show estimated time, relative paths
md5deep -rle -W /path/to/result.md5 *
# List files with the same hash, printing the hash-path of each file (remember to keep at least one of them)
sort result.md5 | uniq -D -w 32
# Count the number of duplicate files, path to first encountered file with that hash is shown only | sort by frequency
sort result.md5 | uniq -cd -w 32 | sort -nr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment