cmp file1 file2 gives differemce at byte 11, line 1. i want to check from there so see…
- User
cmp file_1 file_2 gives differemce at byte 11, line 1. i want to check from there so see if there are more diffs?
- Assistant
The
cmpcommand by default stops at the first difference and reports it. If you want to find all differences between two files,cmpalone won't show all differences sequentially by default. However, you can usecmpwith the-loption (that's a lowercase L), which will list all differences byte-by-byte.Using
cmp -lcmp -l file_1 file_2This will display all bytes that differ between the two files, showing the byte number and the differing byte values from each file.