macOS workflow and shell script to calculate or automatically verify checksums for files or folder contents
macOS workflow and shell script to calculate or automatically verify file checksums
Do you still need to launch third-party software to create or verify checksums? Do you need to copy and paste a checksum to verify it? Do you still use the command line to calculate checksums? Do you verify checksums visually? Do you need to publish file size information, too? Do you need to compare the contents of two folders? Do you have several applications for different tasks? Is there a checksum created with an unusual algorithm you can't verify?
No need for additional tools anymore. Do all the operations you would need (in most cases!) directly from the Finder, thanks to the power of Apple's macOS Services.
Minimum OS: OS X 10.8
adler32
from zlib
)rhash
CLItransmission
CLIgsutil
python CLI.sfv
, .md5
, .sha1
, .sha256
, or .sha512
checksum digests for all files in a selected directory (recursive, without invisibles).sfv
, .md5
, .sha1
, .sha256
, or .sha512
checksum digests for single or multiple files incl. directories (recursive, all files as per digest)openssl
for macOS, so it is not enabled
rhash
) are not (yet?) available for automatic checksum comparison.torrent
files onlyadler32.py
will be created in $HOME/Library/Caches/local.lcars.Checksums/bin
py-mhash
(unsure)crccheck
(unsure)Only necessary if for some reason you want to run this from the shell or another shell script. For normal use the workflow will be sufficient.
checksums.sh
to /usr/local/bin
chmod +x /usr/local/bin/checksums.sh
checksums.sh /path/to/target
Remove the following files or folders:
$HOME/Library/Caches/local.lcars.Checksums
$HOME/Library/Preferences/local.lcars.Checksums.plist
$HOME/Library/Services/Checksums.workflow
/usr/local/bin/checksums.sh
More information: gsutil
python
(v2) with brew install python
(or with a similar manager) which will include pip
gsutil
with pip install gsutil
More information: rhash
brew install rhash
(or with a similar manager)More information: terminal-notifier
You need to have Spotlight enabled for mdfind
to locate the terminal-notifier.app on your volume; if you don't install terminal-notifier, or if you have deactivated Spotlight, the Checksums scripts will call notifications via AppleScript instead
brew install terminal-notifier
(or with a similar manager)terminal-notifier.app
from the Homebrew Cellar to a suitable location, e.g. to /Applications
, /Applications/Utilities
, or $HOME/Applications
More information: transmission
brew install transmission
(or with a similar manager)transmission-show
binary