DIFF3(1)
๐ diff3(1) โ the girlies' guide to three-way file comparison ๐
okay so bestie, welcome to diff3, a real one from the User Commands section of the manual. this is the tool you call when you've got three versions of the same file and you need to know who changed what. no cap, it's iconic. ๐
โจ NAME โจ
diff3 โ compare three files line by line ๐ฆ
๐ธ SYNOPSIS ๐ธ
diff3 [OPTION]... MYFILE OLDFILE YOURFILE
๐ DESCRIPTION ๐
okay so the whole vibe is: you feed it three files, it compares them line by line. that's the entire job. simple. slay. โญ
also, real talk: mandatory arguments to long options are mandatory for short options too. meaning if a long option needs a value, its short twin needs one too. periodt. ๐
โจ OPTIONS โจ (the whole menu, bestie, nothing skipped)
-A,--show-allโ spits out all the changes, and wraps the conflicts in brackets so you can spot them ๐-e,--edโ outputs anedscript that folds the changes going from OLDFILE to YOURFILE straight into MYFILE-E,--show-overlapโ literally like-e, except it brackets the conflicts ๐-3,--easy-onlyโ like-e, but only incorporates the changes that don't overlap. easy mode fr fr-x,--overlap-onlyโ like-e, but only incorporates the changes that do overlap-Xโ like-x, but it brackets conflicts-iโ appendswandqcommands onto the ed scripts-m,--mergeโ outputs the actual merged file, and it behaves according to-Aif you didn't give it any other options-a,--textโ treats all the files as text, no matter what they look like--strip-trailing-crโ strips the trailing carriage return off the input-T,--initial-tabโ makes tabs line up by prepending a tab--diff-program=PROGRAMโ uses PROGRAM to compare the files-L,--label=LABELโ uses LABEL instead of the file name (you can repeat this up to three times)--helpโ displays this help and dips out-v,--versionโ outputs version info and dips out
๐ฆ the output formats, explained ๐ฆ
so by default, the output format is a somewhat human-readable representation of the changes. that's the default vibe, that's what you get if you ask for nothing. โจ
the -e, -E, -x, -X options โ and their long-option twins โ make it output an ed script instead of that default. iykyk.
and finally, the -m (--merge) option makes diff3 do the merge internally and output the actual merged file. for unusual input, this is more robust than using ed. lowkey a glow-up. ๐
๐ the fine print, don't skip it ๐
if a FILE is -, it reads from standard input. bestie please remember this one.
exit status is:
0โ if successful ๐ซถ1โ if conflicts ๐ญ2โ if trouble ๐
โญ AUTHOR โญ
Written by Randy Smith. king behavior, honestly.
๐ฎ REPORTING BUGS ๐ฎ
found a bug? don't be shy, tell the maintainers:
- Report bugs to:
bug-diffutils@gnu.org - GNU diffutils home page: <https://www.gnu.org/software/diffutils/>
- General help using GNU software: <https://www.gnu.org/gethelp/>
๐ COPYRIGHT ๐
Copyright ยฉ 2025 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
this is free software: you are free to change and redistribute it. there is NO WARRANTY, to the extent permitted by law.
๐ SEE ALSO ๐
the full documentation for diff3 is maintained as a Texinfo manual. if the info and diff3 programs are properly installed at your site, the command
info diff3
should give you access to the complete manual. go read it, it's giving scholar. ๐โจ
and that's the whole page, bestie ๐ this one came from diffutils 3.12, dated April 2025 โ mwah, sending you off with that footer energy. bye bestie, go merge something ๐๐ฆ๐ธ
๐ฆ where this page comes from
- alpine 3.22: diffutils-doc 3.12-r0 ยท GPL-3.0-or-later
- alpine 3.23: diffutils-doc 3.12-r0 ยท GPL-3.0-or-later
- alpine 3.24: diffutils-doc 3.12-r0 ยท GPL-3.0-or-later
- arch rolling: diffutils 3.12-2 ยท GPL-3.0-or-later
- fedora 43: diffutils 3.12-3.fc43 ยท GPL-3.0-or-later
- fedora 44: diffutils 3.12-5.fc44 ยท GPL-3.0-or-later
- nixos 26.05: diffutils 3.12
- nixos 26.05: diffutils-static 3.12
- nixpkgs unstable: diffutils 3.12
- opensuse-leap 16.0: diffutils 3.12-160000.2.2 ยท GFDL-1.2-only AND GPL-3.0-or-later
- opensuse-leap 16.0: diffutils 3.12-160000.2.2 ยท GFDL-1.2-only AND GPL-3.0-or-later
- opensuse-leap 16.0: diffutils 3.12-160000.2.2 ยท GFDL-1.2-only AND GPL-3.0-or-later
- opensuse-leap 16.0: diffutils 3.12-160000.2.2 ยท GFDL-1.2-only AND GPL-3.0-or-later
- ubuntu resolute: diffutils 1:3.12-1 ยท GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms