diff --git a/.zsh/40_function.zsh b/.zsh/40_function.zsh index 7a09a16..291c326 100755 --- a/.zsh/40_function.zsh +++ b/.zsh/40_function.zsh @@ -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 () {