zcat(1) on Solnix vs Linux and the BSDs
On a default Solnix system, zcat at /usr/bin/zcat is the illumos zcat from compress(1). Its page documents only files made by compress (.Z), as the equivalent of uncompress -c, and it takes no options. On Linux, FreeBSD and NetBSD, zcat is gzip -dc, which reads gzip data. A script that runs zcat on .gz files should use gzip -dc on Solnix.
The manual pages
- Solnix: zcat(1) from
pkgs.solnix.gzip - Linux: zcat(1) gzip-1.14
- FreeBSD: zcat(1) 15.1-RELEASE
- NetBSD: zcat(1) 11.0
- Standard: POSIX.1-2024 (IEEE Std 1003.1-2024),
zcat
What Solnix runs
The published Solnix zcat(1) is from pkgs.solnix.gzip, but its page text is empty in the bundle. The command on PATH is the illumos /usr/bin/zcat, whose page is the shared compress/uncompress/zcat page. No other illumos variants are shipped. The bundle does not say whether installing pkgs.solnix.gzip changes what zcat on PATH runs.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux, FreeBSD, NetBSD | input format | Solnix /usr/bin/zcat is documented to write the uncompressed form of files compressed using compress. Linux, FreeBSD and NetBSD zcat is gzip with -c and -d, the gzip tool. Their pages do not describe compress as the main input.Source: Solnix (illumos) zcat(1) DESCRIPTION, zcat; Linux zcat(1) DESCRIPTION; FreeBSD zcat(1) DESCRIPTION; NetBSD zcat(1) DESCRIPTION |
| Linux, FreeBSD, NetBSD | options accepted | The illumos zcat synopsis is zcat [file]... with no options. Linux zcat takes -f, -h, -L and -V. FreeBSD zcat takes -f, -h and -V. NetBSD zcat takes -a, -f, -h, -L and -V. Scripts that pass these flags to zcat on Solnix are outside the documented synopsis.Source: Solnix (illumos) zcat(1) SYNOPSIS; Linux zcat(1) SYNOPSIS; FreeBSD zcat(1) SYNOPSIS; NetBSD zcat(1) SYNOPSIS |
| Linux, FreeBSD, NetBSD | how zcat is defined | On Solnix, zcat is the equivalent of uncompress -c. On Linux it is identical to gunzip -c. On FreeBSD and NetBSD, invoking it as zcat enables both -c and -d in gzip.Source: Solnix (illumos) zcat(1) zcat; Linux zcat(1) DESCRIPTION; FreeBSD zcat(1) DESCRIPTION; NetBSD zcat(1) DESCRIPTION |
| Linux, FreeBSD, NetBSD | other formats read | Linux gunzip can decompress files from gzip, zip, compress, compress -H or pack, with automatic detection. FreeBSD gzip also reads compress, bzip2, lzip, zstd and xz. NetBSD gzip reads compress, bzip2, lzip and xz. The illumos page documents only compress output.Source: Linux zcat(1) DESCRIPTION; FreeBSD zcat(1) DESCRIPTION; NetBSD zcat(1) DESCRIPTION; Solnix (illumos) zcat(1) DESCRIPTION |
| Linux, FreeBSD, NetBSD | pass-through of non-compressed data | With -f and --stdout, Linux zcat copies unrecognised input unchanged, like cat. FreeBSD and NetBSD gzip do the same when -f is combined with -c. The illumos zcat page documents no such pass-through, and zcat has no options in its synopsis.Source: Linux zcat(1) -f; FreeBSD zcat(1) -f; NetBSD zcat(1) -f; Solnix (illumos) zcat(1) SYNOPSIS |
| FreeBSD, NetBSD | GZIP environment variable | FreeBSD and NetBSD gzip parse the GZIP variable as options handled before the command-line options. The illumos page lists only LANG, LC_ALL, LC_COLLATE, LC_CTYPE, LC_MESSAGES and NLSPATH, and no GZIP. Source: FreeBSD zcat(1) ENVIRONMENT; NetBSD zcat(1) ENVIRONMENT; Solnix (illumos) zcat(1) ENVIRONMENT VARIABLES |
| FreeBSD, NetBSD | exit status 2 | On the illumos page, exit 2 means a file was not compressed because it would have grown, and any status above 2 is an error. FreeBSD and NetBSD gzip use 2 for a warning. Linux's exit status section is not in the bundle. Source: Solnix (illumos) zcat(1) EXIT STATUS; FreeBSD zcat(1) EXIT STATUS; NetBSD zcat(1) EXIT STATUS |
| Linux | standard input operand | The illumos page says that if the file operand is - or no file is given, standard input is used. Linux zcat reads standard input when given no file names, and the gzip description treats the name - as standard input. Source: Solnix (illumos) zcat(1) OPERANDS; Linux zcat(1) DESCRIPTION |
Standards
- POSIX: zcat is a POSIX.1-2024 utility.
- Solnix: illumos ATTRIBUTES for compress, uncompress and zcat: CSI Enabled; Interface Stability Committed; Standard: see standards(7).
Writing portable scripts
- To read .gz data on every system, use gzip
-dcfile.gz instead of zcat. On Solnix gzip comes from pkgs.solnix.gzip, and/usr/bin/zcatis the compress-format tool. - Do not pass options to zcat in portable scripts. The illumos synopsis is zcat [file]... only.
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.