The Full Wiki

Cksum: Wikis


Note: Many of our articles have direct quotes from sources you can cite, within the Wikipedia article! This article doesn't yet, but we're working on it! See more info or our list of citable articles.


(Redirected to cksum article)

From Wikipedia, the free encyclopedia

cksum is a command in Unix-like operating systems that generates a checksum value for a file or stream of data. The cksum command reads the file or files specified as arguments, or standard input if no arguments are provided, and calculates a checksum value, cyclic redundancy check (CRC) and the byte count. The checksum, number of bytes, and file name are written to standard output.

The cksum command can be used to verify the equality of two files on different computers, such as a copy made over noisy transmission lines.[1]. (If the files are on the same computer, equality can be verified with the cmp command.) The comparison made by the cksum command is not cryptographically secure. However, it is unlikely that an accidentally damaged file will produce the same checksum as the original file.



The standard cksum command, as found on most UNIX-like OS (including GNU/Linux, *BSD, Mac OS X, and Solaris) uses a CRC algorithm based on the ethernet standard frame check and is therefore interoperable between implementations. This is in contrast to the sum command, which is not as interoperable. On Tru64 operating systems, the cksum command returns a different CRC value, unless the environment variable CMD_ENV is set to “xpg4”.


cksum [ File ... ]

Usage example

$ cksum test.txt
4038471504 75 test.txt

4038471504 => This represents the check sum value
75 => This represents the file size of test.txt


See also

External links



Got something to say? Make a comment.
Your name
Your email address