Skip to content

Instantly share code, notes, and snippets.

@riivo
Created November 15, 2014 10:45
Show Gist options
  • Select an option

  • Save riivo/9253b3158ed0d9833491 to your computer and use it in GitHub Desktop.

Select an option

Save riivo/9253b3158ed0d9833491 to your computer and use it in GitHub Desktop.
finding duplicate files in shell
#comes from http://unix.stackexchange.com/questions/71176/howto-find-duplicate-files-on-disk
find / -type f -exec md5sum {} \; > md5sums
gawk '{print $1}' md5sums | sort | uniq -d > dupes
while read d; do echo "---"; grep $d md5sums | cut -d ' ' -f 2-; done < dupes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment