RustintermediatecliAI generated

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

  1. 01

    Walk the directory tree

    ~1.5h

    Use the walkdir crate to recursively enumerate files, filtering out directories and symlinks as needed.

  2. 02

    Hash file contents

    ~2h

    Stream each file's bytes through a sha2 hasher to compute a content hash without loading huge files fully into memory.

  3. 03

    Group and report duplicates

    ~1.5h

    Group files by hash in a HashMap and print groups with more than one entry as duplicate sets.

  4. 04

    Add a safe delete mode

    ~2h

    Add a --delete flag that removes all but one file per duplicate group, requiring explicit confirmation.

  5. 05

    Add progress output

    ~1h

    Print progress as files are scanned, including a final summary of space that could be reclaimed.

Resources

Ready to build this?

Get a GitHub repo and start building. Your AI reviewer checks each step as you go.

~8h · 5 steps

Tech stack

walkdirsha2clap