zsh:funcs:finddup: Use byte size for first filter

Use the byte size as first filter instead of the size in 1KB blocks.

This way the filter is way more accurate and filters out more files
for which the md5sum does not need to be calculated.
This commit is contained in:
2022-12-28 02:02:04 +01:00
parent 6bb26ac2fd
commit 6672387bee

View File

@@ -558,7 +558,7 @@ finddup() {
# -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 '{}' '+' \
find "$@" -type f -exec du -b '{}' '+' \
| sort \
| awk '{ if (!_[$1]) { _[$1] = $0 } else { print _[$1]; print $0; } }' \
| sort -u \