diff --git a/pages/common/cmp.md b/pages/common/cmp.md index 13af1072b..cc42117f1 100644 --- a/pages/common/cmp.md +++ b/pages/common/cmp.md @@ -3,10 +3,18 @@ > Compare two files byte by byte. > More information: . -- Find the byte and line number of the first difference between two files: +- Output char and line number of the first difference between two files: `cmp {{path/to/file1}} {{path/to/file2}}` -- Find the byte number and differing bytes of every difference: +- Output info of the first difference: char, line number, bytes, and values: -`cmp -l {{path/to/file1}} {{path/to/file2}}` +`cmp --print-bytes {{path/to/file1}} {{path/to/file2}}` + +- Output the byte numbers and values of every difference: + +`cmp --verbose {{path/to/file1}} {{path/to/file2}}` + +- Compare files but output nothing, yield only the exit status: + +`cmp --quiet {{path/to/file1}} {{path/to/file2}}`