Sign in

diff3(1) on Solnix vs Linux and the BSDs

On Solnix, diff3 is the illumos /usr/bin/diff3, which takes only -e, -x, -E, -X and -3 and has no merge mode. Its exit status 1 means a difference or an error, unlike Linux and FreeBSD diff3, and its page says files over 64 Kbytes do not work.

What Solnix runs

/usr/bin/diff3 is the illumos diff3; no other illumos variants are shipped. diffutils diff3(1) is available from pkgs.solnix.diffutils; it is not on PATH by default.

Differences

Compared withTopicWhat differs
Linux, FreeBSD, NetBSD-m merge modeSolnix diff3 has no -m. Linux, FreeBSD and NetBSD diff3 -m writes the merged file directly. On Solnix you must generate an ed script and run it through ed(1).
Source: illumos diff3(1) SYNOPSIS, OPTIONS; Linux diff3(1) -m; FreeBSD diff3(1) -m; NetBSD diff3(1) -m
Linux, FreeBSD, NetBSD-A show-allSolnix diff3 has no -A. On Linux, FreeBSD and NetBSD, -A outputs all changes and brackets conflicts. Solnix only offers -E and -X for bracketing.
Source: illumos diff3(1) SYNOPSIS, OPTIONS; Linux diff3(1) -A; FreeBSD diff3(1) -A; NetBSD diff3(1) -A
Linux, FreeBSD, NetBSDlong options and extra flagsSolnix diff3 documents no long options and none of -i, -L, -T, -a or --diff-program. Linux, FreeBSD and NetBSD document all of these.
Source: illumos diff3(1) SYNOPSIS; Linux diff3(1) OPTIONS; FreeBSD diff3(1) OPTIONS; NetBSD diff3(1) OPTIONS
OpenBSD-a on OpenBSDOpenBSD diff3 has -a (treat all files as ASCII), which the Solnix page does not list; otherwise the two share the -3, -e, -E, -x and -X letters.
Source: OpenBSD diff3(1) SYNOPSIS, -a; illumos diff3(1) SYNOPSIS
Linux, FreeBSDexit statusLinux and FreeBSD diff3 exit 0 on success, 1 on conflicts and 2 on trouble. Solnix exits 1 for a difference or a fatal error and above 1 for a fatal error, and says its values differ from diff(1) and other vendors' diff3.
Source: illumos diff3(1) EXIT STATUS; Linux diff3(1) DESCRIPTION (last paragraph); FreeBSD diff3(1) DESCRIPTION (last paragraph)
all four64 Kbyte file limitThe Solnix page says files longer than 64 Kbytes do not work. None of the Linux, FreeBSD, OpenBSD or NetBSD pages states such a limit.
Source: illumos diff3(1) NOTES; Linux, FreeBSD, OpenBSD and NetBSD diff3(1) DESCRIPTION
Linux, FreeBSD, NetBSDed scripts and -iThe Solnix page applies an ed script by appending a command to it before piping it into ed(1). Linux, FreeBSD and NetBSD diff3 have -i to append the w and q commands to the script.
Source: illumos diff3(1) DESCRIPTION (ed example); Linux diff3(1) -i; FreeBSD diff3(1) -i; NetBSD diff3(1) -i
Linux, FreeBSD, NetBSDstandard inputLinux, FreeBSD and NetBSD pages say a FILE of - reads standard input. The Solnix page does not say whether - is supported.
Source: Linux diff3(1) DESCRIPTION (last paragraph); FreeBSD diff3(1) DESCRIPTION; NetBSD diff3(1) DESCRIPTION; illumos diff3(1) SYNOPSIS, DESCRIPTION
OpenBSDTMPDIROpenBSD diff3 uses TMPDIR as its temporary directory. The Solnix page has no ENVIRONMENT section.
Source: OpenBSD diff3(1) ENVIRONMENT; illumos diff3(1) (no ENVIRONMENT section)
Linuxsame program as the diffutils alternativeThe diff3 from pkgs.solnix.diffutils has the same synopsis and options as the Linux diff3 page (diffutils 3.10 against 3.12): it is the same program. The default /usr/bin/diff3 is the illumos one.
Source: Solnix diff3(1) from pkgs.solnix.diffutils SYNOPSIS, OPTIONS; Linux diff3(1) SYNOPSIS, OPTIONS

Everyday tasks

TaskSolnixLinuxFreeBSDOpenBSDNetBSD
compare three filesdiff3 filename1 filename2 filename3diff3 myfile oldfile yourfilediff3 myfile oldfile yourfilediff3 file1 file2 file3diff3 myfile oldfile yourfile
output an ed script of the changesdiff3 -e filename1 filename2 filename3diff3 -e myfile oldfile yourfilediff3 -e myfile oldfile yourfilediff3 -e file1 file2 file3diff3 -e myfile oldfile yourfile
ed script, overlapping changes bracketeddiff3 -E filename1 filename2 filename3diff3 -E myfile oldfile yourfilediff3 -E myfile oldfile yourfilediff3 -E file1 file2 file3diff3 -E myfile oldfile yourfile
ed script of only overlapping changesdiff3 -x filename1 filename2 filename3diff3 -x myfile oldfile yourfilediff3 -x myfile oldfile yourfilediff3 -x file1 file2 file3diff3 -x myfile oldfile yourfile
ed script of only nonoverlapping changesdiff3 -3 filename1 filename2 filename3diff3 -3 myfile oldfile yourfilediff3 -3 myfile oldfile yourfilediff3 -3 file1 file2 file3diff3 -3 myfile oldfile yourfile

Standards

  • POSIX: diff3 is not a POSIX.1-2024 utility.
  • Solnix: ATTRIBUTES: CSI is Enabled.

Writing portable scripts

  • Use only -e, -E, -x, -X and -3 with three file arguments if the script must run on Solnix's default diff3. Do not use -m, -A, -L or long options.
  • Do not rely on the diff3 exit status to detect conflicts: Solnix returns 1 for a difference or an error, while Linux and FreeBSD diff3 use 1 for conflicts and 2 for trouble.

Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.