Summary
Every zero-byte file has the same SHA-256 (e3b0c442...), so dedup lumps all empty files in a directory into one duplicate group and recommends deleting all but one — regardless of name, purpose, or extension.
Reproduction
mkdir data && cd data
: > empty1.log && : > empty2.log && : > empty3.log
cd .. && dedup data
Actual output:
Duplicate Group #3 (Checksum: e3b0c44298fc1c14...)
File Size: 0 bytes
✓ KEEP: data/empty1.log (Priority: 0)
✗ DELETE: data/empty2.log (Priority: 0)
✗ DELETE: data/empty3.log (Priority: 0)
Why it matters
Empty files are routinely meaningful and unrelated to each other: .gitkeep, __init__.py, lock files, .nomedia, freshly-created logs, sentinel and marker files. Deleting them because they happen to share a checksum is never what the user meant, and it frees zero bytes by definition.
Expected behaviour
Skip zero-byte files by default. If they are reported at all, put them in a clearly separate section that is excluded from the deletion recommendations and from the space-saved total, and gate inclusion behind an explicit flag.
Test to write first
- A directory of N empty files produces zero duplicate groups and zero deletion recommendations.
- A directory of empty files plus one genuine duplicate pair reports only the genuine pair.
Summary
Every zero-byte file has the same SHA-256 (
e3b0c442...), sodeduplumps all empty files in a directory into one duplicate group and recommends deleting all but one — regardless of name, purpose, or extension.Reproduction
Actual output:
Why it matters
Empty files are routinely meaningful and unrelated to each other:
.gitkeep,__init__.py, lock files,.nomedia, freshly-created logs, sentinel and marker files. Deleting them because they happen to share a checksum is never what the user meant, and it frees zero bytes by definition.Expected behaviour
Skip zero-byte files by default. If they are reported at all, put them in a clearly separate section that is excluded from the deletion recommendations and from the space-saved total, and gate inclusion behind an explicit flag.
Test to write first