cintch checks file integrity from the command line

I’ve written a lot about checking the integrity of important files, and provide two free apps for doing just that: Dintch and Fintch, the first aimed at large folder hierarchies, the second more at individual files and smaller folders. I’m now pleased to offer a command tool which performs the same functions, so that you can, for example, incorporate this into your own maintenance scripts, and perform automated checks. Following the pattern, this tool is named cintch.

It offers the same three functions, set by the option. -c checks digest tags, -t writes them, and -r performs retagging where there’s no existing tag or it doesn’t match the current digest result. By default, cintch uses a 512 KB buffer, but there’s an option to change that if you wish.

cintch works on individual files, or folder hierarchies. Some examples:

Check a folder:
cintch -c ~/Documents/0tests
⚠️ no digest found for /Users/hoakley/Documents/0tests/HollyInTree2.jpg
⚠️ no digest found for /Users/hoakley/Documents/0tests/Gardens1.jpg
❌ digests for /Users/hoakley/Documents/0tests/OsborneHouse/HorseCarr.jpg aren’t equal.
❌ digests for /Users/hoakley/Documents/0tests/HollyInTree.jpg aren’t equal.
Checked a total of 65 files in /Users/hoakley/Documents/0tests
61 matched digest correctly
2 didn’t match their digest
2 had no digest.

Retag a folder:
cintch -r ~/Documents/0tests
⚠️ tagged /Users/hoakley/Documents/0tests/HollyInTree2.jpg
⚠️ tagged /Users/hoakley/Documents/0tests/Gardens1.jpg
⚠️ retagged /Users/hoakley/Documents/0tests/OsborneHouse/HorseCarr.jpg
⚠️ retagged /Users/hoakley/Documents/0tests/HollyInTree.jpg
Retagged a total of 65 files in /Users/hoakley/Documents/0tests
61 matched digest correctly
2 were retagged
2 were tagged for the first time.

Check that folder after retagging:
cintch -c ~/Documents/0tests
Checked a total of 65 files in /Users/hoakley/Documents/0tests
65 matched digest correctly
0 didn’t match their digest
0 had no digest.

Check an individual file:
cintch -c ~/Documents/0tests/HollyInTree.jpg
❌ digest for /Users/hoakley/Documents/0tests/HollyInTree.jpg aren’t equal.

Check it after retagging:
cintch -c ~/Documents/0tests/HollyInTree.jpg
✅ digest for /Users/hoakley/Documents/0tests/HollyInTree.jpg

The only two limitations with this first version of cintch are that it isn’t multi-threaded but runs as a single task, and that it doesn’t access Dintch’s optional timestamps.

cintch version 1.0 is notarized for Catalina, and runs on all versions of macOS from El Capitan to Catalina. It’s available from here: cintch1
from Downloads above, and from its Product Page. Please note that if you run it on an older version of Mojave, or earlier macOS, you’ll need to ensure that the Swift runtime support is installed. This is explained in the ReadMe file.