xzgrep(1) on Solnix vs Linux and the BSDs
xzgrep is not in the Solnix base system; install pkgs.solnix.xz to get it. The Solnix page is the same Tukaani xz text as on Linux, so the real differences are against FreeBSD, whose page is a short combined page for many compressed-grep wrappers.
The manual pages
What Solnix runs
Not installed by default: add pkgs.solnix.xz. The bundle lists no other illumos variants. The page says xzgrep calls grep(1), and GREP overrides which grep is used. The bundle does not say which grep (illumos or GNU) it finds on PATH.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux | same program as Linux | The Solnix and Linux pages describe the same Tukaani xzgrep: the same synopsis, unsupported-option list, exit status and GREP variable. The Solnix page is dated 2024-02-13 and the Linux page 2025-03-06. Source: Solnix xzgrep(1) DESCRIPTION, EXIT STATUS, ENVIRONMENT; Linux xzgrep(1) same sections |
| Linux | lz* commands deprecated | The Linux page marks lzgrep, lzegrep and lzfgrep as DEPRECATED and says they will be removed in a future version. The Solnix page lists them only as provided for backward compatibility, with no deprecation notice. Source: Linux xzgrep(1) SYNOPSIS, DESCRIPTION; Solnix xzgrep(1) SYNOPSIS, DESCRIPTION |
| FreeBSD | unsupported grep options | The Solnix page lists grep options xzgrep does not support: -r, -R, -d, -Z, -z, --include, --exclude, --exclude-from and --exclude-dir. The FreeBSD page lists no unsupported options and says only that it lets grep read compressed files.Source: Solnix xzgrep(1) DESCRIPTION; FreeBSD xzgrep(1) DESCRIPTION |
| FreeBSD | synopsis and arguments | Solnix documents xzgrep [option...] [pattern_list] [file...], with standard input when no file or - is given. The FreeBSD synopsis is xzgrep [flags] files, and its page does not describe standard input. Source: Solnix xzgrep(1) SYNOPSIS, DESCRIPTION; FreeBSD xzgrep(1) SYNOPSIS, DESCRIPTION |
| FreeBSD | format detection | Solnix xzgrep chooses the decompressor from the filename suffix (xz, gzip, bzip2, lzop, zstd, lz4). On standard input it decompresses only xz-format data. The FreeBSD page does not say how formats are detected. Source: Solnix xzgrep(1) DESCRIPTION; FreeBSD xzgrep(1) DESCRIPTION |
| FreeBSD | exit status and GREP variable | Solnix documents exit status 0 (match), 1 (no match) and >1 (error), and the GREP variable that replaces grep, grep -E or grep -F. The FreeBSD page documents neither.Source: Solnix xzgrep(1) EXIT STATUS, ENVIRONMENT; FreeBSD xzgrep(1) (no such sections) |
| FreeBSD | page layout and file-type coverage | The FreeBSD page covers zgrep, bzgrep, lzgrep, xzgrep and zstdgrep, with their egrep and fgrep forms, on one page. Solnix's xzgrep page covers only the xz and lz families, and points to zgrep(1) in SEE ALSO. Source: FreeBSD xzgrep(1) NAME, SYNOPSIS; Solnix xzgrep(1) SYNOPSIS, SEE ALSO |
Standards
- POSIX: xzgrep is not a POSIX.1-2024 utility.
Writing portable scripts
- Do not pass
-r,-R,-d,-Z,-zor--include/--excludeoptions to xzgrep. The Solnix and Linux pages say they are unsupported. Use find with xz-dcor xzcat instead. - Check that xzgrep exists before using it. On Solnix it needs pkgs.solnix.xz.
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.