World Library  
Flag as Inappropriate
Email this Article


Article Id: WHEBN0000821858
Reproduction Date:

Title: Cksum  
Author: World Heritage Encyclopedia
Language: English
Subject: Comparison of file verification software, Checksum, Sum (Unix), UnxUtils, Checksum algorithms
Collection: Checksum Algorithms, Standard Unix Programs, Unix Sus2008 Utilities
Publisher: World Heritage Encyclopedia


cksum is a command in Unix-like operating systems that generates a checksum value for a file or stream of data. The cksum command reads each file given in its arguments, or standard input if no arguments are provided, and outputs the file's CRC checksum and byte count.

The cksum command can be used to verify that files transferred by unreliable means arrived intact.[1] However, the CRC checksum calculated by the cksum command is not cryptographically secure: While it guards against accidental corruption (it is unlikely that the corrupted data will have the same checksum as the intended data), it is not difficult for an attacker to deliberately corrupt the file in a specific way that its checksum is unchanged. Unix-like systems typically include other commands for cryptographically secure checksums, such as sha1sum.


  • Interoperability 1
  • Syntax 2
  • Usage example 3
  • See also 4
  • References 5
  • External links 6


The standard cksum command, as found on most UNIX-like operating systems (including GNU/Linux, *BSD, Mac OS X, and Solaris) uses a CRC algorithm based on the ethernet standard frame check and is therefore interoperable between implementations. It is however not compatible with the CRC-32 calculation. This is in contrast to the sum command, which is not as interoperable. On Tru64 operating systems, the cksum command returns a different CRC value, unless the environment variable CMD_ENV is set to “xpg4”.


cksum [ File ... ]

Usage example

$ cksum test.txt
4038471504 75 test.txt

where "4038471504" represents the checksum value and "75" represents the file size of test.txt.

See also


  1. ^ "cksum: Print CRC checksum and byte counts". Retrieved 2015-07-05. 

External links

This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.