2014-11-21 12:03:27 +00:00
|
|
|
.Dd November 21, 2014
|
|
|
|
.Dt CMP 1 sbase\-VERSION
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm cmp
|
|
|
|
.Nd compare two files
|
|
|
|
.Sh SYNOPSIS
|
2015-01-30 20:17:58 +00:00
|
|
|
.Nm
|
2014-11-21 12:03:27 +00:00
|
|
|
.Op Fl l | Fl s
|
|
|
|
.Ar file1 file2
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
|
|
|
compares two files byte by byte. If the files differ,
|
|
|
|
.Nm
|
|
|
|
prints the byte and
|
2011-06-10 00:55:12 +00:00
|
|
|
line number at which the difference occurred.
|
2014-11-21 12:03:27 +00:00
|
|
|
.Sh OPTIONS
|
|
|
|
.Bl -tag -width Ds
|
|
|
|
.It Fl l
|
2014-11-21 13:12:36 +00:00
|
|
|
Print the byte number, and the differing bytes (in octal), for each difference.
|
2014-11-21 12:03:27 +00:00
|
|
|
.It Fl s
|
2014-11-21 13:12:36 +00:00
|
|
|
Print nothing, only returns status.
|
2014-11-21 12:03:27 +00:00
|
|
|
.El
|
|
|
|
.Sh EXIT STATUS
|
|
|
|
.Bl -tag -width Ds
|
|
|
|
.It 0
|
|
|
|
The files are identical.
|
|
|
|
.It 1
|
|
|
|
The files are different.
|
2014-11-21 13:11:48 +00:00
|
|
|
.It > 1
|
2014-11-21 12:03:27 +00:00
|
|
|
An error occured.
|
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr comm 1 ,
|
|
|
|
.Xr diff 1
|
2014-11-21 12:31:23 +00:00
|
|
|
.Sh STANDARDS
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is compliant with the
|
|
|
|
.St -p1003.1-2008
|
|
|
|
specification.
|