NAME
cmp – compare two files |
SYNOPSIS
cmp [ –lLs ] file1 file2 [ offset1 [ offset2 ] ] |
DESCRIPTION
Cmp compares the two files and prints a message if the contents
differ.
The options are:
If offsets are given, comparison starts at the designated byte
position of the corresponding file. Offsets that begin with 0x
are hexadecimal; with 0, octal; with anything else, decimal. |
SOURCE
/sys/src/cmd/cmp.c |
SEE ALSO
diff(1) |
DIAGNOSTICS
If a file is inaccessible or missing, the exit status is open. If the files are the same, the exit status is empty (true). If they are the same except that one is longer than the other, the exit status is EOF. Otherwise cmp reports the position of the first disagreeing byte and the exit status is differ. |