134
|
1 <refentry id="cmp">
|
|
2 <refnamediv>
|
|
3 <refname>CMP</refname>
|
|
4 <refpurpose>File Comparison Utility</refpurpose>
|
|
5 </refnamediv>
|
|
6
|
|
7 <refsynopsisdiv>
|
|
8 <cmdsynopsis>
|
|
9 <command>cmp</command>
|
|
10 <arg choice="plain">
|
|
11 &replstart;file1&replend;
|
|
12 </arg>
|
|
13 <arg choice="plain">
|
|
14 &replstart;file2&replend;
|
|
15 </arg>
|
|
16 </cmdsynopsis>
|
|
17 </refsynopsisdiv>
|
|
18
|
|
19 <refsect1><title>Description</title>
|
|
20 <para>
|
|
21 Opens two files and performs a comparison of the binary values of
|
|
22 the corresponding data bytes of the files. If any differences are
|
|
23 encountered, the file offset (address) and the values of the bytes
|
|
24 from each file are displayed in hexadecimal.
|
|
25 </para>
|
|
26 <para>
|
|
27 The comparison ends when end-of-file is encountered on either
|
|
28 file. A summary of the number of bytes compared and the number of
|
|
29 differences found is then displayed.
|
|
30 </para>
|
|
31 </refsect1>
|
|
32 <refsect1><title>Examples</title>
|
|
33 <screen>
|
|
34
|
|
35 OS9: cmp red blue
|
|
36
|
|
37 Differences
|
|
38
|
|
39 byte #1 #2
|
|
40 ======== == ==
|
|
41 00000013 00 01
|
|
42 00000022 B0 B1
|
|
43 0000002A 9B AB
|
|
44 0000002B 3B 36
|
|
45 0000002C 6D 65
|
|
46
|
|
47 Bytes compared: 0000002D
|
|
48 Bytes different: 00000005
|
|
49
|
|
50 OS9: cmp red red
|
|
51
|
|
52 Differences
|
|
53 None ...
|
|
54
|
|
55 Bytes compared: 0000002D
|
|
56 Bytes different: 00000000
|
|
57 </screen>
|
|
58 </refsect1>
|
|
59 </refentry>
|
|
60
|