2020-12-02 02:31:04 +00:00
|
|
|
.TH CMP 1
|
|
|
|
.SH NAME
|
|
|
|
cmp \- compare two files
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B cmp
|
|
|
|
[\fB\-l\fR|\fB\-s\fR]
|
|
|
|
.IR file1
|
|
|
|
.IR file2
|
|
|
|
.SH DESCRIPTION
|
|
|
|
.B cmp
|
|
|
|
compares two files. If the two files are identical, \fBcmp\fR writes
|
|
|
|
no output. Otherwise, by default, it outputs the byte and line
|
|
|
|
number of the first difference.
|
|
|
|
.PP
|
|
|
|
If the two files are of different lengths, \fBcmp\fR also writes the
|
|
|
|
name of the shorter file to stderr.
|
|
|
|
.SH OPTIONS
|
|
|
|
.TP
|
|
|
|
.BR \-l
|
|
|
|
.TP
|
|
|
|
Outputs the byte number and differing byte for each difference
|
|
|
|
.BR \-s
|
|
|
|
Suppresses all output, even when the files differ. If the two files
|
|
|
|
are of differing lengths, it also suppresses that notice. A
|
|
|
|
difference in the two files is indicated through exit status only.
|
2020-12-13 15:37:24 +00:00
|
|
|
.SH EXIT STATUS
|
|
|
|
.TP
|
|
|
|
.BR 0
|
|
|
|
The files are identical.
|
|
|
|
.TP
|
|
|
|
.BR 1
|
|
|
|
The files are different or are of different lengths.
|
|
|
|
.TP
|
|
|
|
.BR 2
|
|
|
|
Tried to use stdin as both files.
|
|
|
|
.TP
|
|
|
|
.BR 3
|
|
|
|
Not enough file operands.
|
|
|
|
.TP
|
|
|
|
.BR 4
|
|
|
|
Could not open one or both files.
|
2020-12-02 02:31:04 +00:00
|
|
|
.SH AUTHOR
|
|
|
|
Written by Kat.
|
|
|
|
.SH COPYRIGHT
|
2020-12-13 15:37:24 +00:00
|
|
|
Copyright (C) 2020 The FENIX Project
|
2020-12-02 02:31:04 +00:00
|
|
|
.PP
|
|
|
|
This software is free software. Feel free to modify it and/or pass
|
|
|
|
it around.
|