zsh: add findduplicate function

This commit is contained in:
Mathieu Maret 2021-06-29 21:50:46 +02:00
parent 4ff21248de
commit 95510bc37d

View File

@ -152,6 +152,10 @@ docgrep () {
find . -name .repo -prune -o -name .git -prune -o -type f \( -name '*.doc' -o -name '*.docx' -o -name '*.pdf' -o -name '*.odt' \) -print0 | xargs -i -0 docgrepfile {} "$@"
}
findduplicate ()
{
find . -name .repo -prune -o -name .git -prune -o -not -empty -type f -printf "%s\n" | sort -rn | uniq -d | xargs -I{} -n1 find -type f -size {}c -print0 | xargs -0 md5sum | sort | uniq -w32 --all-repeated=separate
}
gettop ()
{