File Deduplication Tool
A utility that scans a directory tree, computes SHA-256 hashes of file contents to find exact duplicates, and reports or interactively removes redundant copies while keeping one original. Learners practice filesystem traversal with std::filesystem, hashing, and building safe interactive CLI tools.
- Estimate
- ~8h
- Steps
- 5
- Completed by
- 0
- Proposed by
- codeseed.app
std::filesystem · OpenSSL (SHA-256)
Project roadmap
- 01
Recursively enumerate files
~1hUse std::filesystem::recursive_directory_iterator to collect all file paths under a root directory.
- 02
Compute file content hashes
~2hHash each file's contents with SHA-256 via OpenSSL to build a hash-to-paths map.
- 03
Identify duplicate groups
~1.5hFilter the map to hashes with more than one associated path, grouping duplicates together.
- 04
Build the interactive removal flow
~2hFor each duplicate group, show the files and let the user choose which copies to delete, keeping at least one.
- 05
Add a dry-run/report-only mode
~1.5hAdd a flag that only prints a report of duplicates and reclaimable space without deleting anything.
Resources
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack