cksum(1) MPE/iX Shell and Utilities cksum(1)
______________________________________________________________________
NAME
cksum -- compute checksum and byte count for file
SYNOPSIS
cksum [-ciprt] [file...]
DESCRIPTION
cksum calculates and displays a checksum for each input file. A
checksum is an error-checking technique used by many programs as
a quick way to compare files that have been moved from one loca-
tion to another to ensure that no data has been lost. cksum also
displays the number of eight-bit bytes in each file. If you do
not specify any files or you specify - as the file name, cksum
reads the standard input.
cksum differs from sum only in the format of the output. cksum's
output has the form
checksum bytecount filename
where bytecount is the number of bytes in the file.
cksum can calculate checksums in a variety of ways. The default
is compatible with the POSIX.2 standard. You can specify other
algorithms by specifying options. The POSIX standard does not
recognize these algorithms; we provide them for compatibility
with the sum command.
Options
cksum accepts the following options:
-c uses a standard 16-bit Cyclical Redundancy Check (CRC-16).
-i uses the CCITT standard Cyclic Redundancy Check (CRC-CCITT).
Data communications network protocols often use a cyclic
redundancy check to ensure proper transmission. This algo-
rithm is more likely to produce a different sum for inputs
-- the only difference is byte order.
-p uses the POSIX.2 checksum algorithm. This is the default.
-r enables the use of an alternate checksum algorithm which has
the advantage of being sensitive to byte order.
-t produces a line containing the total number of bytes of data
read as well as the checksum of the concatenation of the
input files.
1
cksum(1) MPE/iX Shell and Utilities cksum(1)
______________________________________________________________________
DIAGNOSTICS
Possible exit status values are:
0 Successful completion.
1 An error occurred.
Messages
Message: input file "filename": system error
Cause: See syserror(3).
Action: See syserror(3).
Message: Unknown option "-option"
Cause: You specified an option that is not valid for cksum.
Action: Check the DESCRIPTION section of this man page for a
list of valid cksum options
PORTABILITY
POSIX.2. x/OPEN Portability Guide 4.0.
All of the listed options are extensions to the POSIX standard.
SEE ALSO
cmp(1), diff(1), ls(1), sum(1), wc(1)
MPE/iX NOTES
For information on how the current MPE/iX implementation may
affect the operation of this utility, see Appendix A, MPE/iX
Implementation Considerations.
2