Friday, August 03, 2007

Display the Checksum and Size for a File

The UNIX cksum command is used to display the checksum and the size of a file. This command is useful in verifying file integrity over noisy transmission lines. Here's an example of its application.

# cksum firefox-1.0-sparc-sun-solaris2.8.tar
2821005393 55203840 firefox-1.0-sparc-sun-solaris2.8.tar

I saw some email traffic from someone asking for methods of verifying files over noisy lines, so I thought this might be a useful post.


Unknown said...

You can also use "digest", for common hashes like md5, sha1 etc.

esofthub said...

Thanks for the input mika.