TEXT   92

cmp.txt

Guest on 1st August 2021 05:53:50 PM

  1. SYNOPSIS
  2.      cmp [-l | -s] file1 file2 [skip1 [skip2]]
  3.  
  4.  
  5.  
  6. DESCRIPTION
  7.      The cmp utility compares two files of any type and writes the results
  8. to
  9.      the standard output.  By default, cmp is silent if the files are the
  10.      same; if they differ, the byte and line number at which the first
  11. differ-
  12.      ence occurred is reported.
  13.  
  14.      Bytes and lines are numbered beginning with one.
  15.  
  16.      The following options are available:
  17.  
  18.      -l    Print the byte number (decimal) and the differing byte values
  19. (oc-
  20.            tal) for each difference.
  21.  
  22.      -s    Print nothing for differing files; return exit status only.
  23.  
  24.      The optional arguments skip1 and skip2 are the byte offsets from the
  25. be-
  26.      ginning of file1 and file2, respectively, where the comparison will
  27. be-
  28.      gin.  The offset is decimal by default, but may be expressed as an
  29. hex-
  30.      adecimal or octal value by preceding it with a leading ``0x'' or
  31. ``0''.
  32.  
  33.      The cmp utility exits with one of the following values:
  34.  
  35.      0     The files are identical.
  36.  
  37.      1     The files are different; this includes the case where one file
  38. is
  39.            identical to the first part of the other.  In the latter case,
  40. if
  41.            the -s option has not been specified, cmp writes to standard
  42. output
  43.            that EOF was reached in the shorter file (before any
  44. differences
  45.            were found).
  46.  
  47.      >1    An error occurred.
  48.  
  49.  
  50.  
  51. SEE ALSO
  52.      diff(1),  diff3(1)
  53.  
  54.  
  55.  
  56. STANDARDS
  57.      The cmp utility is expected to be IEEE Std1003.2 (``POSIX'')
  58. compatible.
  59.  
  60. BSD Experimental                                                
  61. 1
  62. ;1H

Raw Paste


Login or Register to edit or fork this paste. It's free.