Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cksum(1) — HP-UX 9.10

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sum(1)

wc(1)

pdf(4)

cksum(1)

NAME

cksum − print file checksum and sizes

SYNOPSIS

cksum [file ...]

DESCRIPTION

cksum calculates and prints to standard output a checksum for each named file, and also prints the number of octets in each file. 

cksum uses a portable algorithm based on a 32-bit Cyclic Redundancy Check.  This algorithm finds a broader spectrum of errors than the 16-bit algorithms used by sum (see sum(1)). The CRC is the sum of the following expressions, where x is each byte of the file. 

+ x^8 + x^7 + x^5 + x^4 + x^2 + x^1 + x^0 x32 + x26 + x23 + x22 + x16 + x12 + x11 + x10 + x7 + x5 + x4 + x2 + x1 + x0

The results of the calculation are truncated to a 32-bit value.  The number of bytes in the file is also printed. 

Standard input is used if no file names are given. 

cksum is typically used to verify data integrity when copying files between systems. 

EXIT STATUS

Upon completion, cksum returns one of the following values:

 0 All files were processed succesfully. 

>0 One or more files could not be read or some other error occurred. 

If an inaccessible file is encountered, cksum continues processing any remaining files, but the final exit status is affected. 

SEE ALSO

sum(1), wc(1), pdf(4). 

STANDARDS CONFORMANCE

cksum: POSIX.2

Hewlett-Packard Company  —  HP-UX Release 9.10: April 1995

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026