Howtodojo logo
  • Home 
  • About 
  • Certifications 
  • Sample Database 
  • Cheatsheet 
  • Glossary 
  • Blog 
  • Tags 
  1.   Linux Commands
  1. Home
  2. Guides
  3. Linux Commands
  4. Linux cksum Command

Linux cksum Command

Share via
Howtodojo
Link copied to clipboard

In this tutorial we learn how to use cksum command in Linux. cksum command will print the checksum and byte size of a file.

On this page
What is Linux cksum Command?   cksum Syntax   cksum command linux example   cksum Command Manual / Help   Linux cksum Command Source Code   Related Linux Commands   Summary  

What is Linux cksum Command?  

In this tutorial we learn how to use cksum command in Linux. cksum command is a Linux command which do checksum and count the bytes in a file

cksum Syntax  

cksum [FILE]...
cksum [OPTION]

cksum command linux example  

To use cksum we only need to pass the filename to the command. For our exercise let’s create a new file using echo command below

echo "Hello Howtodojo!" > hello

Now let’s check the checksum of the new file named hello that we just create

cksum hello 
3769020071 17 hello

The first column of the output above is the checksum, The second column is the byte size. Since the text we enter on the hello file consists of 17 characters so it’s 17 bytes in size. The last one is the file name.

cksum Command Manual / Help  

We can use man and info command to see the manual page of cksum command.

cksum command also have

--help option to show list of options.

man page of cksum command can be opened using command below. To exit man or info page you can press q.

man cksum

info page of cksum command can be opened using the command below.

info cksum

help page of cksum command can be printed using the command below.

cksum --help

Linux cksum Command Source Code  

You can find cksum command source code from the folowing repositories:

  • 1. cksum source code on GitHub
  • 2. cksum source code on GNU Savannah cgit
  • 3. cksum source code on GNU Savannah gitweb

Related Linux Commands  

You can read tutorials of related Linux commands below:

  • b2sum command in Linux
  • md5sum command in Linux
  • sha1sum command in Linux
  • sha256sum command in Linux
  • sha384sum command in Linux
  • sha512sum command in Linux

Summary  

In this tutorial we learn how to use cksum in Linux with practical examples. Visit our Linux Commands guide to learn more about using command line interface in Linux.

 Linux hostid Command
Linux groups Command 
On this page:
What is Linux cksum Command?   cksum Syntax   cksum command linux example   cksum Command Manual / Help   Linux cksum Command Source Code   Related Linux Commands   Summary  
Follow me

We publish tutorials, tips and tricks about Linux, open source, cloud computing, and infrastructure

     
Copyright © 2012 - 2025 howtodojo.com. |
Howtodojo
Code copied to clipboard