Linux "diff3" Command Line Options and Examples
compare three files line by line

Compare three files line by line. Mandatory arguments to long options are mandatory for short options too.



Command Line Options:

output all changes, bracketing conflicts
diff3 -A ...
output ed script incorporating changes from OLDFILE to YOURFILE into MYFILE
diff3 -e ...
like -e, but bracket conflicts
diff3 -E ...
like -e, but incorporate only nonoverlapping changes
diff3 -3 ...
like -e, but incorporate only overlapping changes
diff3 -x ...
but bracket conflicts
diff3 -X ...
append 'w' and 'q' commands to ed scripts
diff3 -i ...
output actual merged file, according to -A if no other options are given
diff3 -m ...
treat all files as text
diff3 -a ...
strip trailing carriage return on input
diff3 --strip-trailing-cr ...
make tabs line up by prepending a tab
diff3 -T ...
use PROGRAM to compare files
diff3 --diff-program ...
use LABEL instead of file name (can be repeated up to three times)
diff3 -L ...
display this help and exit
diff3 --help ...
output version information and exitThe default output format is a somewhat human-readable representation of the changes.The -e, -E, -x, -X (and corresponding long) options cause an ed script to be output instead of the default.Finally, the -m (--merge) option causes diff3 to do the merge internally and output the actual merged file. For unusual input, thisis more robust than using ed.If a FILE is '-', read standard input. Exit status is 0 if successful, 1 if conflicts, 2 if trouble.AUTHORWritten by Randy Smith.REPORTING BUGSReport bugs to: bug-diffutils@gnu.orgGNU diffutils home page: <>General help using GNU software: <>COPYRIGHTCopyright © 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <>.This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
diff3 -v ...