DeltaDir
Compare directories using various methods and optionally synchronize them.
Examples
Create test environment
# prepare two identical directories
mkdir -p /tmp/src/subdir
echo x > /tmp/src/test.txt
echo x > /tmp/src/subdir/test.txt
cp -a /tmp/src /tmp/dst
Find missing (new) files
The default mode is exists: a file is considered different if it is completely missing in the destination directory (dst/).
# create new file in src
echo new > /tmp/src/new.txt
# new file is found
deltadir /tmp/src/ /tmp/dst/
new.txt
# Let's synchronize it using -s or --sync! (no overwrite by default)
deltadir /tmp/src/ /tmp/dst/ --sync
new.txt
Find modified files
you can use -m/--method (exists, mtime, size, hash) for more accurate checking
# create new file in src
echo new content > /tmp/src/new.txt
# find nothing
deltadir /tmp/src/ /tmp/dst/
# use hash (slowest, but most reliable) and detect it
deltadir /tmp/src/ /tmp/dst/ -m hash
new.txt
# sync with overwrite
deltadir /tmp/src/ /tmp/dst/ -m hash -s --overwrite
new.txt
Always recursive
deltadir always work recursively.
echo new > /tmp/src/subdir/newfile.txt
deltadir /tmp/src/ /tmp/dst/
subdir/newfile.txt
See result as table
Add -t/--table to see results as table:
deltadir /tmp/src/ /tmp/dst/ -t
File | Reason | Src | Dst | Action
-----------------------------------------------------------------------------------------------------------------------------
subdir/newfile.txt | missing | - | - | nothing(reported)
Metadata
Release files for deltadir 0.1.0
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 | |
|---|---|---|---|---|
| deltadir-0.1.0.tar.gz | 4.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| deltadir-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.2 kB
Release files / deltadir-0.1.0.tar.gz
| Download URL | deltadir-0.1.0.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a143470ea197d941e7f95e8a22579d86c06a1517ddf1da4cde37049a94865750
|
|
BLAKE2b-256 checksum How to use checksums |
37132fea5f7bb5114959a143e856daba984d011a0e1bd3df6e0f41d201e0e6ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.5
|
Release files / deltadir-0.1.0-py3-none-any.whl
| Download URL | deltadir-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
63679991ca8cb9c0c90bb14e3933cec0a066f345a7455e75edec65a3494e0585
|
|
BLAKE2b-256 checksum How to use checksums |
6e3ffc503807195acde21c830a3894cd0121efcb9abd12ba9df6cf83344b4133
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.5
|
Security for deltadir 0.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.