cmp (compare files)

team bbl


Compares two files to see whether they are the same. This command is used to compare binary files. To compare text files, use the diff command.

 Format:    cmp file1 file2 Examples:  cmp prog1 prog2 

The output depends on the options used.

Opt

What It Does

Example

-c

Display differing bytes as characters

cmp -c file1 file2

-l

Display location of differing bytes

cmp -l file1 file3

-s

Display nothing; return exit codes:

0=identical; 1=different; 2=inaccessible

cmp -s file77 prog3


    team bbl



    Spring Into Linux
    Spring Into Linux
    ISBN: 0131853546
    EAN: 2147483647
    Year: 2005
    Pages: 362
    Authors: Janet Valade

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net