rev(1) on Solnix vs Linux and the BSDs

On Solnix, rev is the illumos rev at /usr/bin/rev. Besides reversing characters on each line, it has -l/--line, which reverses the order of lines instead (like tac). Linux and the BSDs have no such option.

What Solnix runs

A default Solnix system runs the illumos rev at /usr/bin/rev. No other variants are shipped. The page also lists a ksh93 built-in form, rev [-l] [file...], with the same synopsis.

Differences

Compared withTopicWhat differs
all four-l / --lineSolnix rev -l (--line) reverses the order of lines instead of characters. The Linux, FreeBSD, OpenBSD and NetBSD pages document no such option. Their synopses take only files (Linux also takes options). Use tac(1) for line reversal on Linux.
Source: Solnix rev(1) OPTIONS -l, --line; Linux rev(1) SYNOPSIS, SEE ALSO tac(1); FreeBSD/OpenBSD/NetBSD rev(1) SYNOPSIS
Linux-0 / --zeroLinux rev -0 uses the byte '\0' as the line separator. The Solnix page documents no -0 or --zero option.
Source: Linux rev(1) -0, --zero; Solnix rev(1) SYNOPSIS
Linux--help and --versionLinux rev accepts -h/--help and -V/--version. The Solnix page lists only -l/--line and does not document help or version options.
Source: Linux rev(1) -h, -V; Solnix rev(1) OPTIONS
all four'-' as standard inputSolnix documents that a file operand of '-' means standard input, read from the current offset. The Linux, FreeBSD, OpenBSD and NetBSD pages say only that standard input is read when no files are given.
Source: Solnix rev(1) OPERANDS file; Linux/FreeBSD/OpenBSD/NetBSD rev(1) DESCRIPTION
all fourexit statusSolnix documents exit 0 when all files are copied and >0 when one or more fail. The Linux, FreeBSD, OpenBSD and NetBSD pages have no EXIT STATUS section.
Source: Solnix rev(1) EXIT STATUS; Linux/FreeBSD/OpenBSD/NetBSD rev(1) (no EXIT STATUS section)
OpenBSD, NetBSDlocale environmentOpenBSD documents LC_CTYPE: in the C or POSIX locale, or when unset, bytes are reversed rather than characters. The NetBSD page lists LC_ALL with no description. The Solnix page documents no environment variables for rev.
Source: OpenBSD rev(1) ENVIRONMENT LC_CTYPE; NetBSD rev(1) ENVIRONMENT LC_ALL; Solnix rev(1) (no ENVIRONMENT section)
Linuxlong lines and memoryThe Linux page warns that rev buffers a whole wide-character line in memory, so a huge file without line breaks may fail to allocate. The Solnix page does not say how it buffers input.
Source: Linux rev(1) DESCRIPTION; Solnix rev(1) DESCRIPTION

Standards

  • POSIX: rev is not a POSIX.1-2024 utility.
  • Solnix: Interface Stability: Committed. CSI: Enabled.

Writing portable scripts

  • Do not use -l, --line, -0 or --zero in portable scripts. Each exists on only one family. Use tac(1) where available to reverse lines.
  • Plain rev [file ...] works on all five systems. Pass an explicit file or pipe standard input rather than relying on '-', which only the Solnix page documents.

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.