只打印size>10KiB的重复文件 and 打印文件大小

This commit is contained in:
xzb23 committed 2026-10-30 14:11:49 +08:00
1 parent 82b099de34
commit 1fefee50e9
2 files changed
+5 -1

No files matched your search

+4 -1
View File
@@ -22,7 +22,10 @@ def hash_files_from_glist(algorithm: function):
def print_info():
for t in runing_data.hash_to_files:
if len(runing_data.hash_to_files[t]) > 1:
print(t)
st_size = os.stat(runing_data.hash_to_files[t][0]).st_size
if st_size <= 10240:
continue
print(t, f"size: {st_size} Byte")
for fp in runing_data.hash_to_files[t]:
print("\t", fp)
print()