File:  [Research Unix] / researchv10dc / man / adm / man1 / cmp.1
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Dan Cross

.TH CMP 1 
.CT 1 files
.SH NAME
cmp \- compare two files
.SH SYNOPSIS
.B cmp
[
.B -lsL
]
.I file1 file2
[
.I offset1
[
.I offset2
]
]
.SH DESCRIPTION
The two files are
compared.
If the contents differ a diagnostic results, otherwise
there is no output.
.PP
The options are:
.TP
.B l
Print the byte number (decimal) and the
differing bytes (octal) for each difference.
.TP
.B s
Print nothing for differing files,
but set the return code.
.TP
.B L
Print the line number of the first differing byte.
.PP
If offsets are given,
comparison starts at the designated byte position
of the corresponding file.
Offsets that begin with
.B 0x
are hexadecimal;
with
.BR 0 ,
octal; with anything else, decimal.
.SH "SEE ALSO"
.IR diff (1), 
.IR comm (1)
.SH DIAGNOSTICS
.I Cmp
reports `EOF' and identifies the file if one file is short.
It reports the number of the first disagreeing byte if contents differ.
The return code is 0 for identical
files, 1 for different files, and 2 for an
inaccessible or missing argument.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.