xargs(1) on Solnix vs Linux and the BSDs
On Solnix, xargs is the illumos xargs at /usr/bin/xargs. It has no long options and no -r, -a, -d, -o, -J, -R or -S. Its default logical end-of-file string is an underscore, so an input item of just _ stops reading. GNU xargs on Linux has no default EOF string.
The manual pages
- Solnix: xargs(1) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: xargs(1) findutils-4.10.0
- FreeBSD: xargs(1) 15.1-RELEASE
- OpenBSD: xargs(1) 8.0
- NetBSD: xargs(1) 11.0
- Standard: POSIX.1-2024 (IEEE Std 1003.1-2024),
xargs
What Solnix runs
/usr/bin/xargs is the illumos xargs, published in pkgs.solnix.illumos-world-man. /usr/xpg6/bin/xargs is also shipped. The bundle does not describe how it differs from /usr/bin/xargs.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux | default end-of-file string | Solnix xargs assumes _ as the logical EOF string when neither -e nor -E is given, so a lone _ in the input ends processing. GNU xargs uses no EOF string unless -E or -e is given. Use -E '' or -e on Solnix to turn it off.Source: Solnix xargs(1) -e[eofstr], -E eofstr; Linux xargs(1) -E, -e |
| all four | -r (no run on empty input) | The Solnix SYNOPSIS and OPTIONS have no -r. Linux, FreeBSD, OpenBSD and NetBSD all list -r. On FreeBSD and NetBSD it does nothing, because they already skip the utility on empty input. The Solnix page does not say what happens on empty input.Source: Solnix xargs(1) SYNOPSIS, OPTIONS; Linux xargs(1) -r; FreeBSD xargs(1) -r; NetBSD xargs(1) -r; OpenBSD xargs(1) -r |
| Linux, FreeBSD | long options | Solnix xargs has only single-letter options. Linux has --null, --max-args, --max-procs, --arg-file, --delimiter and others. FreeBSD has --null, --max-args, --max-chars, --max-procs, --verbose, --exit, --interactive and --no-run-if-empty. Scripts using long forms fail on Solnix.Source: Solnix xargs(1) SYNOPSIS; Linux xargs(1) OPTIONS; FreeBSD xargs(1) OPTIONS |
| FreeBSD, OpenBSD, NetBSD | -J, -R, -S and -o | Solnix has none of these. -J places the input at the first occurrence of replstr. -R sets how many arguments -I replaces in. -S (FreeBSD, NetBSD) sets the -I replacement size. -o reopens stdin as /dev/tty in the child.Source: FreeBSD xargs(1) -J, -R, -S, -o; OpenBSD xargs(1) -J, -R, -o; NetBSD xargs(1) -J, -R, -S, -o; Solnix xargs(1) SYNOPSIS |
| Linux | -a and -d | GNU xargs can read items from a file with -a and split on any single character with -d. Solnix xargs has neither. On Solnix, use -0 with a null-separated stream, or redirect stdin.Source: Linux xargs(1) -a, --arg-file, -d, --delimiter; Solnix xargs(1) SYNOPSIS, -0 |
| FreeBSD, OpenBSD, NetBSD | -I replacement limits | On Solnix, -I replaces in at most five arguments, builds arguments of at most 255 bytes, and has no option to change either limit. FreeBSD and NetBSD let -R change the argument count and -S the byte limit. OpenBSD lets -R change the count but keeps 255 bytes.Source: Solnix xargs(1) -I; FreeBSD xargs(1) -I, -R, -S; NetBSD xargs(1) -I, -R, -S; OpenBSD xargs(1) -I, -R |
| FreeBSD, OpenBSD, NetBSD | default sizes | The BSD pages state defaults: -n 5000 and -s of ARG_MAX minus 4096. The Solnix page instead says the argument plus environment lists cannot exceed ARG_MAX minus 2048 bytes. Without -n or -s, the command line is at least LINE_MAX long.Source: Solnix xargs(1) DESCRIPTION, -n, -s; FreeBSD/OpenBSD/NetBSD xargs(1) -n, -s |
| OpenBSD, NetBSD | exit status | OpenBSD and NetBSD document exits 123 (a utility failed), 124 (utility exited 255), 125 (killed by signal), 126, 127 and 1. FreeBSD documents 127, 126 and 1. The visible Solnix text gives no exit-status table, only that exit 255 stops xargs. Source: OpenBSD xargs(1) EXIT STATUS; NetBSD xargs(1) EXIT STATUS; FreeBSD xargs(1) EXIT STATUS; Solnix xargs(1) DESCRIPTION, USAGE |
| Linux | -P details | GNU xargs -P defaults to 1 and handles SIGUSR1 and SIGUSR2 to raise or lower the process count. The Solnix page documents neither the default nor any signals. It says only that -P 0 sets a large upper bound.Source: Linux xargs(1) -P; Solnix xargs(1) -P |
| Linux | deprecated options | The Linux page calls -e, -i and -l deprecated or non-POSIX and recommends -E, -I and -L. The Solnix page documents -e, -i and -l as supported, equivalent to -E, -I and -L.Source: Linux xargs(1) -e, -i, -l; Solnix xargs(1) -e, -i, -l |
Standards
- POSIX: xargs is a POSIX.1-2024 utility.
- OpenBSD: The flags [
-IL] are marked as an X/Open System Interfaces option. The flags [-JoPR] are extensions. The meanings of exit values 123, 124 and 125 were taken from GNU xargs. - Linux: The page says
-Eis POSIX compliant and-eis not. It says-lis deprecated because the POSIX standard specifies-L.
Writing portable scripts
- Use find
-print0| xargs-0and avoid line-based input. It is the one option that works on all five systems for names with blanks or newlines. - Do not rely on
-r, long options,-a,-d,-J,-o,-Ror-S. Use only-0,-E,-I,-L,-n,-P,-p,-s,-tand-x, and set-Eexplicitly because the default EOF string differs.
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.