diff reports lines that
differ between file1 and
file2. Output consists of lines of context
from each file, with file1 text flagged by a
< symbol and
file2 text by a
> symbol. Context lines are preceded
by the ed command (
d) that converts
file1 to file2. If one
of the files is
input is read. If one of the files is a directory, diff locates the filename in that
directory corresponding to the other argument (e.g.,
diff my_dir junk is the same as
diff my_dir/junk junk). If both
arguments are directories, diff
reports lines that differ between all pairs of files having
equivalent names (e.g., olddir/program and newdir/program); in addition, diff lists filenames unique to one
directory, as well as subdirectories common to both. See also
cmp, comm, diff3, dircmp, and sdiff.
GNU/Linux and Mac OS X use GNU diff. See http://www.gnu.org/software/diffutils.
cannot be combined with each other (they are mutually
Ignore repeating blanks and end-of-line blanks; treat successive blanks as one.
Produce output in “context diff” format, with three lines of context.
-c, but produce n lines of context.
Merge file1 and file2 into a single file containing conditional C preprocessor directives (
#ifdef). Defining symbol and then compiling yields file2; compiling without defining symbol yields file1 ...