[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
cmp
The cmp
command compares two files, and if they differ, tells the
first byte and line number where they differ. Its arguments are as
follows:
cmp options... from-file [to-file [skip1 [skip2]]] |
The file name `-' is always the standard input. cmp
also
uses the standard input if one file name is omitted.
skip1 and skip2 are the number of bytes to skip in each file. They are equivalent to skip1:skip2 in the --ignore-initial option. skip values may be followed by the following multiplicative suffixes: kB 1000, K 1024, MB 1,000,000, M 1,048,576, GB 1,000,000,000, G 1,073,741,824, and so on for T, P, E, Z, Y.
An exit status of 0 means no differences were found, 1 means some differences were found, and 2 means trouble.
11.1 Options to cmp | Summary of options to cmp . |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
cmp
Below is a summary of all of the options that GNU cmp
accepts.
Most options have two equivalent names, one of which is a single letter
preceded by `-', and the other of which is a long name preceded by
`--'. Multiple single letter options (unless they take an
argument) can be combined into a single command line word: `-bl' is
equivalent to `-b -l'.
cmp
.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |