diff3(1) on Solnix vs Linux and the BSDs
The published Solnix diff3(1) page documents GNU diffutils 3.10, but a default Solnix system runs the illumos /usr/bin/diff3. The illumos version accepts only -e, -x, -E, -X and -3 and uses different exit codes: 1 does not reliably mean conflicts there, as it does in GNU diff3.
The manual pages
What Solnix runs
The page published by pkgs.solnix.diffutils is GNU diffutils 3.10, with -A, -m, -i, -L, -T, -a and long options. A default Solnix system puts the illumos diff3 at /usr/bin/diff3, with the synopsis diff3 [-exEX3] filename1 filename2 filename3. No other illumos variants are shipped. To get the GNU options, install pkgs.solnix.diffutils. The bundle does not say where that binary lands on PATH.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux, FreeBSD, NetBSD | options on the default PATH command | The illumos diff3 on a default Solnix system accepts only -e, -x, -E, -X and -3. The GNU versions on Linux, FreeBSD and NetBSD also take -A, -m, -i, -L, -T, -a, --diff-program and long options. Scripts using them fail on the base command.Source: Solnix (illumos) diff3(1) SYNOPSIS and OPTIONS; Linux diff3(1) OPTIONS; FreeBSD diff3(1); NetBSD diff3(1) |
| Linux, FreeBSD | exit status | illumos documents 0 for success, 1 for 'an error occurred. A difference was found or there was a fatal error', and >1 for a fatal error. GNU diff3 on Linux and FreeBSD returns 1 for conflicts and 2 for trouble. Source: Solnix (illumos) diff3(1) EXIT STATUS; Linux diff3(1) DESCRIPTION; FreeBSD diff3(1) DESCRIPTION |
| all four | exit status warning | The illumos page states that its return values do not work the same as diff(1) or other vendors' versions of diff3. Do not port exit-code checks from other systems unchanged. Source: Solnix (illumos) diff3(1) EXIT STATUS |
| OpenBSD, NetBSD | exit status documentation | The OpenBSD and NetBSD pages document no exit status for diff3, so scripts cannot rely on the manual for it. The Solnix GNU page and illumos page both document one. Source: OpenBSD diff3(1) (no EXIT STATUS section); NetBSD diff3(1) DESCRIPTION; Solnix diff3(1) DESCRIPTION |
| Linux, FreeBSD, NetBSD | -m merge and ed scripts | GNU diff3 has -m to write the merged file directly. The GNU page says this is more robust than using ed for unusual input. The illumos diff3 only produces ed scripts, which you pipe to ed(1) yourself.Source: Solnix diff3(1) -m, DESCRIPTION; Linux diff3(1) -m; Solnix (illumos) diff3(1) DESCRIPTION (ed pipeline example) |
| Linux, FreeBSD, NetBSD | -i missing on illumos | GNU diff3 -i appends w and q commands to ed scripts. The illumos diff3 has no -i. Its page shows adding the commands by hand: (cat script; echo a´1,$pa´) | ed − filename1.Source: Solnix diff3(1) -i; Solnix (illumos) diff3(1) DESCRIPTION; Linux diff3(1) -i |
| OpenBSD | limited option set | OpenBSD diff3 takes only -3, -a, -E, -e, -X and -x, the same as illumos plus -a. It has no long options, -m, -A, -i, -L or -T. OpenBSD describes -a as treating files as ASCII, where GNU says text.Source: OpenBSD diff3(1) SYNOPSIS and -a; Solnix diff3(1) -a |
| all four | lone dot line in -e scripts | The illumos page says text lines consisting of a single dot defeat -e. OpenBSD BUGS says the same, because '.' is an ed command. The GNU pages do not mention this limit; they recommend -m for unusual input.Source: Solnix (illumos) diff3(1) -e; OpenBSD diff3(1) BUGS; Solnix diff3(1) DESCRIPTION (-m) |
| all four | file size limit | The illumos NOTES say files longer than 64 Kbytes do not work. No counterpart page states such a limit. The illumos page also refers to largefile(7) for files of 2 Gbyte or more. Source: Solnix (illumos) diff3(1) NOTES, USAGE; Linux/FreeBSD/OpenBSD/NetBSD diff3(1) |
| OpenBSD | TMPDIR | OpenBSD diff3 uses the directory in TMPDIR for temporary files. The Solnix and illumos pages document no environment variables. Source: OpenBSD diff3(1) ENVIRONMENT; Solnix (illumos) diff3(1) |
| NetBSD | --strip-trailing-cr | NetBSD's page (diffutils 2.8.1) does not list --strip-trailing-cr. The Solnix GNU page (3.10), Linux (3.12) and FreeBSD (2.8.7) list it.Source: NetBSD diff3(1) DESCRIPTION; Solnix diff3(1); Linux diff3(1); FreeBSD diff3(1) |
| Linux | same program as the published page | The Solnix published page and the Linux page describe the same GNU diff3 with identical options. The versions are diffutils 3.10 and 3.12. The default Solnix command is not this program. Source: Solnix diff3(1) footer (diffutils 3.10); Linux diff3(1) footer (diffutils 3.12) |
Standards
- POSIX: diff3 is not a POSIX.1-2024 utility.
- Solnix: illumos diff3 ATTRIBUTES: CSI is Enabled. The page has no STANDARDS section.
- OpenBSD: HISTORY: a diff3 command appeared in Version 7 AT&T UNIX.
Writing portable scripts
- Restrict portable scripts to
-e,-x,-E,-Xand-3, which all four systems document. Avoid-m,-A,-i,-Land-T, which the illumos diff3 lacks. - Do not rely on diff3's exit status to detect conflicts. illumos uses 1 for either a difference or a fatal error, and the OpenBSD and NetBSD pages document no exit status.
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.