Skip to content

Instantly share code, notes, and snippets.

@joerodriguez
Created November 9, 2015 00:04
Show Gist options
  • Save joerodriguez/24dbf6aa034d6ce3b8c8 to your computer and use it in GitHub Desktop.
Save joerodriguez/24dbf6aa034d6ce3b8c8 to your computer and use it in GitHub Desktop.
Delete duplicate mp3s
find . -type f -name '* 2.mp3' | while read fpath; do orig=`echo $fpath | perl -pe 's/ 2\.mp3$/\.mp3/'` ; if test -e "$orig" ; then rm "$fpath"; echo "deleted $fpath"; fi; done > deleted.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment