PROPHET/OS

NAME

cmp: says whether the two files are the same

SYNOPSIS

cmp [-s] <file> <file>

DESCRIPTION

Says whether the two files are the same. Exit 0 when they are, 1 when they are not, 2 when something could not be read.

With -s it says nothing at all and only the exit code stands, which is what the build uses: three generated heads are written anew only when they really changed.

What it does better than the original

**It names the place in three ways at once:** the byte, the line, and what stands there on both sides. A classic cmp gives byte and line and leaves the reader to look the two bytes up.

**A file that is the start of the other one is said as that**, with the length it ends at, because that is a different finding from a byte that differs in the middle.

EXAMPLE

$ cmp --help
cmp [-s] <file> <file>
  0 when the two are the same, 1 when they are not, 2 on an error
  -s  says nothing, only the exit code