Giter Site home page Giter Site logo

msg555 / uniondiff Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 159 KB

Utility to produce a difference between two directories suitable for union filesystems

License: Other

Makefile 1.94% Python 97.82% Dockerfile 0.24%
diff directory aufs containers overlay overlayfs archive cli images tar

uniondiff's Introduction

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 uniondiff

uniondiff is supported and tested on Python 3.8-3.12

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.

uniondiff's People

Contributors

msg555 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.