From 1dc747127b5c668f69fd094b752ea44fc4a73360 Mon Sep 17 00:00:00 2001 From: git-em <56173216+git-em@users.noreply.github.com> Date: Sat, 30 Jul 2022 09:05:02 -0300 Subject: [PATCH] cmp: refresh page (#7822) --- pages/common/cmp.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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}}`