Duplik is a small tool to detect duplicate files. Duplicate detection is done based on Blake 3 hashes of files combined with their sizes, ignoring empty files. Duplicates will be output as JSON.
duplik:main* λ duplik -D 4 . | jq
[
{
"shortHash": "a7239b44140bb930",
"bytes": 432136,
"paths": [
".zig-cache/o/33bab1f3dd40ff9a1f36a1cd419b7e77/duplik",
"zig-out/bin/duplik"
]
},
{
"shortHash": "efe85429b396b1bf",
"bytes": 41,
"paths": [
".git/refs/heads/max-depth",
".git/refs/remotes/origin/max-depth"
]
}
]
- Install Zig
- Clone this repo and cd into the repo root.
- Run
zig build -Doptimize=ReleaseFastto compile the executable - Copy
zig-out/bin/duplikto somewhere on your PATH (e.g., ~/.local/bin).
usage: duplik [options] <directory path>
options:
-D/--max-depth <n> sets maximum recursion depth; default: 0