Schily's USER COMMANDS                                COMPARE(1L)


NAME

     compare - fast binary comparison of two files


SYNOPSIS

     compare [ options ] file1 file2


DESCRIPTION

     Compare examines one file and standard in, or two files on a
     byte  by  byte  basis,  and  prints the file position of the
     first difference it finds, first in decimal and then in hex-
     adecimal,  followed by the differing byte content in hexade-
     cimal and as quoted character.

     Compare is similar to the UNIX utility cmp(1) but faster.

     The lines count from 1, the byte offset counts from 0.  This
     is  a  deviation  from the UNIX cmp(1) utility, which counts
     byte offsets beginning from 1.


OPTIONS

     Note all options can be abbreviated to their first letter.

     -all, -a, -long, -l
          Do not stop comparing the files if the first difference
          is found.

     -lines,-L
          Count lines while comparing data.  This slows down  the
          process of comparison by a factor of two.

     begin=#
          Start comparing at byte n, otherwise at byte 0.

     count=#
          Stops after comparing n bytes, otherwise if  the  first
          files encounters EOF.

     -silent
          Does not print messages, just returns the exit code.

     -help
          Prints a short  summary  of  the  compare  options  and
          exists.

     -version
          Prints the compare version number string and exists.


NOTES

     numbers in the options begin=# and count=# are assumed to be
     bytes.  However  typing  the  character 'b' after the number
     means blocks (512 bytes). (E.g. begin=6b count=1000b). Other
     suffixes  may used as for the bs= option in sdd(1) 'k' means

Joerg Schilling       Last change: 01/04/29                     1


Schily's USER COMMANDS                                COMPARE(1L)

     1024 bytes, 'm' means 1024 KBytes.


BUGS


Joerg Schilling       Last change: 01/04/29                     2


Man(1) output converted with man2html


FhG Schily's Home VED powered