The cksum command is used to check whether the CRC of a file is correct, and to ensure the correctness of the file during the transfer from one system to another. Cyclic Redundancy Check (CRC) is a troubleshooting check method. The standard of the check method is specified by CCITT. At least 99.998% of known errors can be detected.
This method requires that the checksum is calculated separately in the source system and the destination system, and then compared. If the checksums are equal, the file transmission is considered correct. If no file name is specified or the given file name is "-", the command "cksum" will read data from the standard input device.
Syntax: cksum [parameter] [file]
|--version||Display version information|
Calculate the integrity of the file "tempfile":
[root@linuxstar ~]# cksum tempfile 4294967295 0 tempfile
Note: "4294967295" means check code, "0" means number of bytes.