Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

diff(1)

comm(1)

sdiff(1)



CMP(1)                  COMMAND REFERENCE                  CMP(1)



NAME
     cmp - compare two files

SYNOPSIS
     cmp [ -l ] [ -s ] filename1 filename2

DESCRIPTION
     The two files are compared.  (If filename1 or filename2 is a
     dash (-), the standard input is used.) When no options are
     specified, cmp makes no comment if the files are the same;
     if they differ, it announces the byte and line number at
     which the difference occurred.  If one file is an initial
     subsequence of the other, that fact is noted.

OPTIONS
     -l  Print the byte number (decimal) and the differing bytes
         (octal) for each difference.

     -s  Print nothing for differing files; return codes only.

EXAMPLES
     The following compares a local version of echo with the
     version in /bin:



          cmp echo /bin/echo


RETURN VALUE
     [NO_ERRS]      Files are identical.

     [1]            Files are different

     [USAGE]        Incorrect command line syntax. Execution
                    terminated.

     [P_ERR]        A system error occurred. Execution
                    terminated.  See intro(2) for more
                    information on system errors.

CAVEATS
     Use of both option flags is identical to a call with no
     options.

SEE ALSO
     diff(1), comm(1), sdiff(1).








Printed 10/17/86                                                1



%%index%%
na:72,59;
sy:131,179;
de:310,509;
op:819,242;
ex:1061,180;
rv:1241,429;
ca:1670,126;
se:1796,121;
%%index%%000000000131

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026