Linux cksum command - display the CRC checksum value and byte statistics of a file

The Linux cksum command is used to display the CRC checksum value and byte statistics of a file.

Linux cksum command Function Description

Use the cksum command to display the CRC checksum values and byte statistics for each file.

The cksum command is used to check if the CRC of a file is correct and to ensure that the file is not corrupted during the transfer from one system to another. This method requires that the checksum is calculated in the source system and again in the destination system, the two numbers are compared, and if the checksum is equal, the file is considered to have been transferred correctly.

CRC refers to a method of error checking, known as Cyclic Redundancy Checking.

When a file is specified for checksum, the checksum result will be returned for the user to check if the file is correct. If no file name is specified or the given file name is -, the cksum command will read the data from the standard input device.

Linux cksum command Syntax

cksum [file]

Linux cksum command Examples

Display CRC checksums and byte statistics for the /home/deepinout/apidemos.com/ccc.txt file

cksum /home/deepinout/apidemos.com/ccc.txt

Output:

Linux cksum command

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

cksum testfile1            #CRC checksum for specified files

After the above command is executed, the information related to the check code will be output, and the specific output information is shown as follows:

1263453430 78 testfile1     #Output Information

In the above output message, "1263453430" is the check digit and "78" is the number of bytes.

If any character in the file is modified, it will change the value of the calculated CRC checksum.

Like(0)

Related

Linux Login Logout Command
Linux login commandLinux logout commandLinux nologin commandLinux exit commandLinux sulogin commandLinux rlogin commandLinux poweroff commandLinux ctrlaltdel CommandLinux shutdown commandLinux halt commandLinux reboot commandLinux init commandLinux runlevel commandLinux telinit command
Linux File Management Command
Linux cat commandLinux tac commandLinux nl commandLinux more commandLinux less commandLinux head commandLinux tail commandLinux rev commandLinux fold commandLinux fmt commandLinux expand commandLinux pr commandLinux sort commandLinux uniq commandLinux cut commandLinux comm commandLinux diff commandLinux join commandLinux diff3 commandLinux cmp commandLinux colrm commandLinux paste commandLinux mkdir commandLinux tr commandLinux split commandLinux csplit commandLinux tee commandLinux unexpand commandLinux patch commandLinux awk commandLinux sed commandLinux od commandLinux pwd commandLinux cd commandLinux ls commandLinux dir commandLinux dirs commandLinux touch commandLinux rmdir commandLinux cp commandLinux mv commandLinux rm commandLinux install commandLinux tmpwatch commandLinux file commandLinux du commandLinux wc commandLinux tree commandLinux cksum commandLinux md5sum commandLinux sum commandLinux dirname commandLinux mkfifo Command
Cron Expressions
Cron Expression to Run Every Day at 12 PMUnderstanding Vue Cron ExpressionsUnderstanding JS Cron ExpressionsA Comprehensive Guide to Cron Expressions for Scheduled TasksUnderstanding Linux Cron ExpressionsUnderstanding Quartz Cron ExpressionsCron ExpressionCron Time ExpressionCron Expression ParsingCron Expression: Executing a Task Every SecondCron Expression for Every Minute ExecutionCron Expression to Execute Every 10 MinutesCron Expression: Executing Every HourCron Expression to Execute Once a YearCron Expression: How to Schedule a Task to Run Daily at Midnight?