


CMP(1)                   USER COMMANDS                     CMP(1)



NAME
     cmp - perform a byte-by-byte comparison of two files

SYNOPSIS
     cmp [ -ls ] _f_i_l_e_n_a_m_e_1 _f_i_l_e_n_a_m_e_2 [ _s_k_i_p_1 ] [ _s_k_i_p_2 ]

DESCRIPTION
     cmp compares _f_i_l_e_n_a_m_e_1 and _f_i_l_e_n_a_m_e_2.  If _f_i_l_e_n_a_m_e_1 is  `-',
     the  standard  input is used.  With no options, cmp makes no
     comment if the files  are  the  same;  if  they  differ,  it
     reports  the  byte  and  line number at which the difference
     occurred, or, that one file is an initial subsequence of the
     other.   _s_k_i_p_1  and  _s_k_i_p_2  are  initial  byte  offsets into
     _f_i_l_e_n_a_m_e_1 and _f_i_l_e_n_a_m_e_2  respectively,  and  may  be  either
     octal or decimal; a leading 0 denotes octal.

OPTIONS
     -l   Print the byte number (in decimal)  and  the  differing
          bytes  (in  octal)  for all differences between the two
          files.

     -s   Silent. Print nothing for  differing  files;  set  exit
          codes only.

SEE ALSO
     comm(1), diff(1)

DIAGNOSTICS
     Exit code 0 is returned for identical files, 1 for different
     files,  and  2 for an inaccessible or missing argument, or a
     system error.
























Sun Release 4.1   Last change: 23 November 1987                 1



