2016-02-22 20:29:35 -05:00
|
|
|
# cmp
|
|
|
|
|
2021-03-31 12:29:51 +02:00
|
|
|
> Compare two files byte by byte.
|
|
|
|
> More information: <https://www.gnu.org/software/diffutils/manual/html_node/Invoking-cmp.html>.
|
2016-02-22 20:29:35 -05:00
|
|
|
|
2021-03-31 12:29:51 +02:00
|
|
|
- Find the byte and line number of the first difference between two files:
|
2016-02-22 20:29:35 -05:00
|
|
|
|
2021-03-31 12:29:51 +02:00
|
|
|
`cmp {{path/to/file1}} {{path/to/file2}}`
|
2016-02-22 20:29:35 -05:00
|
|
|
|
|
|
|
- Find the byte number and differing bytes of every difference:
|
|
|
|
|
2021-03-31 12:29:51 +02:00
|
|
|
`cmp -l {{path/to/file1}} {{path/to/file2}}`
|