dirdiff

command module
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 27 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

dirdiff

dirdiff compares two directories recursively, locally or over SSH, and reports added, removed, and modified files and directories.

Prerequisites

  • Go 1.26 or newer, to install via go install or build from source.
  • For remote comparisons, SSH access to the remote host and a copy of the dirdiff binary on it (used as the --remote-bin path, or resolved on $PATH).

Installation

go install github.com/audivir/dirdiff@latest

Prebuilt binaries for Linux, macOS, and Windows are attached to each GitHub Release.

Usage

dirdiff [options] <pathA|hostA:/pathA> <pathB|hostB:/pathB>

Either path can be local, or host:/path for a remote directory reached over SSH.

Common options:

  • -i, --include, -e, --exclude: glob patterns to include or exclude files and directories from the comparison.
  • -w, --workers: number of parallel workers, defaults to the number of CPUs.
  • -L, --follow-symlinks: follow symbolic links.
  • --flat: compare files by name only, ignoring directory structure.
  • -f, --fast: glob patterns to hash with a faster sparse SHA256, plus -l, --fast-limit and -g, --global-limit to control the size limits used.
  • -t, --tree: print a side-by-side tree view of the differences.
  • -a, --show-all: also traverse files inside added or removed directories.
  • -q, --quiet, -V, --verbose, -P, --no-progressbar, -C, --no-color: control output verbosity and styling.
  • -r, --remote-bin, -s, --sudo, -n, --no-sudo: configure the remote agent binary path and privilege escalation per host.

Run dirdiff --help for the full list of options.

The exit code reports the comparison result:

  • 0: the directories are identical.
  • 1: differences were found on both sides.
  • 2: an error occurred.
  • 3: directory A is a subset of directory B.
  • 4: directory B is a subset of directory A.

License

dirdiff is licensed under the MIT License. See LICENSE.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址