Skip to main content

Compare Directories as macOS Disk Structures

Project description

      ___
     /\__\            _____              ___
    /:/  /           /::\  \           /\__\
   /:/  /           /:/\:\  \         /:/  /
  /:/  /  ___      /:/  \:\__\       /:/__/
 /:/__/  /\__\    /:/__/ \:|__|     /::\  \
 \:\  \ /:/  /    \:\  \ /:/  /    /:/\:\  \
  \:\  /:/  /      \:\  /:/  /     \/__\:\  \
   \:\/:/  /        \:\/:/  /           \:\  \
    \::/  /          \::/  /             \:\__\
     \/__/   mp       \/__/   isk         \/__/ ree

Compare Directories as macOS Disk Structures

The Problem

You make backups from your macOS disk, right? But how can you check that your important stuff got copied correctly? Using

diff -r FS1 FS2

gives you so many errors that the command is impossible to use. This is caused by a few different problems, but the main one is: Symlinks with non-existing target are reported as errors in diff, but for a disk compare we only want to know whether the target strings in the links are the same, not whether the targets exist.

cmpdisktree to the rescue! This command line tool compares filesystems ("disks") in a sensible way for backup check. It checks symlinks for same target string and excludes some system directories. It is mainly designed for macOS disks but can be tweak via command line options for other purposes. Here the help message:

Usage: cmpdisktree.py [OPTIONS] FS1 FS2

  Compare the directories FS1 and FS2 as macOS disk structures

  Errors are reported to a file (default 'cmp-err.log')

Options:
  -v, --verbose               Print debug output.
  -q, --quiet                 No informational output.
  -i, --report-identical      Report identical files to file (default: 'cmp-
                              ok.log')
  -1, --traversal-only        Only traverse FSs (Phase 1). Don't compare file
                              contents
  -c, --clear-std-exclusions  Don't use standard exclusions for macOS disk
                              files systems
  -l, --live-fs-exclusions    Add exclusions for live filesystems (e.g. boot
                              volume)
  -r, --relative-fs-top       Allow relative filesystem top (used when
                              applying the exclusions)
  -o, --output-path PATH      Output path for report file.
  --help                      Show this message and exit.

Details to some options

--relative-fs-top: : This makes exclusion patterns with demand to match the beginning of a path name match in the middle of a path name as well.

--output-path: : If a file path is given, use the file as error log file and write, if applicable, the OK log to cmp-ok.log in the same directory

--relative-fs-top: : This makes exclusion patterns with demand to match the beginning of a path name match in the middle of a path name as well.

--output-path: : If a file path is given, use the file as error log file and write, if applicable, the OK log to cmp-ok.log in the same directory

Credits

Thanks to Kent Nassen and Lennert Stock for the ASCII art characters.

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

cmpdisktree-0.2.0.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cmpdisktree-0.2.0-py2.py3-none-any.whl (15.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file cmpdisktree-0.2.0.tar.gz.

File metadata

  • Download URL: cmpdisktree-0.2.0.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.6

File hashes

Hashes for cmpdisktree-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6cb894d492a4b42bd5b20857edcf5653a3c29c1da136259a212d858f34cb0f3a
MD5 adbca14ad4f14bb2a3ab4f9b8e9cab37
BLAKE2b-256 6c9b09f88ec09a68d60a3d2b3836eede3f5b07edb2626b268ece47f62f41f449

See more details on using hashes here.

File details

Details for the file cmpdisktree-0.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: cmpdisktree-0.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.6

File hashes

Hashes for cmpdisktree-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9c20379f0658ed7e927b789ab4a022fc1ec05b4a5e477af1a7608c07803656eb
MD5 20bb900e9b04ff377a46a056612463c7
BLAKE2b-256 29ce1abc98c7013e74beef05e35e2ee762a22b7501bd294ea9ed7ac980240e4a

See more details on using hashes here.

Supported by

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