浏览代码

Optimize dups (#539)

master
KlzXS GitHub 5 年前
父节点
当前提交
babf379a74
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      plugins/dups

+ 2
- 2
plugins/dups 查看文件

@@ -7,9 +7,9 @@
# Requires: find md5sum sort uniq xargs
#
# Shell: POSIX compliant
# Author: syssyphus
# Author: syssyphus, KlzXS

find . -size +0 -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
find . -size +0 -type f -printf "%s %p\n" | sort -rn | sed -n 'N; /^\([0-9]*\) .*\n\1.*$/p;$d;D' | awk '{printf("%s\0", substr($0, index($0, $2)))}' | xargs -0 md5sum | sort | uniq -w32 --all-repeated=separate

printf "Press any key to exit"
read -r _

正在加载...
取消
保存