Created
November 15, 2014 10:45
-
-
Save riivo/9253b3158ed0d9833491 to your computer and use it in GitHub Desktop.
finding duplicate files in shell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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