Linux cksum Command
The Linux cksum command is used to check whether a file's CRC is correct, ensuring that the file is not damaged during transfer from one system to another.
CRC is an error-checking method whose standard is specified by CCITT; it can detect at least 99.998% of known errors.
After a specified file is checked by the "cksum" command, the command returns a check result for the user to verify that the file is correct. If no filename is specified, or the given filename is "-", the "cksum" command reads data from standard input.
Syntax
cksum [--help][--version][文件...]
Parameters:
- --help: online help.
- --version: display version information.
- file...: the path of the file to be checked
Example
To use the "cksum" command to calculate the integrity of the file "testfile1", enter the following command:
$ cksum testfile1
After the above command executes, it will output the checksum and related information, as shown below:
1263453430 78 testfile1 //输出信息
In the output above, "1263453430" is the checksum and "78" is the byte count.
** Note: **If any character in the file is modified, the calculated CRC checksum value will change.
Linux Command Reference