Digest
The digest
program returns a message digest for one or more files.
Example Usage
We list a few examples of the digest
command here to illustrate its usefulness and ease of use. To get started, lets compute the message digest of these files:
digest README.txt digest.rdf
Where digest.rdf
looks something like this:
<?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:digest="http://urban-warrior.org/WizardsToolkit/digest/1.0/"> <rdf:Description rdf:about="README.txt"> <digest:timestamp>2009-01-23T12:25:47-05:00</digest:timestamp> <digest:modify-date>2007-08-25T20:19:02-04:00</digest:modify-date> <digest:create-date>2007-08-25T20:19:02-04:00</digest:create-date> <digest:extent>11476</digest:extent> <digest:sha256>78709afc0de69f51085675329dc44c8b475258c1e7fd29acea078347e641a020</digest:sha256> </rdf:Description> </rdf:RDF>
To determine if any files have been changed, use this command:
digest -authenticate digest.rdf -
Only files that fail to authenticate are listed. Notice the dash at the end of the command line, a dash means print the output to the terminal.
Option Summary
The digest
command recognizes these options. Click on an option to get more details about how that option works.
Option | Description |
---|---|
-authenticate | read message digests from a file and authenticate them |
-debug events | display copious debugging information |
-hash type | compute the message digest with this hash |
-help | print program options |
-log format | format of debugging information |
-version | print version information |