Skip to content

Instantly share code, notes, and snippets.

@kossoy
Created August 13, 2013 04:29
Show Gist options
  • Save kossoy/6217913 to your computer and use it in GitHub Desktop.
Save kossoy/6217913 to your computer and use it in GitHub Desktop.
Filter identical files (Mac OS X)
find . -type f -print0 \
| xargs -0 md5 \
| rev \
| sort -t \) -k1,1 -u \
| rev \
| sed -e "s/.*(\(.*\)).*/\"\1\"/"\
| xargs -J % mv % ../cleaned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment