Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save arthuralvim/a63d1d55e52d3f3fbc031dff057cb074 to your computer and use it in GitHub Desktop.
Save arthuralvim/a63d1d55e52d3f3fbc031dff057cb074 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