CMP(C) XENIX System V CMP(C)
Name
cmp - Compares two files.
Syntax
cmp [ -l ] [ -s ] file1 file2
Description
cmp compares two files and, if they are different, displays
the byte and line number of the differences. If file1 is -,
the standard input is used.
The options are:
-l Prints the byte number (decimal) and the differing
bytes (octal) for each difference.
-s Returns an exit code only, 0 for identical files, 1
for different files and 2 for inaccessible or missing
file(s).
This command should be used to compare binary files; use
diff(C) or diff3(C) to compare text files.
See Also
comm(C), diff(C), diff3(C)
Diagnostics
Exit code 0 is returned for identical files, 1 for different
files, and 2 for an inaccessible or missing argument.
Page 1 (printed 2/7/91)