.\" Copyright (c) 1987, 1990 The Regents of the University of California.
.\" %sccs.include.redist.man%
.\" @(#)cmp.1 6.4 (Berkeley) %G%
The cmp utility compares two files of any type and
writes the results to the standard output.
if the files are the same; if they
differ, the byte and line
number at which the first difference occurred is reported.
lines are numbered beginning with one.
The following options are available:
Print the byte number (decimal) and the differing
byte values (octal) for each difference, respectively.
Print nothing for differing files; return exit
The following operands are available:
A pathname of the first file to be compared.
the standard input is used.
A pathname of the second file to be compared.
utility exits with one of the following values:
The files are different; this includes the case
where one file is identical to the first part of
In the latter case, if the
not been specified, cmp writes to standard error
that EOF was reached in the shorter file (before
any differences were found).
function is expected to be POSIX 1003.2 compatible.
This manual page is derived from the POSIX 1003.2 manual page.