Files
oldlinux-files/Linux-0.98/Yggdrasil-0.98.3/usr/man/man1/cmp.1
2024-02-19 00:21:16 -05:00

43 lines
1.1 KiB
Groff

.TH CMP 1
.SH NAME
cmp \- compare two files
.SH SYNOPSIS
.B cmp
[\-cls] [\-\-show-chars] [\-\-verbose] [\-\-silent] [\-\-quiet] file1 [file2]
.SH DESCRIPTION
This manual page
documents the GNU version of
.BR cmp .
.B cmp
compares the two given files, and if they differ, tells the first
byte and line number where they differ. The file name `-' is always
the standard input. If one file name is omitted, the standard input
is used as well.
.PP
It exits with the value
.TP
0
The files are identical.
.TP
1
The files differ.
.TP
2
An error occurred.
.SS OPTIONS
.TP
.I "\-c, \-\-show-chars"
Print the differing characters like `cat \-t' (except that newlines are
printed as `^J').
.TP
.I "\-l, \-\-verbose"
Print the (decimal) offsets and (octal) values of all differing bytes.
.TP
.I "\-s, \-\-silent, \-\-quiet"
Do not print anything; only return an exit status indicating whether
the files differ.
.PP
The long-named options can be introduced with `+' as well as `\-\-',
for compatibility with previous releases. Eventually support for `+'
will be removed, because it is incompatible with the POSIX.2 standard.