Skip to main content

Directory difference CLI tool

Project description

uniondiff - Directory difference calculator

uniondiff is a simple tool for calculating the directory difference between two directories or archives. uniondiff performs the calculation below:

upper = merged - lower

This tool acts as the inverse union mount file systems. Whereas typically you combine a lower and upper directory to produce a merged directory, uniondiff takes as input the merged directory and subtracts out the lower directory to produce the upper directory. In particular, the resulting output can be mounted as the upper directory along with the lower to produce the original merged directory.

uniondiff is intended for use with low level file system tools (e.g. container systems) or for simply storing diffs of directories. Note that this tool does not store compact diffs of individual files; a file will appear in full in the diff iff its content or metadata has changed between the merged and lower operands.

Installation

uniondiff can be installed through pip. This installs both the uniondiff CLI utility and the uniondiff Python library.

pip install tplbuild

uniondiff is supported and tested on Python 3.8-3.10

Examples

Compute the directory difference between the directory "data-day10" and "data-day9". By default the output will be written as a tar file.

uniondiff data-day10 data-day9 > diff.tar

uniondiff can also write directly to the file system. Note that it will ignore ownership changes unless you also pass the --preserve-owners flag.

uniondiff data-day10 data-day9 --output-type file -o diff

You can also use tar archives as the input paths.

uniondiff data-day10.tar data-day9.tgz > diff.tar

Contributing

If you want to contribute to uniondiff, you can do so by creating a pull request. lease make sure to include a detailed description of the changes you're proposing.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uniondiff-0.1.0.tar.gz (19.9 kB view details)

Uploaded Source

Built Distribution

uniondiff-0.1.0-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file uniondiff-0.1.0.tar.gz.

File metadata

  • Download URL: uniondiff-0.1.0.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for uniondiff-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b8571e549c52f43cef922dc0e98deed263ece414e4976dc20b3fa71e5f9f5d07
MD5 a03b609dbe1d396f7bde4d481b92723c
BLAKE2b-256 bc8342ed9074d347b6fe5ce117020b466c08834eb1afa84871ba1e2b47c1588e

See more details on using hashes here.

File details

Details for the file uniondiff-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: uniondiff-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for uniondiff-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 98a77012b566c3fa8c88390c2b983cfc0cdbce1d30ace7a48a86a76f60eb4b8f
MD5 6689fa6ffd7ecb8cc267648a4d5a666d
BLAKE2b-256 6e71c45c473eba6a36df37dc0b76062ecc4b4d134e608c1656db119bcdbed29f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page