FENIX_coreutils/cmp.1

49 lines
1.1 KiB
Groff
Executable File

.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.
.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.
.SH AUTHOR
Written by Kat.
.SH COPYRIGHT
Copyright (C) 2020 The FENIX Project
.PP
This software is free software. Feel free to modify it and/or pass
it around.