CMP(1) | User Commands | CMP(1) |
cmp - compare two files
cmp [-l] [-s] [-w] file1 file2 [skip1 [skip2]]
The two files are compared. (If a file is `-', the standard input is used.) Under default options, cmp makes no comment if the files are the same; if they differ, it announces the byte and line number at which the difference occurred. If one file is an initial subsequence of the other, that fact is noted. If skip1 or skip2 are given, the indicated number of bytes is read from each file before the comparison starts. The skip values may be either decimal or, if beginning with `0', octal.
Options:
The following option is an extension:
diff(1), comm(1)
Exit code 0 is returned for identical files, 1 for different files, 2 for an inaccessible or missing argument.
12/5/04 | Heirloom Toolchest |