NAME

diff - compute `intelligent' differences between two files

SYNOPSIS

diff [-c | -C lines | -e | -f | -q | -u | -U lines] file1 file2

DESCRIPTION

The diff command compares file1 and file2, producing a listing on standard output describing how to convert one file to the other. Various formats are available for representing the file changes. By default the output is in the traditional UNIX diff format.

Two directories cannot be compared. If either file1 or file2 is a directory, diff is applied to the non-directory file and a file of the same name within the directory.

OPTIONS

The following options are supported.

-c

Produce a context diff with 3 lines of context

-C NUM

Produce a context diff with NUM lines of context

-e

Create a script for the ed editor

-f

Like -e but in reverse order (output cannot be processed by ed)

-u

Output a unified diff with 3 lines of context

-U NUM

Output a unified diff with NUM lines of context

-q

Report only whether or not the files differ

AUTHOR

Mark-Jason Dominus, <mjd-perl-diff@plover.com>.

Visit my diff/LCS web page at http://www.plover.com/~mjd/perl/diff/.