
120
|
Chapter 3: Linux Commands
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
-v, --version
Print version number of this version of diff.
-w, --ignore-all-space
Ignore all whitespace in files for comparisons.
-W n, --width=n
For two-column output (-y), produce columns with a
maximum width of n characters. Default is 130.
-x regexp, --exclude=regexp
Do not compare files in a directory whose names match
regexp.
-X filename, --exclude-from=filename
Do not compare files in a directory whose names match
patterns described in the file filename.
-y, --side-by-side
Produce two-column output.
-n For context and unified diff, print n lines of context. Same as
specifying a number with -C or -U.
diff3
diff3 [options] file1 file2 file3
Compare three files and report the differences. No more than one
of the files may be given as - (indicating that it is to be read from
standard input). The output is displayed with the following codes:
= = = =
All three files differ.
= = = =1
file1 is different.
= = = =2
file2 is different.
= = = =3
file3 is different.
diff3 is also designed to merge changes in two differing files based
on a common ancestor file (i.e., when two people have made their
own set of changes to the same file). diff3 can find changes
between the ancestor and one of the newer files and generate
output that adds those differences to the other new file. Unmerged ...