RDIGEST(1)

NAME
rdigest - calculate message digests of files and directories

SYNOPSIS
rdigest [-x directory] algorithm [file ...]

DESCRIPTION
The rdigest utility calculates message digests of files, directories, or, if no file is specified, standard input. The -x option can be used as many times as required to indicate directories not to be included in a directory's hash. This allows you to skip, eg, CVS subdirectories in a given tree, which can have relatively volatile contents not pertinent to the hash.

The list of possible algorithms is:

md5 the md5(3) algorithm will be used.

rmd160
    the rmd160(3) algorithm will be used.

sha1
    the sha1(3) algorithm will be used.

sha256
    the sha256 algorithm will be used.

sha384
    the sha384 algorithm will be used.

sha512
    the sha512 algorithm will be used.

tiger
    the tiger algorithm will be used.

whirlpool
    the whirlpool algorithm will be used.

The rdigest utility is a simple wrapper for the various different algorithm implementations, which are located in the standard C library, and was designed to be scalable as new message digest algorithms are developed. The checksum for a directory is implemented as the hash over a list of one or two hashes for each of the items in the tree.

•   For a file, the string “f” along with the path make up the data for one hash, and the contents of the file is used for the second hash.

•   For a symbolic link, the string “l” along with the path to the symbolic link make up the data for one hash, and the target of the symbolic link is used for the second hash.

•   For a directory, the string “d” along with the path make up the data for one hash. There is no second hash for a directory.

The rdigest utility exits 0 on success, and 0 if an error occurs.

SEE ALSO
cksum(1), digest(1), md5(3), rmd160(3), sha1(3)

HISTORY
The rdigest utility first appeared in NetBSD 2.0.

AUTHORS
The digest(1) utility was written by Alistair G. Crooks agc@netbsd.org. rdigest was implemented by Andrew Brown atatat@netbsd.org as a patch to digest(1) to add recursive capabilities.