pr(1) on Solnix vs Linux and the BSDs
On Solnix, pr is the illumos pr at /usr/bin/pr, with an XPG4 variant at /usr/xpg4/bin/pr. The biggest trap is -F. On Solnix /usr/bin/pr it folds long lines, while on Linux and the BSDs it selects form feeds. Linux also uses -c, -T and -D for different things.
The manual pages
- Solnix: pr(1) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: pr(1) coreutils-full-9.11
- FreeBSD: pr(1) 15.1-RELEASE
- OpenBSD: pr(1) 8.0
- NetBSD: pr(1) 11.0
- Standard: POSIX.1-2024 (IEEE Std 1003.1-2024),
pr
What Solnix runs
A default Solnix system runs the illumos /usr/bin/pr. /usr/xpg4/bin/pr is also shipped. Its synopsis accepts -c column as a synonym for -column, and it lists no -F. The -F and -i entries appear under 'supported for /usr/bin/pr only'. The bundle text is trimmed after -i, so any further differences between the two variants are not shown.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| all four | -F meaning | Solnix /usr/bin/pr -F folds input lines to the column width, or to an 80-column line width in single-column mode. On Linux, FreeBSD, OpenBSD and NetBSD, -F uses form feeds between pages. Solnix -f is the form-feed option.Source: Solnix pr(1) -F (/usr/bin/pr only), -f; Linux pr(1) -F, -f, --form-feed; FreeBSD pr(1) -F; OpenBSD pr(1) -F; NetBSD pr(1) -F |
| all four | -f and pausing | Solnix -f uses form feeds and pauses before the first page when stdout is a terminal. FreeBSD and NetBSD match this. OpenBSD -f is the same as -F, with no pause stated. Linux -f is the same as -F, with no pause stated.Source: Solnix pr(1) -f; FreeBSD pr(1) -f; NetBSD pr(1) -f; OpenBSD pr(1) -f; Linux pr(1) -F, -f |
| Linux | -c meaning | On Linux, -c (--show-control-chars) prints control characters in hat notation such as ^G. The Solnix /usr/xpg4/bin/pr synopsis uses -c column for the column count, and the Solnix text shown has no control-character option. Linux also has -v for octal notation.Source: Solnix pr(1) SYNOPSIS (/usr/xpg4/bin/pr: -column | -c column); Linux pr(1) -c, -v |
| Linux, FreeBSD, NetBSD | -T, -D and -L | Solnix has no -T, -D or -L. Linux -T omits pagination and -D sets the header date format. NetBSD -T takes an strftime(3) format for the header date. FreeBSD -L sets the locale.Source: Linux pr(1) -T, -D; NetBSD pr(1) -T timefmt; FreeBSD pr(1) -L locale; Solnix pr(1) SYNOPSIS |
| Linux, OpenBSD | -p pause per page | Solnix -p pauses before each page on a terminal, writing an alert to stderr and waiting for a carriage return on /dev/tty. OpenBSD's STANDARDS section says -p is unsupported, and its synopsis has no -p. The Linux options list has no -p.Source: Solnix pr(1) -p; OpenBSD pr(1) SYNOPSIS, STANDARDS; Linux pr(1) options |
| Linux | GNU-only options | Linux pr has long options and extra flags that Solnix lacks: -J join lines, -N first line number, -S separator string, -W page width, -v octal notation, and --pages. Scripts using them will not run on Solnix.Source: Linux pr(1) -J, -N, -S, -W, -v, +FIRST_PAGE[:LAST_PAGE], --pages; Solnix pr(1) SYNOPSIS |
| Linux | column balancing | Linux -COLS balances the number of lines in each column on a page. Solnix says only that whether columns have identical vertical lengths is unspecified, though a column never exceeds the page length.Source: Linux pr(1) -COLS; Solnix pr(1) -column |
| FreeBSD, OpenBSD, NetBSD | files merged with -m | Solnix says implementations support merging at least nine files. FreeBSD, OpenBSD and NetBSD say the maximum depends on page width and the per-process open-file limit. Source: Solnix pr(1) -m; FreeBSD pr(1) -m; OpenBSD pr(1) -m; NetBSD pr(1) -m |
| FreeBSD, OpenBSD, NetBSD | standard input operand '-' | FreeBSD, OpenBSD and NetBSD document '-' as the standard-input operand, and FreeBSD and NetBSD show it in the SYNOPSIS. The Solnix synopsis has no '-' operand. The visible Solnix text does not say whether '-' is accepted. Source: FreeBSD pr(1) SYNOPSIS, file; OpenBSD pr(1) file; NetBSD pr(1) SYNOPSIS, file; Solnix pr(1) SYNOPSIS |
| FreeBSD | multibyte input | FreeBSD's BUGS section says pr does not recognize multibyte characters. The Solnix text in the bundle makes no statement about multibyte input. Source: FreeBSD pr(1) BUGS; Solnix pr(1) DESCRIPTION |
| NetBSD | -e and -i digit handling | NetBSD -e and -i say that if the first character of char is a digit, char is treated as gap. The Solnix text says char is a non-digit character, and does not describe the digit case.Source: NetBSD pr(1) -e, -i; Solnix pr(1) -e, -n |
Standards
- POSIX: pr is a POSIX.1-2024 utility.
- FreeBSD: The pr utility is IEEE Std 1003.1-2001 (“POSIX.1”) compatible.
- OpenBSD: Compliant with IEEE Std 1003.1-2008 (“POSIX.1”) except that
-pis unsupported.-fis marked as an X/Open System Interfaces option. - NetBSD: The pr utility is IEEE Std 1003.1-2008 (“POSIX.1”) compatible.
- Linux: The Linux pr(1) text in the bundle has no STANDARDS section; it is the GNU coreutils page.
Writing portable scripts
- Avoid
-F,-c,-Tand-pin portable scripts. They mean different things on Solnix, Linux and the BSDs, or are missing on some. - Stick to +page,
-column,-a,-d,-h,-l,-m,-n,-o,-tand-w, which are documented on all five systems. Pass options with attached arguments (-e,-i,-n,-s) and put filenames last.
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.