Created
November 29, 2017 09:11
-
-
Save flaccid/692ba7c71996f7dd7cce82a8a7ab30ab to your computer and use it in GitHub Desktop.
show duplicates in gdrive
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
drive md5sum -depth 10000 | sort -k 1 > /tmp/filelist.txt | |
awk 'BEGIN { FS=" " } { c[$1]++; l[$1,c[$1]]=$0 } END { for (i in c) { if (c[i] > 1) for (j = 1; j <= c[i]; j++) print l[i,j] } }' /tmp/filelist.txt > /tmp/dupes.txt | |
cat /tmp/dupes.txt | |
echo "number of duplicates: $(wc -l /tmp/dupes.txt)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uses
go get -u github.com/odeke-em/drive/cmd/drive
.