SYNOPSIS
cmp [-l] [-s] [-w] file1 file2 [skip1 [skip2]]
DESCRIPTION
The two files are compared. (If a file is `-', the standard input is
used.) Under default options, cmp makes no comment if the files are
the same; if they differ, it announces the byte and line number at
which the difference occurred. If one file is an initial subsequence
of the other, that fact is noted. If skip1 or skip2 are given, the
indicated number of bytes is read from each file before the comparison
starts. The skip values may be either decimal or, if beginning with
`0', octal.
Options:
-l Print the byte number (decimal) and the differing bytes (octal)
for each difference.
-s Print nothing for differing files; return codes only.
The following option is an extension:
-w For each difference, the surrounding 8-byte unit, measured from
the beginning of the file, is printed for both files as a 64-bit
MSB integer in octal, and as a byte string, with non-ASCII and
control characters replaced by an underscore.
SEE ALSO
diff(1), comm(1)
DIAGNOSTICS
Exit code 0 is returned for identical files, 1 for different files, 2
for an inaccessible or missing argument.
Heirloom Toolchest 12/5/04 CMP(1)
Man(1) output converted with
man2html