mirror of
https://github.com/sreedevk/deduplicator.git
synced 2026-10-15 23:56:40 +00:00
d99d7833270a2787618217e7fff96735955fd423
Deduplicator
Find, Sort, Filter & Delete duplicate files
Usage
find,filter,delete duplicate files
Usage: deduplicator [OPTIONS] [scan_dir_path]
Arguments:
[scan_dir_path] Run Deduplicator on dir different from pwd (e.g., ~/Pictures )
Options:
-t, --types <TYPES> Filetypes to deduplicate [default = all]
-i, --interactive Delete files interactively
-m, --min-size <MIN_SIZE> Minimum filesize of duplicates to scan (e.g., 100B/1K/2M/3G/4T) [default: 1b]
-D, --max-depth <MAX_DEPTH> Max Depth to scan while looking for duplicates
-d, --min-depth <MIN_DEPTH> Min Depth to scan while looking for duplicates
-f, --follow-links Follow links while scanning directories
-s, --strict Guarantees that two files are duplicate (performs a full hash)
-p, --progress Show Progress spinners & metrics
-h, --help Print help
-V, --version Print version
Examples
# Scan for duplicates recursively from the current dir, only look for png, jpg & pdf file types & interactively delete files
deduplicator -t pdf,jpg,png -i
# Scan for duplicates recursively from the ~/Pictures dir, only look for png, jpeg, jpg & pdf file types & interactively delete files
deduplicator ~/Pictures/ -t png,jpeg,jpg,pdf -i
# Scan for duplicates in the ~/Pictures without recursing into subdirectories
deduplicator ~/Pictures --max-depth 0
# look for duplicates in the ~/.config directory while also recursing into symbolic link paths
deduplicator ~/.config --follow-links
# scan for duplicates that are greater than 100mb in the ~/Media directory
deduplicator ~/Media --min-size 100mb
Installation
Cargo Install
Stable
[!WARNING] Note from GxHash: GxHash relies on aes hardware acceleration, you must make sure the aes feature is enabled when building (otherwise it won't build). This can be done by setting the RUSTFLAGS environment variable to -C target-feature=+aes or -C target-cpu=native (the latter should work if your CPU is properly recognized by rustc, which is the case most of the time). please install version
0.2.1if you are unable to install0.3.0
$ RUSTFLAGS="-C target-cpu=native" cargo install deduplicator
Performance
Deduplicator uses size comparison and gxhash (a non non-cryptographic hashing algorithm) to quickly scan through large number of files to find duplicates. its also highly parallel (uses rayon and dashmap).
Screenshots
Roadmap
- Tree format output for duplicate file listing
- GUI
- Packages for different operating system repositories (currently only installable via cargo)
v0.3 checklist
- parallelization
- (scanning) + (processing sw & processing hw & formatting & printing)
- (scanning + processing sw + processing hw) & formatting & printing
- scanning + processing sw + processing hw + formatting + printing
- reduce cloning values on the heap
- add a partial hashing mode (--strict)
- max file path size should use the last set of duplicates
- [-] add unit tests
- add silent mode
- restore json output
- update documentation
- remove color output
- progress bar improvements
- use progress bar groups
- fix memory leak on very large filesystems
- maybe use a bloom filter
- reduce FileInfo size
Languages
Rust
92.2%
Ruby
7.8%
