百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

deduplicator

> 编程语言
开源

递归过滤、排序和删除重复文件

359 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

递归过滤、排序和删除重复文件

Deduplicator

Find, Sort, Filter & Delete duplicate files

[!NOTE] This project is maintained with the assistance of AI tools. All changes are subject to manual review and a comprehensive test suite to ensure stability and quality.

Usage

…

Examples

…

Demo

Installation

Currently, you can only install deduplicator using cargo package manager.

Cargo

GxHash relies on aes hardware acceleration, so please set RUSTFLAGS to "-C target-feature=+aes" or "-C target-cpu=native" before installing.

install from crates.io (stable)

bash
$ RUSTFLAGS="-C target-cpu=native" cargo install deduplicator

# or

$ RUSTFLAGS="-C target-feature=+aes,+sse2" cargo install deduplicator

install from git (nightly)

bash
$ RUSTFLAGS="-C target-cpu=native" cargo install deduplicator --git https://github.com/sreedevk/deduplicator

# or

$ RUSTFLAGS="-C target-feature=+aes,+sse2" cargo install --git https://github.com/sreedevk/deduplicator

Manual Installation

  • Download the right pre-compiled binary archive for your platform from github release page.
  • Decompress it using tar -zxvf .tar.gz
  • Move it to a directory included in $PATH.
    • ideally /usr/local/bin/.

Performance

Deduplicator uses size comparison and GxHash to quickly check a large number of files to find duplicates. its also heavily parallelized. The default behavior of deduplicator is to only hash the first page (4K) of the file. This is to ensure that performance is the default priority. You can modify this behavior by using the --strict flag which will hash the whole file and ensure that 2 files are indeed duplicates. I'll add benchmarks in future versions.

Benchmarks

I've used hyperfine to run deduplicator on files generated by the rake file at rakelib/benchmark.rake. The Benchmarking accuracy can further be improved by isolating runs inside restricted docker containers. I'll include that in the future. For now, here's the hyperfine output on my i7-12800H laptop with 32G of RAM.

Fewer Large Files

…

Many Small Files

…

proposed

  • parallelization

    • scanning + processing sw + processing hw + formatting + printing
  • user supplied cache file path for faster re-runs

  • hardlinks / symlinks support

  • max file path size should use the last set of duplicates

  • add more unit tests

    • test against different filesystems
    • test against different file name encodings
  • restore json output (was removed in 0.3 due to quality issues)

  • fix memory leak on very large filesystems

    • maybe use a bloom filter
    • reduce FileInfo size
  • tui

  • change the default hashing method to include the first & last page of a file (8K)

  • provide option to localize duplicate detection to arbitrary levels relative to current directory

  • localize file meta store locks to sub path levels to avoid global lock contention from multiple threads.

  • bulk operations

    • --keep-latest
    • --keep-oldest
    • --keep-last-modified
    • --keep-first-modified
  • fix: partial hash collision - a file full of null bytes ("\0") and an empty file. This is a known trade off in gxhash.

    • include initial pages and final pages of the file
    • append the offset between the last initial page hashed and the first final page hashed in the content passed to the hasher.
  • potential optimizations

    • lookup the memory efficiency gains if instead of directly inserting into a hashmap, deduplicator looksup the file in a bloom filter. this way, the duplicate store hashmap does not require to be locked for every single file. The bloom filter can be stored in an atomically updateable type to improve performance as well.

v0.3.2

  • fix: single file groups are printed to screen
  • fix: --exclude-types and --types flag behave identically.

v0.3.1

  • parallelization
    • (scanning + processing sw + processing hw) & formatting & printing
  • remove formatting step and write directly to stdout
  • simplify output to improve performance
  • increase the number of pages hashed in partial hashing
  • updated dependencies
  • fix: full file hash collision between a file full of null bytes ("\0") and an empty file. This is a known trade off in gxhash.
    • appending the file size at the end of content before hashing.
  • created an automated release pipeline

v0.3.0

  • parallelization
    • (scanning) + (processing sw & processing hw & formatting & printing)
  • reduce cloning values on the heap
  • add a partial hashing mode (--strict)
  • add unit tests
  • add silent mode
  • update documentation
  • remove color output
  • progress bar improvements
    • use progress bar groups
  • remove broken json rendering
  • add benchmarks

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustdeduplicationduplicate-detectionduplicate-filesduplicatefilefinder

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言