Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use the common command cksum in Linux

Shulou Source: shulou.com Published: 2022-06-01 17:13:35 11月06日 Update

This article will explain in detail how to use the commonly used Linux command cksum for you. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

The Linux common command cksum command is used to check whether the CRC of the file is correct. Ensure that files are not corrupted during transfer from one system to another.

Syntax cksum [--help] [--version] [file.] Parameters:

-help: online help.

-version: displays version information.

Documents... File path that needs to be checked

The instance uses the instruction "cksum" to calculate the integrity of the file "testfile1". Enter the following command:

After the above command $cksum testfile1 is executed, relevant information such as the check code will be output. The specific output information is as follows:

1263453430 78 testfile1 / / in the output information above, "1263453430" indicates the check code and "78" indicates the number of bytes.

Note: if any character in the file is modified, the value of the calculated CRC check code will be changed.

This is the end of the article on "how to use cksum in Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Tags: Files commands information output frequently used articles more system help check good practical content parameters online help characters bytes integrity instances instructions Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Shulou Technology Shulou Information Xiaomi Linux