Python version support: CPython 2.6, 2.7, 3.2, 3.3, 3.4 and PyPy.
How it works
killdupes scans your filesystem to find duplicate files, partial files and empty files.
It performs n:n comparison of files through md5 hashing and heavy use of dictionaries. Execute with wildcard, or input file containing file names to check.
The method:
Scan all files, find the smallest.
Read read size amount of bytes (equal to the remaining size of the smallest file, or at most CHUNK size) from all files into records.
Hash all records, use hashes as keys into offsets[current_offset] dict.
Files in the same bucket are known to be equal up to this offset.
Continue until at least two files remain that are still equal at all offsets.
Equal files are either a duplicate case (if they are the same size), or one is partial relative to the other (if not the same size).
Memory consumption should not exceed files_in_bucket * read_size.
The algorithm adapts to file changes; it will read all files until eof regardless of the filesize as recorded at startup.
Installation
$ pip install killdupes
Usage
$ killdupes.py 'tests/samples/*'
Empty files:
X 0.0 B 14.03.14 17:39:48 tests/samples/empty
Incompletes:
= 2.0 B 14.03.14 18:17:43 tests/samples/full
X 1.0 B 14.03.14 18:17:26 tests/samples/partial
Duplicates:
= 2.0 B 14.03.14 18:17:43 tests/samples/full
X 2.0 B 14.03.14 18:17:37 tests/samples/full2
Kill files? (all/empty/incompletes/duplicates) [a/e/i/d/N]
If there are many files to scan it will display a progress dashboard while working:
176.1 KB | Offs 0.0 B | Buck 1/1 | File 193868/600084 | Rs 1.0 B
The dashboard fields:
Total bytes read
Current offset of reading
Current number of buckets
File/files in this bucket
Readsize at this offset
Metadata
Release files for killdupes 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| killdupes-0.1.6.tar.gz | 4.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| killdupes-0.1.6-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 13.0 kB
Release files / killdupes-0.1.6.tar.gz
| Download URL | killdupes-0.1.6.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0fb441443fa23cd3087478e4b492afe2fb987a1d437a24613c6f4875a0ad0684
|
|
BLAKE2b-256 checksum How to use checksums |
7030c9ab49a0add3006b0af4a9ee09e3143ea75496715e4893315d6f0f4ac3c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / killdupes-0.1.6-py2.py3-none-any.whl
| Download URL | killdupes-0.1.6-py2.py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
195ce0818e0154e69a95b802f36c19c21896c546825bd2bb47d4fa03fdcd6a49
|
|
BLAKE2b-256 checksum How to use checksums |
503bfeb2b7a08063e1ed04251a8184701654b4acdcb2e5128d26433d835111be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for killdupes 0.1.6
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.