Name

checksum-tools — Generate or verify checksums for a set of files

Setup

Requirements

  • Ruby 1.8.7

  • Rubygems 1.3.6 or greater

Installation

gem install checksum-tools

Synopsis

Usage: checksum-tools [options] [path]
  -a, --action ACTION              Specify action to take
                                   generate|verify
  -c, --config FILE                Load configuration from FILE
  -d, --digest DIGEST              Generate checksums of type DIGEST
  -e, --extension EXT              File extension for digest files
  -f, --filemask MASK              Include files matching MASK
  -n, --no-action                  Dry run; don't execute
  -o, --overwrite                  Overwrite existing digest files
  -q, --quiet                      Hide the progress bar
  -r, --recursive                  Recurse into subdirectories
  -x, --exclude MASK               Exclude files matching MASK
  -D, --digest-types               Show digest types
  -v, --version                    Print version and exit
  -h, --help                       Show this help message

Description

checksum-tools is a dual-purpose tool to generate or verify checksums of various types for a set of files in a given directory.

Options

-a, --action ACTION

Valid choices are generate and verify. In generate mode, a digest file is created for each content file processed. In verify mode, the digests in digest files are verified against the content files and PASS/FAIL information written to standard output. Default: verify.

-c, --config FILE

Load default configuration values from FILE. Default: a file called .checksum-tools in the user’s home directory. Options specified on the command line will override any defaults in the configuration file.

-d, --digest DIGEST

In generate mode, specifies the type of digest to generate. Valid options depend on the Ruby libraries available on the system, but usually include md5, sha1, sha256, sha384, and sha512. Default: md5. Including this option multiple times causes multiple digests to be generated for each file.

-D, --digest-types

Display the available digest types for the specified target directory/path/system.

-e, --extension EXT

The file extension to be appended to the names of content files when generating digest files. Default: .digest.

-f, --filemask MASK

Generate or verify checksums for files matching MASK. Include this option multiple times to match multiple filemasks. Default: * (all files)

-n, --no-action

Dry run — display configuration options and exit.

-o, --overwrite

Overwrite existing digest files with newly-generated ones.

-q, --quiet

Do not display a progress bar for each file generated.

-r, --recursive

Recurse into subdirectories.

-v, --version

Print version number and exit.

-x, --exclude MASK

Exclude files matching MASK from the operation. Can be used to skip a certain subset of files otherwise included using the --filemask option.

-h, --help

Display a simple help message and exit.

Releases

  • 0.6.6 Initial release

  • 0.7.0 Added ability to verify against digest files created by other tools

  • 0.7.1 Added -v / –version switch

  • 0.7.2 Fixed shift error when evaluating .digest files

  • 0.9.0 Added remote openssl invocation capability to generate digests on non-Ruby systems

  • 0.9.1 Slight refactoring of bin/checksum-tools; removed debugging code

  • 0.9.2 Fix gem deployment problem with bundler

  • 0.9.3 Hotfix to revert SFTP/SSH object changes in 0.9.2

  • 0.9.4 [HYDRALABWARE-59] Checksum-tools anomalies

  • 0.9.5 Minor bug fixes and spec tests

  • 1.0.0 Add –openssl command line parameter for self-configuration of remotes

  • 1.0.1 Hotfix for broken spec test

  • 1.0.3 Hotfix for remote paths with spaces in them

  • 1.0.4 Hotfix for remote paths with singles quotes in them

  • 1.0.5 Ensure remote commands are always invoked through bash

  • 1.0.6 Fix remote digest type introspection bug introduced in 1.0.5

  • 1.0.7 Compensate for differences between OpenSSL 0.9.8 and OpenSSL 1.0.0