1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/cmp.md

13 lines
368 B
Markdown
Raw Normal View History

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}}`