Metadata-Version: 2.5
Name: dupehunt
Version: 0.0.2
Summary: Fast, dependency-free duplicate file finder with a friendly CLI.
Project-URL: Homepage, https://pypi.org/project/dupehunt/
Author-email: lqxnjk <lqxnjk@qq.com>
License: MIT
License-File: LICENSE
Keywords: cli,dedupe,disk-usage,duplicate,files,hash
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# dupehunt

[English](#english) | 中文

按内容哈希查找重复文件，零依赖的命令行工具。

## 安装

```console
pip install dupehunt
```

## 用法

```python
$ dupehunt ~/Downloads
3 group(s), 9 file(s), 412.6 MB reclaimable

[1] 180.0 MB x 3  (360.0 MB wasted)
    /home/me/Downloads/ubuntu.iso
    /home/me/Downloads/ubuntu (1).iso
    /home/me/Downloads/backup/ubuntu.iso

$ dupehunt ~/data --json > dupes.json
$ dupehunt ~/data --delete -m 1M      # 演练
$ dupehunt ~/data --delete --yes -m 1M  # 真删
```

## 说明

三遍扫描由便宜到贵：先按大小分组、再哈希前 8 KiB、最后才对仍然碰撞的候选做全文件哈希，因此全盘扫描也不慢。符号链接不跟随，同一 inode 的硬链接只计一次。`--delete` 不带 `--yes` 永远是演练，不删任何东西。

## 许可证

MIT

---

<a id="english"></a>
## English

Fast, dependency-free duplicate file finder with a friendly CLI.

## Install

```console
pip install dupehunt
```

## Usage

```python
$ dupehunt ~/Downloads
3 group(s), 9 file(s), 412.6 MB reclaimable

[1] 180.0 MB x 3  (360.0 MB wasted)
    /home/me/Downloads/ubuntu.iso
    /home/me/Downloads/ubuntu (1).iso
    /home/me/Downloads/backup/ubuntu.iso

$ dupehunt ~/data --json > dupes.json
$ dupehunt ~/data --delete -m 1M      # 演练
$ dupehunt ~/data --delete --yes -m 1M  # 真删
```

## Notes

Three passes, cheapest first: group by size, hash the first 8 KiB, then hash whole files only for surviving candidates. Symlinks are not followed and hard links to the same inode count once. `--delete` without `--yes` is always a dry run.

## License

MIT
