02.05.2013 Views

Description - Mks.com

Description - Mks.com

Description - Mks.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

NAME<br />

cmp — <strong>com</strong>pare two files<br />

SYNOPSIS<br />

cmp [-blsx] file1 file2 [seek1[seek2]]<br />

DESCRIPTION<br />

cmp<br />

cmp <strong>com</strong>pares two files. If either file name is -, cmp reads the standard input for that file. By<br />

default, cmp begins the <strong>com</strong>parison with the first byte of each file. If you specify seek1 and/or<br />

seek2, cmp uses it as a byte offset into file1 or file2 (respectively), and <strong>com</strong>parison begins at that<br />

offset instead of at the beginning of the files. The <strong>com</strong>parison continues (one byte at a time) until a<br />

difference is found, at which point the <strong>com</strong>parison ends and cmp displays the byte and line number<br />

where the difference occurred. cmp numbers bytes and lines beginning with 1.<br />

Options<br />

-b<br />

-l<br />

-s<br />

-x<br />

EXAMPLE<br />

<strong>com</strong>pares single blocks at a time. Normally, cmp reads large buffers of data into memory for<br />

<strong>com</strong>parison.<br />

causes the <strong>com</strong>parison and display to continue to the end. cmp displays the byte number (in<br />

decimal) and the differing bytes (in octal) for each difference found. cmp attempts no<br />

resynchronization.<br />

suppresses output and returns a non-zero status if the files differ.<br />

displays the differing bytes shown by the -l option in hex.<br />

To determine if prog.exe and prog.<strong>com</strong> are instances of the same program (generated, for<br />

example, by exe2bin)<br />

361 of 457

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!