In-place hardlink deduplication across one or more folders.
Project description
file-dedupe
Find and replace duplicate files across one or more folders with hardlinks.
Uses fast parallel hashing with file attribute awareness to safely deduplicate files in-place.
Part of the Infinito.Nexus ecosystem.
📦 Installation
The tool is published on PyPI and can be installed using pip:
pip install fidedu
This installs the global command:
fidedu
You can also invoke it explicitly as a module:
python -m fidedu --help
🚀 Usage
Basic Examples
Analyze duplicates across one or more directories (dry-run mode):
fidedu ~/Documents ~/Downloads ~/Pictures
Replace duplicates with hardlinks to one canonical copy (in-place deduplication):
fidedu ~/Documents ~/Downloads ~/Pictures --compress
Verbose output (show exactly what happens):
fidedu ~/Documents ~/Downloads ~/Pictures --compress -v
Equivalent module invocation:
python -m fidedu ~/Documents ~/Downloads --compress -v
⚙️ Behavior
- Scans all provided folders recursively.
- Groups files with identical size.
- For each candidate group, computes a BLAKE2b hash including file attributes (mode, UID, GID, size, and modification time).
- Files with matching hashes are treated as true duplicates.
- One canonical copy is kept; all others are replaced by hardlinks pointing to it.
- When
--compressis not used, the tool reports potential savings only (no changes are made).
Command Line Options
| Option | Description |
|---|---|
--compress |
Apply deduplication (replace duplicates with hardlinks). Default is dry-run mode. |
-v, --verbose |
Verbose output (show detailed linking actions). |
-w, --workers N |
Number of parallel hashing processes (default: CPU count). |
Example Output
Duplicate sets found: 12
Files involved: 57
Planned relinks: 45
Estimated savings: 1.2 GB (1,234,567,890 bytes)
[dry-run] Use --compress to apply these changes.
🧪 Testing
Run all tests locally:
make test
Lint the codebase:
make lint
📄 License
This project is licensed under the MIT License. See the LICENSE file for details.
👤 Author
Kevin Veen-Birkenbach https://veen.world
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fidedu-2.0.0.tar.gz.
File metadata
- Download URL: fidedu-2.0.0.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
236f7eb71d49acf0a51b6d9061b7f449e15f9ca869e3e0b16bf0310462d62078
|
|
| MD5 |
7b6e0235e0f61b6b996c393f2d2c4774
|
|
| BLAKE2b-256 |
b89b25786f264c188a1cfbe7de30474f8ec4b6e726f9b7252f8a1c90cd1a461d
|
File details
Details for the file fidedu-2.0.0-py3-none-any.whl.
File metadata
- Download URL: fidedu-2.0.0-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d3d902b5a80d0d9cc79f7ceec1347d45b335d18d513f0e043c2bc2db620b057
|
|
| MD5 |
b0525b205b9aa6cbe86169dc633f115d
|
|
| BLAKE2b-256 |
eeba34bb2a9420bb2bd6492f93deb68150971a90b30d45ad3ee1829b8c190a07
|