Skip to main content

Duplicates

PyPI - Python Version PyPI - Version Tests codecov

Identify duplicate files and replace them with hardlinks on any OS.

Intended to be used to reduce the storage space taken up by mutliple copies of similar backups. (E.g. regular google takeouts)

Usage

Can be run from a command line in Linux, MacOS or Windows and will recursively scan a directory, identify and optionally hardlink any duplicate files found.

WARNING: Hardlinking files means if you change any one "copy" all "copies" will change.

WARNING: If other hardlinks are present outside the directories scanned, these may no longer point to the same inode as those within the scanned directories. Consider the situation as undefined.

Command line

dupes PATH will display number of duplicate files found under PATH

dupes PATH1 PATH2 ... will display number of duplicate files found under and across PATH1 and PATH2

dupes --list PATHS... will list the full sets of duplicate files found

dupes --short PATHS... will only list sets of duplicates where there are different file names

and finally ...

dupes --link PATHS... will replace duplicate files with hard links

Python

You can also use the class DuplicateFiles to indentify and optionally link duplicates.

Additionally BufferedIOFile provides a binary file which knows its Path and offers a readchunk() method similar to the text file readline().

Up Next

Please vote on any issues which are important to you.

PyPI - Downloads

Metadata

Release files for link-duplicates 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for link-duplicates 1.1.0
File Size Uploaded Provenance Actions
link-duplicates-1.1.0.tar.gz 7.2 kB Without provenance Details for link-duplicates-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for link-duplicates 1.1.0
File Interpreter ABI Platform Actions
link_duplicates-1.1.0-py3-none-any.whl Python 3 none any Details for link_duplicates-1.1.0-py3-none-any.whl

Total release size: 14.8 kB

Security for link-duplicates 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page