Skip to main content

difftree

difftree is a tool that diffs two directories. It recursively walks through the directories and lists files that are missing on either side.

By default difftree only checks whether a file is present or not, so files present on both sides but with different file sizes, permissions or content will not be listed. However, checking any of those can be enabled via the -s, -p, and -z flags respectively.

Usage

> difftree dir-a/ dir-b/
dir-a/                 <-> dir-b/
                       <-  file-only-in-dirb.txt
file-only-in-dir-a.txt  ->

The following options are available:

  -h, --help            show this help message and exit
  -p, --check-perms     Diff file permissions
  -s, --check-sizes     Diff file sizes
  -z, --check-hashes    Diff file hashes
  -d, --dir-norecurse   Show missing directories as a single entry (don't show files in the directory)
  -e exclude_regex, --exclude exclude_regex
                        Exclude files matching this regex

Install

The recommended way to install difftree is via pipx:

pipx difftree

Alternatives

UNIX built-in diff -rq dir1 dir2 works quite well.

rsync --dry-run -r --itemize-changes dir1 dir2 also works quite well, but doesn't list files that are present in dir2 but missing in dir1. It requires you to parse the quite terse change format e.g. >fcsT.... and >f+++++++.

Release files for difftree 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for difftree 0.1.1
File Size Uploaded
difftree-0.1.1.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for difftree 0.1.1
File Interpreter ABI Platform
difftree-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.0 kB

Release files / difftree-0.1.1.tar.gz

Download URL difftree-0.1.1.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c1e94b7736f5f9310b4a35bb4bec85272e821e6da790df2967d9566b30fae656
BLAKE2b-256 checksum
How to use checksums
a2242103bf4c70f21e32b8cca8c3287e7add0f27276324d260aed4cbd2bfc6cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.10.1 Darwin/21.3.0

Release files / difftree-0.1.1-py3-none-any.whl

Download URL difftree-0.1.1-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
49aacf6b4b49ac973fb21d0407d845c34e64984bb02f29d300b78ce3828867ee
BLAKE2b-256 checksum
How to use checksums
5aac24e2edc24c424d18476ee2c257c906bb35b4ca84a9eee8be41b6ef0633bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.10.1 Darwin/21.3.0

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page