cmp [-Ll] file1 file2 [offset1] [offset2]
If there are no differences, the command produces no output. If a difference is detected, a message is generated to standard output reporting the location of the first different character in the format shown below:
file1 file2 differ: char xxxwhere xxx is in decimal format.
Add the line number to the difference message:|
file1 file2 differ: char xxx line yywhere yy is in decimal format.
Starting at the first difference detected, print a line for each subsequent byte.|
Each line consists of the byte number (decimal) and the corresponding byte values (hexadecimal) from each file.
If one file is shorter, there is an additional line stating on which file the EOF was encountered.