Compares two text files.
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
> symbol. Context lines are preceded by the
ed command (
d) that are used to
convert file1 to file2. If
one of the files is
-, standard 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.,
junk is the same as
junk). If both arguments are directories,
diff reports lines that differ between all pairs
of files having equivalent names (e.g.,
newdir/program); in addition,
diff lists filenames unique to one directory, as
well as subdirectories common to both. See also
-n cannot be combined
with one another (they are mutually exclusive).
Treat all files as text files. Useful for checking to see if binary files are identical.
Ignore repeating blanks and end-of-line blanks; treat successive blanks as one.
Ignore blank lines in files.
diff: print 3 lines surrounding each
diff: print n lines
surrounding each changed line. The default context is 3 lines.
Use format to output a line group containing differing lines ...