Skip to main content

in-depth comparison of files, archives, and directories

Project description

diffoscope will try to get to the bottom of what makes files or directories different. It will recursively unpack archives of many kinds and transform various binary formats into more human readable form to compare them. It can compare two tarballs, ISO images, or PDF just as easily.

It can be scripted through error codes, and a report can be produced with the detected differences. The report can be text or HTML. When no type of report has been selected, diffoscope defaults to write a text report on the standard output.

diffoscope is developed as part of the “reproducible builds” Debian project. It is meant to be able to quickly understand why two builds of the same package produce different outputs. diffoscope was previously named debbindiff.

Example

To compare two files in-depth and produce an HTML report, run something like:

$ bin/diffoscope --html output.html build1.changes build2.changes

diffoscope will exit with 0 if there’s no differences and 1 if there are.

diffoscope can also compare non-existent files:

$ bin/diffoscope /nonexistent archive.zip

To get all possible options, run:

$ bin/diffoscope --help

External dependencies

diffoscope requires Python 3 and the following modules available on PyPI: libarchive-c, python-magic.

Optionally, the following modules will enhance it:

  • tlsh is used to recognize file renames. It is build from tlsh source. Available on Debian as python3-tlsh.

  • python-debian is used to inspect Debian control files. It is available on PyPI.

  • rpm-python is used to inspect RPM files. It is built from rpm. Available on Debian and Fedora as python3-rpm.

  • Magic-file-extension can be used instead of python-magic. It is built from file. Available on Debian and Fedora as python3-magic.

The various comparators rely on external commands being available. To get a list of them, please run:

$ bin/diffoscope --list-tools

Contributors

Lunar, Reiner Herrmann, Chris Lamb, Helmut Grohne, Holger Levsen, Mattia Rizzolo, Daniel Kahn Gillmor, Paul Gevers, Peter De Wachter, Yasushi SHOJI.

License

diffoscope is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

diffoscope is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with diffoscope. If not, see <http://www.gnu.org/licenses/>.

Project details


Release history Release notifications | RSS feed

This version

42

Download files

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

Source Distribution

diffoscope-42.tar.gz (299.9 kB view details)

Uploaded Source

File details

Details for the file diffoscope-42.tar.gz.

File metadata

  • Download URL: diffoscope-42.tar.gz
  • Upload date:
  • Size: 299.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for diffoscope-42.tar.gz
Algorithm Hash digest
SHA256 c0241acf5de7eb0e9e209e43dbf389beca722ddfb8b5d5630fd40569f1f465e2
MD5 d5fd708ab25915758bb96afb4d7c86ea
BLAKE2b-256 8ee5b830970637a351689c1232a7e0f860644d6b28c9c6cd3fb7b92896493e9a

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