From 6bb26ac2fd5afcf27d5fb6f87d2c1b4f40a4119e Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Wed, 28 Dec 2022 01:56:55 +0100 Subject: [PATCH] zsh:funcs:finddup: Add TODO to use CRC instead md5 --- .config/zsh/zshrc.d/40-functions.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/zsh/zshrc.d/40-functions.zsh b/.config/zsh/zshrc.d/40-functions.zsh index f5d745c..c647464 100644 --- a/.config/zsh/zshrc.d/40-functions.zsh +++ b/.config/zsh/zshrc.d/40-functions.zsh @@ -556,6 +556,8 @@ finddup() { # print duplicates # TODO: Fix duplicate lines output in the awk script that currently `sort # -u` handles + # TODO: Use cksum to calculate faster CRC with custom awk solution to print + # duplicates, as `uniq -w32` breaks through the different CRC lengths. find "$@" -type f -exec du '{}' '+' \ | sort \ | awk '{ if (!_[$1]) { _[$1] = $0 } else { print _[$1]; print $0; } }' \