Directory File Deduplicator by Content Hash
Build a command-line tool that scans a directory tree, computes a content hash for every file, and reports groups of duplicate files, with an option to delete redundant copies. Learners practice filesystem traversal, hashing with a crate like sha2, and building a safe CLI with confirmation prompts.
- Estimate
- ~8h
- Steps
- 5
- Completed by
- 0
- Proposed by
- codeseed.app
walkdir · sha2 · clap
Project roadmap
- 01
Walk the directory tree
~1.5hUse the walkdir crate to recursively enumerate files, filtering out directories and symlinks as needed.
- 02
Hash file contents
~2hStream each file's bytes through a sha2 hasher to compute a content hash without loading huge files fully into memory.
- 03
Group and report duplicates
~1.5hGroup files by hash in a HashMap and print groups with more than one entry as duplicate sets.
- 04
Add a safe delete mode
~2hAdd a --delete flag that removes all but one file per duplicate group, requiring explicit confirmation.
- 05
Add progress output
~1hPrint progress as files are scanned, including a final summary of space that could be reclaimed.
Resources
- DocsThe Rust Book
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack