Blame


1 cfa37a7b 2004-04-10 devnull .TH CMP 1
2 cfa37a7b 2004-04-10 devnull .SH NAME
3 cfa37a7b 2004-04-10 devnull cmp \- compare two files
4 cfa37a7b 2004-04-10 devnull .SH SYNOPSIS
5 cfa37a7b 2004-04-10 devnull .B cmp
6 cfa37a7b 2004-04-10 devnull [
7 cfa37a7b 2004-04-10 devnull .B -lsL
8 cfa37a7b 2004-04-10 devnull ]
9 cfa37a7b 2004-04-10 devnull .I file1 file2
10 cfa37a7b 2004-04-10 devnull [
11 cfa37a7b 2004-04-10 devnull .I offset1
12 cfa37a7b 2004-04-10 devnull [
13 cfa37a7b 2004-04-10 devnull .I offset2
14 cfa37a7b 2004-04-10 devnull ]
15 cfa37a7b 2004-04-10 devnull ]
16 cfa37a7b 2004-04-10 devnull .SH DESCRIPTION
17 cfa37a7b 2004-04-10 devnull The two files are
18 cfa37a7b 2004-04-10 devnull compared.
19 cfa37a7b 2004-04-10 devnull A diagnostic results if the contents differ, otherwise
20 cfa37a7b 2004-04-10 devnull there is no output.
21 cfa37a7b 2004-04-10 devnull .PP
22 cfa37a7b 2004-04-10 devnull The options are:
23 cfa37a7b 2004-04-10 devnull .TP
24 cfa37a7b 2004-04-10 devnull .B l
25 cfa37a7b 2004-04-10 devnull Print the byte number (decimal) and the
26 cfa37a7b 2004-04-10 devnull differing bytes (hexadecimal) for each difference.
27 cfa37a7b 2004-04-10 devnull .TP
28 cfa37a7b 2004-04-10 devnull .B s
29 cfa37a7b 2004-04-10 devnull Print nothing for differing files,
30 cfa37a7b 2004-04-10 devnull but set the exit status.
31 cfa37a7b 2004-04-10 devnull .TP
32 cfa37a7b 2004-04-10 devnull .B L
33 cfa37a7b 2004-04-10 devnull Print the line number of the first differing byte.
34 cfa37a7b 2004-04-10 devnull .PP
35 cfa37a7b 2004-04-10 devnull If offsets are given,
36 cfa37a7b 2004-04-10 devnull comparison starts at the designated byte position
37 cfa37a7b 2004-04-10 devnull of the corresponding file.
38 cfa37a7b 2004-04-10 devnull Offsets that begin with
39 cfa37a7b 2004-04-10 devnull .B 0x
40 cfa37a7b 2004-04-10 devnull are hexadecimal;
41 cfa37a7b 2004-04-10 devnull with
42 cfa37a7b 2004-04-10 devnull .BR 0 ,
43 cfa37a7b 2004-04-10 devnull octal; with anything else, decimal.
44 cfa37a7b 2004-04-10 devnull .SH SOURCE
45 c3674de4 2005-01-11 devnull .B \*9/src/cmd/cmp.c
46 cfa37a7b 2004-04-10 devnull .SH "SEE ALSO"
47 cfa37a7b 2004-04-10 devnull .IR diff (1)
48 cfa37a7b 2004-04-10 devnull .SH DIAGNOSTICS
49 cfa37a7b 2004-04-10 devnull If a file is inaccessible or missing, the exit status is
50 cfa37a7b 2004-04-10 devnull .LR open .
51 cfa37a7b 2004-04-10 devnull If the files are the same, the exit status is empty (true).
52 cfa37a7b 2004-04-10 devnull If they are the same except that one is longer than the other, the exit status is
53 cfa37a7b 2004-04-10 devnull .LR EOF .
54 cfa37a7b 2004-04-10 devnull Otherwise
55 cfa37a7b 2004-04-10 devnull .I cmp
56 cfa37a7b 2004-04-10 devnull reports the position of the first disagreeing byte and the exit status is
57 cfa37a7b 2004-04-10 devnull .LR differ .