diff - compute `intelligent' differences between two files
diff [{-c | -C lines -e | -f | -u | -U lines}] file1 file2
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.
The following options are supported.
Produce a context diff with 3 lines of context
Produce a context diff with NUM lines of context
Create a script for the ed editor
Like -e but in reverse order (output cannot be processed by ed)
Output a unified diff with 3 lines of context
Output a unified diff with NUM lines of context
Report only whether or not the files differ
Mark-Jason Dominus, <mjd-perl-diff@plover.com>.
<mjd-perl-diff@plover.com>
Visit my diff/LCS web page at http://www.plover.com/~mjd/perl/diff/.
To install PerlPowerTools, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PerlPowerTools
CPAN shell
perl -MCPAN -e shell install PerlPowerTools
For more information on module installation, please visit the detailed CPAN module installation guide.