cat(1) on Solnix vs Linux and the BSDs

On Solnix, cat is the illumos /usr/bin/cat. Its -s flag means "stay silent about non-existent files", whereas Linux, FreeBSD, OpenBSD and NetBSD use -s to squeeze repeated blank lines. Under ksh93, cat can also be a built-in with GNU-style long options.

What Solnix runs

A default Solnix system runs the illumos /usr/bin/cat, which supports only -b, -n, -s, -u, -v, -e and -t. The page also documents a ksh93 cat built-in. ksh93 uses it when cat is run without a path prefix and the path search finds /bin/cat or /usr/bin/cat. The built-in adds -A, -B, -D, -E, -S, -T, -d and long options, and defines -s differently. No other illumos variants are shipped.

Differences

Compared withTopicWhat differs
all four-s meaningSolnix /usr/bin/cat -s makes cat silent about non-existent files. On Linux, FreeBSD, OpenBSD and NetBSD, -s squeezes repeated empty lines into one. A script using cat -s to collapse blank lines gets no squeezing on Solnix.
Source: Solnix cat(1) OPTIONS /usr/bin/cat -s; Linux cat(1) -s; FreeBSD cat(1) -s; OpenBSD cat(1) -s; NetBSD cat(1) -s
all foursqueezing blank lines on Solnix/usr/bin/cat has no option to squeeze blank lines. The ksh93 built-in has -B (--squeeze-blank). Its -s is -S (silent) "for att universe" and -B otherwise. The page does not say which universe applies by default.
Source: Solnix cat(1) SYNOPSIS, OPTIONS ksh93 -B, -s, -S
all four-e and -t need -vOn Solnix /usr/bin/cat, -e and -t are ignored unless -v is also given. On Linux, -e is -vE and -t is -vT. On OpenBSD and NetBSD, -e and -t imply -v. FreeBSD documents -e and -t as also displaying non-printing characters (see -v).
Source: Solnix cat(1) OPTIONS (-e and -t options are ignored if -v is not specified); Linux cat(1) -e, -t; FreeBSD cat(1) -e, -t; OpenBSD cat(1) -e, -t; NetBSD cat(1) -e, -t
Linux-A, -E, -TSolnix /usr/bin/cat does not list -A, -E or -T, which Linux cat has. The ksh93 built-in has them (-A is -vET, -E adds $, -T shows TABs as ^I). The built-in's -T is --show-blank; Linux calls it --show-tabs.
Source: Solnix cat(1) SYNOPSIS, OPTIONS ksh93 -A, -E, -T; Linux cat(1) -A, -E, -T
Linux-uSolnix -u disables output buffering, and the page says buffered output is the default. Linux documents -u as (ignored).
Source: Solnix cat(1) OPTIONS -u; Linux cat(1) -u
FreeBSD, NetBSD-l lock optionFreeBSD and NetBSD cat -l takes an exclusive advisory lock (fcntl F_SETLKW) on standard output. Neither Solnix variant documents -l.
Source: FreeBSD cat(1) -l; NetBSD cat(1) -l; Solnix cat(1) SYNOPSIS
NetBSD-B and -fNetBSD -B bsize sets the read buffer size and -f limits output to regular files. On the Solnix ksh93 built-in, -B takes no argument and squeezes blank lines. /usr/bin/cat has neither flag.
Source: NetBSD cat(1) -B, -f; Solnix cat(1) OPTIONS ksh93 -B
all fourlong optionsOnly the Solnix ksh93 built-in documents long options, such as --number and --show-all. Linux also has long options, plus --help and --version. FreeBSD, OpenBSD and NetBSD have none. /usr/bin/cat on Solnix documents no long options.
Source: Solnix cat(1) OPTIONS ksh93; Linux cat(1) --help, --version; FreeBSD/OpenBSD/NetBSD cat(1) SYNOPSIS
all fourwhat -v leaves aloneSolnix -v leaves tabs, newlines and form feeds as they are. Linux names only LFD and TAB as exceptions. FreeBSD and NetBSD do not mention exceptions, and OpenBSD names tab and EOL.
Source: Solnix cat(1) OPTIONS -v; Linux cat(1) -v; FreeBSD cat(1) -v; OpenBSD cat(1) -v; NetBSD cat(1) -v
FreeBSDUNIX domain socketsFreeBSD cat connects to a UNIX domain socket given as a file operand and reads until EOF. The Solnix page does not mention sockets.
Source: FreeBSD cat(1) DESCRIPTION; Solnix cat(1) OPERANDS
FreeBSDmultibyte charactersFreeBSD documents that cat does not recognize multibyte characters with -t or -v. The Solnix ksh93 built-in treats multibyte characters in the current locale as printable under -v. The /usr/bin/cat text is silent.
Source: FreeBSD cat(1) BUGS; Solnix cat(1) OPTIONS ksh93 -v

Standards

  • POSIX: cat is a POSIX.1-2024 utility.
  • Solnix: ATTRIBUTES: Interface Stability is Committed; Standard: see standards(7).
  • FreeBSD: Compliant with IEEE Std 1003.2-1992 (“POSIX.2”); the flags -belnstv are extensions.
  • OpenBSD: The page says cat is compliant with the specification (no standard named in the text); the flags -benstv are extensions.
  • NetBSD: Expected to conform to IEEE Std 1003.2-1992 (“POSIX.2”); the flags -Bbeflnstv are extensions.

Writing portable scripts

  • Do not use -s in portable scripts. It means silent on Solnix /usr/bin/cat and squeeze-blank elsewhere. To squeeze blank lines, use another tool such as cat -s alternatives that you check per system.
  • Stick to plain cat, -n and -u in portable scripts. Add -v with -e or -t only if you pass -v explicitly, since Solnix /usr/bin/cat ignores -e and -t without it.

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.