Skip to content

Instantly share code, notes, and snippets.

@fuomag9
Created October 10, 2020 09:34
Show Gist options
  • Save fuomag9/84637e44a0f96c947188d35b7aee4f55 to your computer and use it in GitHub Desktop.
Save fuomag9/84637e44a0f96c947188d35b7aee4f55 to your computer and use it in GitHub Desktop.
delete duplicate files by md5
find . -type f \
| xargs md5sum \
| sort -k1,1 \
| uniq -Dw32 \
| while read hash file; do
[ "${prev_hash}" == "${hash}" ] && rm -v "${file}"
prev_hash="${hash}";
done
@jpaulickcz
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment