A high-performance CLI tool written in Rust to scan, detect, preview, and clean up duplicate files using content-based hashing (BLAKE3). Works seamlessly across macOS, Linux, and Windows.
- β Multi-threaded scanning using Rayon
- β File grouping by size and content hash (BLAKE3)
- β
Smart deletion policies:
- Keep newest / oldest by modification time
- Keep file with the shortest path
- Keep file matching a regex pattern
- β Interactive file deletion mode
- β Preview files using system viewer
cargo run --release -- <path> [OPTIONS]
<path>
β Directory to scan for duplicates
Flag | Description |
---|---|
--open |
Preview one file per duplicate set |
--interactive |
Interactive mode to manually keep/delete |
--keep-newest |
Auto-keep the newest file in each group |
--keep-oldest |
Auto-keep the oldest file in each group |
--keep-shortest |
Auto-keep the shortest path file |
--keep-regex <PAT> |
Auto-keep file matching a regex pattern |
Only one
--keep-*
policy can be used at a time.
# Basic scan
duplicate_finder ~/Downloads
# Smart deletion by newest modified file
duplicate_finder ~/Downloads --keep-newest
# Interactive cleanup
duplicate_finder ~/Downloads --interactive
# Keep files with 'important' in the name
duplicate_finder ~/Downloads --keep-regex "important"
git clone https://github.com/c0d3cr4ft3r/duplicate-finder.git
cd duplicate-finder
cargo build --release
./target/release/duplicate_finder --help
- Scans all files and groups them by size
- Computes BLAKE3 hashes in parallel
- Groups files with identical hashes
- Runs the chosen cleanup strategy
walkdir
rayon
blake3
tabled
clap
dialoguer
regex
MIT β do whatever you want, just don't blame me.