Rev | Line | |
---|
[9] | 1 | .TH CMP 1
|
---|
| 2 | .SH NAME
|
---|
| 3 | cmp \- compare two files
|
---|
| 4 | .SH SYNOPSIS
|
---|
| 5 | \fBcmp\fR [\fB\-ls\fR] \fIfile1 file2\fR
|
---|
| 6 | .br
|
---|
| 7 | .de FL
|
---|
| 8 | .TP
|
---|
| 9 | \\fB\\$1\\fR
|
---|
| 10 | \\$2
|
---|
| 11 | ..
|
---|
| 12 | .de EX
|
---|
| 13 | .TP 20
|
---|
| 14 | \\fB\\$1\\fR
|
---|
| 15 | # \\$2
|
---|
| 16 | ..
|
---|
| 17 | .SH OPTIONS
|
---|
| 18 | .FL "\-l" "Loud mode. Print bytes that differ (in octal)"
|
---|
| 19 | .FL "\-s" "Silent mode. Print nothing, just return exit status"
|
---|
| 20 | .SH EXAMPLES
|
---|
| 21 | .EX "cmp file1 file2" "Tell whether the files are the same"
|
---|
| 22 | .EX "cmp \-l file1 file2" "Print all corresponding bytes that differ"
|
---|
| 23 | .SH DESCRIPTION
|
---|
| 24 | .PP
|
---|
| 25 | Two files are compared.
|
---|
| 26 | If they are identical, exit status 0 is returned.
|
---|
| 27 | If they differ, exit status 1 is returned.
|
---|
| 28 | If the files cannot be opened, exit status 2 is returned.
|
---|
| 29 | If one of the file arguments is \-, then
|
---|
| 30 | \fIstdin\fR is compared to
|
---|
| 31 | the other file.
|
---|
| 32 | .SH "SEE ALSO"
|
---|
| 33 | .BR comm (1),
|
---|
| 34 | .BR diff (1).
|
---|
Note:
See
TracBrowser
for help on using the repository browser.