dgstsum, md2sum, md4sum, md5sum, mdc2sum, ripemd160sum, shasum, sha1sum

create and check message digests 



dgstsum [-d digesttype] [-bhtvV] [--binary] [--help] [-s string] [--string=string] [--text] [--verbose] [--version] [file...]

dgstsum [-d digesttype] [-c file] [--check=file] [--status] [-w] [--warn]

md2sum [-bhtvV] [--binary] [--help] [-s string] [--string=string] [--text] [--verbose] [--version] [file...]

md2sum [-c file] [--check=file] [--status] [-w] [--warn]

md4sum [-bhtvV] [--binary] [--help] [-s string] [--string=string] [--text] [--verbose] [--version] [file...]

md4sum [-c file] [--check=file] [--status] [-w] [--warn]

md5sum [-bhtvV] [--binary] [--help] [-s string] [--string=string] [--text] [--verbose] [--version] [file...]

md5sum [-c file] [--check=file] [--status] [-w] [--warn]

mdc2sum [-bhtvV] [--binary] [--help] [-s string] [--string=string] [--text] [--verbose] [--version] [file...]

mdc2sum [-c file] [--check=file] [--status] [-w] [--warn]

ripemd160sum [-bhtvV] [--binary] [--help] [-s string] [--string=string] [--text] [--verbose] [--version] [file...]

ripemd160sum [-c file] [--check=file] [--status] [-w] [--warn]

shasum [-bhtvV] [--binary] [--help] [-s string] [--string=string] [--text] [--verbose] [--version] [file...]

shasum [-c file] [--check=file] [--status] [-w] [--warn]

sha1sum [-bhtvV] [--binary] [--help] [-s string] [--string=string] [--text] [--verbose] [--version] [file...]

sha1sum [-c file] [--check=file] [--status] [-w] [--warn]


The dgstsum utility takes each specified input file and produces a checksum called a message digest. By default, dgstsum uses the md5 digest format. Alternatively, it can compare previously generated output to see if the message digests are still the same (that is, the files have not changed).

The md2sum, md4sum, md5sum, mdc2sum, ripemd160sum, shasum, and sha1sum utilities are similar to dgstsum except that instead of specifying the digest format with the -d, the name of the utility identifies the digest format used (for example, the shasum utility uses the sha digest format.



Treats all files as binary. No end-of-file or end-of-line conversions take place. When comparing against text files from UNIX systems, this may yield different checksums.

-c file 

Specifies a check file. This check file contains the output from a previous dgstsum command. Each line in the check file contains a message digest, a flag specifying if the file is binary or text, and a file name. dgstsum opens each listed file, calculates its current message digest and compares it to the corresponding digest from the previous output. As each file's digests are compared, dgstsum displays the file's name and either OK if the digests match or FAILED if they do not. However, the --status option, described below, can suppress this display.


For this option to work correctly, both the previous and new digests must use the same digest format. For example, if you created a saved output file named md2out from a dgstsum -d md2 command, you could use either of the following commands to compare the current digests to those in md2out:

dgstsum -d md2 -c md2out
md2sum -c md2out

-d digesttype 

Specifies the digest format to be used when calculating message digests. The following formats may be specified for digesttype:



rmd160 is simply an another name for the ripemd160 format.


Displays a usage message and exits.

-s string 

Computes the message digest for just the specified string rather than for a file. The message digest generated is identical to that of a file containing just string.


Suppresses the display of file names and either OK or FAILED for each line in the check file. Instead, the utility returns an exit status of 0 when all files in the check file generate the same message digest as in the check file or an exit status of 1 when at least one file generates a different message digest. This option is only applicable with -c or --check.


Treats all input files as text files. This is the opposite of -b. End-of-file and end-of-line conversions are performed so that UNIX and Windows text files whose only differences are the end-of-line characters used produce identical message digests.


This option is not recommended for binary files.


Does nothing. This option is provided for compatibility with other versions of these utilities.


Displays version number.


Displays warnings about malformed lines in the check file specified with the -c (or --check) option. Normally, when this option is not specified, malformed lines are simply ignored.

This option is only applicable with -c or --check.


Possible exit status values are:


Successful completion.


An error occurred or when -c or --check is specified, one or more files listed in the check file now generate a different checksum.


A usage error occurred.


These commands are provided as KornShell executable scripts. MKS cannot be responsible for proper functionality of this code if you alter these scripts (dgstsum.sh, md2sum.sh, md4sum.sh, and so on) in any way.


Windows 7. Windows Server 2008 R2. Windows 8. Windows Server 2012. Windows 10. Windows Server 2016.


PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


openssl dgst

PTC MKS Toolkit 10.1 Documentation Build 15.