Node:cmp Options, Up:Invoking cmp
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
.
-b
--print-bytes
^
followed by a letter of the alphabet and precede bytes
that have the high bit set with M-
(which stands for "meta").
--help
-i skip
--ignore-initial=skip
from-skip:to-skip
, skip the first from-skip
bytes of the first input file and the first to-skip bytes of the
second.
-l
--verbose
-n count
--bytes=count
-s
--quiet
--silent
-v
--version
In the above table, operands that are byte counts are normally
decimal, but may be preceded by 0
for octal and 0x
for
hexadecimal.
A byte count can be followed by a suffix to specify a multiple of that
count; in this case an omitted integer is understood to be 1. A bare
size letter, or one followed by iB
, specifies a multiple using
powers of 1024. A size letter followed by B
specifies powers
of 1000 instead. For example, -n 4M
and -n 4MiB
are
equivalent to -n 4194304
, whereas -n 4MB
is
equivalent to -n 4000000
. This notation is upward compatible
with the SI prefixes for decimal multiples and with the
IEC 60027-2 prefixes for binary multiples.
The following suffixes are defined. Large sizes like 1Y
may be
rejected by your computer due to limitations of its arithmetic.
kB
k
K
KiB
K
is special: the SI prefix is
k
and the IEC 60027-2 prefix is Ki
, but tradition and
POSIX use k
to mean KiB
.
MB
M
MiB
GB
G
GiB
TB
T
TiB
PB
P
PiB
EB
E
EiB
ZB
Z
ZiB
Zi
is a GNU extension to IEC 60027-2.)
YB
Y
YiB
Yi
is a GNU extension to IEC 60027-2.)