expand(1) on Solnix vs Linux and the BSDs
On a default Solnix system expand is the illumos expand at /usr/bin/expand, documented on one page together with unexpand. It takes only -t tablist, plus the old -tabstop and -tab1,tab2,... forms. It has no GNU long options and no -i (Linux's --initial).
The manual pages
- Solnix: expand(1) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: expand(1) coreutils-full-9.11
- FreeBSD: expand(1) 15.1-RELEASE
- OpenBSD: expand(1) 8.0
- NetBSD: expand(1) 11.0
- Standard: POSIX.1-2024 (IEEE Std 1003.1-2024),
expand
What Solnix runs
A default Solnix system runs the illumos expand at /usr/bin/expand. No other variants are shipped. The Solnix page also documents unexpand, which has -a and -t. The Linux, FreeBSD, OpenBSD and NetBSD pages in the bundle cover both commands except Linux, whose page covers expand only.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux | -i / --initial | Linux expand has -i (--initial), which stops conversion of tabs after non-blank characters. The Solnix expand page documents no such option, only -t and the dash forms.Source: Linux expand(1) -i, --initial; Solnix expand(1) SYNOPSIS and OPTIONS |
| Linux | long options | Linux expand accepts --tabs=N, --initial, --help and --version. Solnix expand documents no long options, so scripts using --tabs= fail there.Source: Linux expand(1) -t, --tabs, --help, --version; Solnix expand(1) SYNOPSIS |
| Linux | tab list syntax | Linux -t LIST accepts a '/' prefix on the last position (tab size after the last stop) and a '+' prefix (relative to the last stop). The Solnix page documents neither.Source: Linux expand(1) -t, --tabs=LIST; Solnix expand(1) -t tablist |
| Linux | tab past the last stop | On Solnix, a tab past the last stop in a multi-stop list is replaced by one space. The Linux page says nothing about this case; it only offers the '/' and '+' prefixes for extending the list. Source: Solnix expand(1) -t tablist; Linux expand(1) -t, --tabs=LIST |
| Linux, FreeBSD, NetBSD | -tabstop and -tab1,tab2,... forms | Solnix expand accepts the tab stops as a dash-prefixed argument without -t, such as -4 or -4,8,12. The Linux, FreeBSD and NetBSD pages document only -t.Source: Solnix expand(1) SYNOPSIS, -tabstop, -tab1,tab2,...,tabn; Linux/FreeBSD/NetBSD expand(1) SYNOPSIS |
| OpenBSD | dash form and repeated -t | OpenBSD also accepts a dash-prefixed tablist without -t, as Solnix does. OpenBSD alone documents repeating -t to set stops at those columns. Solnix passes the list as one -t argument separated by blanks or commas.Source: OpenBSD expand(1) -t tablist; Solnix expand(1) -t tablist |
| NetBSD | -t synopsis | The NetBSD synopsis shows expand with -t tabstop or -t tab1,...,tabn. The DESCRIPTION text describes the tab-stop semantics but has no OPTIONS entry for -t. Solnix gives a full -t entry with the ascending-order rule.Source: NetBSD expand(1) SYNOPSIS, DESCRIPTION; Solnix expand(1) -t tablist |
| OpenBSD | unexpand -t | Solnix unexpand supports -t tablist. OpenBSD unexpand does not: its synopsis is unexpand [-a], and its STANDARDS section says -t is not supported for unexpand.Source: Solnix unexpand -t tablist; OpenBSD unexpand(1) SYNOPSIS, STANDARDS |
| FreeBSD | unexpand -a with -t | On Solnix, giving -t makes unexpand ignore -a, and conversion is no longer limited to leading blanks. The FreeBSD synopsis shows -a and -t as alternatives, [-a | -t ...], and its page does not describe this interaction.Source: Solnix unexpand(1) -t tablist; FreeBSD unexpand(1) SYNOPSIS, -a, -t |
| FreeBSD, OpenBSD, NetBSD | unexpand -t availability | The NetBSD synopsis lists unexpand -t and the FreeBSD synopsis lists it as an alternative to -a. Behaviour of -t with -a is described only in the Solnix page.Source: NetBSD unexpand(1) SYNOPSIS; FreeBSD unexpand(1) SYNOPSIS; Solnix unexpand(1) -t tablist |
| Linux | standard input operand | Linux documents that FILE of - reads standard input. The Solnix page says only that no file means standard input, and does not mention -. Source: Linux expand(1) DESCRIPTION; Solnix expand(1) DESCRIPTION, OPERANDS |
| Linux, OpenBSD, NetBSD | environment variables | Solnix lists LANG, LC_ALL, LC_CTYPE, LC_MESSAGES and NLSPATH. FreeBSD lists LANG, LC_ALL and LC_CTYPE. The Linux, OpenBSD and NetBSD pages in the bundle have no environment section. Source: Solnix expand(1) ENVIRONMENT VARIABLES; FreeBSD expand(1) ENVIRONMENT |
Standards
- POSIX: expand is a POSIX.1-2024 utility.
- Solnix: Interface Stability: Standard. CSI: enabled.
- FreeBSD: expand and unexpand conform to IEEE Std 1003.1-2001 (“POSIX.1”).
- OpenBSD: Compliant with IEEE Std 1003.1-2008 (“POSIX.1”), except that unexpand has no
-tflag. Giving tab stops without-tis not specified by that standard, though it states it “may be present in some implementations”.
Writing portable scripts
- Use expand
-tN or expand-ta,b,c with a comma-separated list. Avoid-i,--tabsand the dash forms such as-4, which only some systems accept. - Do not use unexpand
-tin scripts that must run on OpenBSD, and do not combine it with-a: Solnix ignores-awhen-tis given.
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.