SolarisMD5Sum

How to do an md5sum under Solaris

Linux and a lot of other UNIXes come with the md5sum utility, which performs a checksum (using the MD5 hash function) on a file.

To do the same under Solaris, use the digest command, which performs the same function, but offer additional hashing functions besides MD5.

For instance:

bash-3.00# which prstat
/usr/bin/prstat
bash-3.00# digest -v -a md5 $(which prstat)
md5 (/usr/bin/prstat) = 76b66713137851c1407fd9ea20785bc0

To create a more practical alias, put this into your .profile:

alias md5sum='digest -a md5'

You can also install the "real" md5sum by going to the Sun Freeware site and downloading it from there. It requires the GNU packages libiconv and libgcc, as well as the GNU core utilities (and not the GNU textutils, as I have seen on many sites).

See Also