Just a random duplicate file removal tool no one asked for. Programemd in Zig.
- What: This is a duplicate file removal tool programmed, it basically detects files that have the exact same contents and can just list them or also remove duplicates automatically.
- How: Internally, the tool hashes file contents using Wyhash and stores all hashes in a list, then compares every hash with the other one, if there's a match then that means there's a duplicate.
- Why: Just a little project I made in one day to get used to the syntax. Though it's highly unpolished I guess I at least got more used to Zig's differences when compared to C.
You can the tool with -h/--help to see the help output:
-h, --help Show this help message
-r, --remove Not only find duplicate files, also remove them
-v, --verbose Show verbose messages
-f, --force Forces file removal without asking for confirmation
-q, --quiet Supresses tool banner and most output except confirmation prompts, duplicate files, and other essential messages
<path> Where to search for duplicates, REQUIRED
Really simple to understand everything from the help output.
I don't know why you would like to install this tool as there are likely more serious and polished open-source alternatives out there. But just in case, you can simply clone this Github repository and then run zig build:
git clone https://github.com/ordinary-hacker/cleaner_z
cd cleaner_z
zig build