1CMP(1)                      General Commands Manual                     CMP(1)
2
3
4

NAME

6       cmp - compare two files
7

SYNOPSIS

9       cmp [ -l ] [ -s ] file1 file2
10

DESCRIPTION

12       The  two  files  are compared.  (If file1 is `-', the standard input is
13       used.)  Under default options, cmp makes no comment if  the  files  are
14       the  same;  if  they  differ,  it announces the byte and line number at
15       which the difference occurred.  If one file is an  initial  subsequence
16       of the other, that fact is noted.
17
18       Options:
19
20       -l    Print  the  byte number (decimal) and the differing bytes (octal)
21             for each difference.
22
23       -s    Print nothing for differing files; return codes only.
24

SEE ALSO

26       diff(1), comm(1)
27

DIAGNOSTICS

29       Exit code 0 is returned for identical files, 1 for different files, and
30       2 for an inaccessible or missing argument.
31
32
33
34                                                                        CMP(1)
Impressum