Easy Tutorial
❮ Linux Comm Insmod Linux Comm Dmesg ❯

Linux cksum Command

Linux Command Manual

The Linux cksum command is used to check the CRC of a file for correctness. It ensures that the file is not corrupted during transmission from one system to another.

CRC is an error-checking method, and the standard for this checksum method is specified by CCITT, which can detect at least 99.998% of known errors.

When a file is submitted to the "cksum" command for verification, it returns the checksum result for the user to verify the file's correctness. If no file name is specified or the given file name is "-", the "cksum" command reads data from the standard input device.

Syntax

cksum [--help][--version][file...]

Parameters:

Example

To calculate the integrity of a file named "testfile1" using the "cksum" command, enter the following command:

$ cksum testfile1

After executing the above command, it will output checksum and other related information, as shown below:

1263453430 78 testfile1         // Output information

In the above output, "1263453430" represents the checksum, and "78" represents the number of bytes.

Note: Any modification to the characters in the file will change the value of the CRC checksum calculated.

Linux Command Manual

❮ Linux Comm Insmod Linux Comm Dmesg ❯