Skip to content

Instantly share code, notes, and snippets.

@enboig
enboig / dupes.sh
Created May 24, 2023 11:44
Find duplicated files by content, sorting them by size
#!/bin/bash
fdupes -Sr . | sed -e 's/^$/B@R@E@A@K/g' | tr '\n' '\t' | sed -e 's/B@R@E@A@K\x09/\n/g' | sort -rn > fdupes_single_big.txt
cat fdupes_single_big.txt | tr '\t' '\n' > fdupes_big.txt
# cat fdupes_single_big.txt | sed '10000,$ d' | tr '\t' '\n' > fdupes_10000.txt