tar(1) on Solnix vs Linux and the BSDs
On Solnix, tar is the illumos tar at /usr/bin/tar and /usr/sbin/tar, driven by a key string (one function letter c, r, t, u or x plus modifiers) with no GNU-style long options. It documents no -A, -d or --delete; GNU tar is an add-on package.
The manual pages
- Solnix: tar(1) from
pkgs.solnix.illumos-world-man; the default on Solnix · illumos.org - Solnix: tar(1) from
pkgs.solnix.gnutar; add the package to get it - Solnix: tar(1) from
pkgs.solnix.gtar; add the package to get it - Linux: tar(1) gnutar-1.35
- FreeBSD: tar(1) 15.1-RELEASE
- OpenBSD: tar(1) 8.0
- NetBSD: tar(1) 11.0
What Solnix runs
A default Solnix system runs the illumos tar at /usr/bin/tar and /usr/sbin/tar; no other illumos variants are shipped. pkgs.solnix.gnutar and pkgs.solnix.gtar both publish a tar(1) page and are not on PATH by default; the pkgs.solnix.gnutar page is GNU tar.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux | same program as the gnutar package | The tar(1) page from pkgs.solnix.gnutar has the same usage forms and options as the Linux page: it is GNU tar, the same program. The default Solnix tar is not GNU tar. Source: Solnix tar(1) from pkgs.solnix.gnutar SYNOPSIS, DESCRIPTION; Linux tar(1) SYNOPSIS, DESCRIPTION |
| Linux | option styles | The illumos tar synopsis shows only the key-string form: a bare mode letter, no dash, no long options. GNU tar also accepts -c style short and --create style long options, which can be mixed, though mixing with the old style is discouraged.Source: illumos tar(1) SYNOPSIS, DESCRIPTION (key argument); Linux tar(1) Option styles |
| Linux | modes GNU has and illumos lacks | The illumos tar has only the function letters c, r, t, u and x. GNU tar also has -A (concatenate), -d (compare archive with file system), --delete and --test-label. The illumos page documents no equivalents.Source: illumos tar(1) Function Letters; Linux tar(1) Operation mode -A, -d, --delete, --test-label |
| FreeBSD, OpenBSD, NetBSD | modifier arguments follow key order | On Solnix, modifier arguments are separate words after the key string, in modifier order: in tar cbf 20 a.tar, 20 belongs to b. The illumos synopsis shows no dash-style options; FreeBSD, OpenBSD and NetBSD also document them. Source: illumos tar(1) DESCRIPTION, SYNOPSIS; OpenBSD tar(1) DESCRIPTION; FreeBSD tar(1) SYNOPSIS; NetBSD tar(1) SYNOPSIS |
| FreeBSD, OpenBSD | -C is an operand on Solnix | On Solnix, -C directory file is one operand: it changes directory, then archives the one named file ("." for everything). FreeBSD -C changes directory for the files that follow, and OpenBSD calls -C positional.Source: illumos tar(1) OPERANDS -C, -I; FreeBSD tar(1) -C; OpenBSD tar(1) -C |
| FreeBSD, OpenBSD, NetBSD | extract matching and wildcards | On Solnix, names given to x, r, u and X must match archive names exactly (./thisfile, not thisfile), and wildcards cannot be used when extracting. OpenBSD takes glob patterns for -t and -x, and FreeBSD and NetBSD take shell-style patterns.Source: illumos tar(1) Function Letters x; OpenBSD tar(1) -t, -x; FreeBSD tar(1) DESCRIPTION; NetBSD tar(1) DESCRIPTION |
| FreeBSD, NetBSD | excluding files | On Solnix, the X modifier takes an exclude-file argument, and excludes win over includes. FreeBSD and NetBSD use --exclude pattern, with exclusions taking precedence over patterns or filenames given on the command line. The Solnix page documents no --exclude option.Source: illumos tar(1) SYNOPSIS (X), OPERANDS -I; FreeBSD tar(1) --exclude; NetBSD tar(1) --exclude |
| OpenBSD | -u meaning | On OpenBSD, -u is an alias for -r, which appends the named files. On Solnix, u appends a named file only if it is not in the tarfile or has been modified since it was last written.Source: OpenBSD tar(1) -u, -r; illumos tar(1) Function Letters u |
| OpenBSD | blocking factor limits | Solnix b defaults to 20 blocks of 512 bytes, with a maximum set by memory and the tape device but never above 4194303. OpenBSD also defaults to 20 but allows at most 126, and says factors above 63 violate POSIX. Source: illumos tar(1) b blocksize; OpenBSD tar(1) -b |
| FreeBSD, NetBSD | archive formats read and written | FreeBSD and NetBSD tar extract tar, pax, cpio, zip, jar, ar, xar, rpm, 7-zip and ISO 9660 images, create tar, pax, cpio, ar, zip, 7-zip and shar, and accept @archive. The Solnix page describes only tar archives. Source: FreeBSD tar(1) DESCRIPTION, @archive; NetBSD tar(1) DESCRIPTION, @archive; illumos tar(1) DESCRIPTION |
Everyday tasks
| Task | Solnix | FreeBSD | OpenBSD | NetBSD |
|---|---|---|---|---|
| create an archive from files | tar cf tarfile file | tar -cf archive file | tar -cf archive file | tar -cf archive file |
| list the contents of an archive | tar tf tarfile | tar -tf archive | tar -tf archive | tar -tf archive |
| extract all files from an archive | tar xf tarfile | tar -xf archive | tar -xf archive | tar -xf archive |
| archive symlink targets instead of the links | tar chf tarfile file | — | tar -chf archive file | — |
Standards
- POSIX: tar is not a POSIX.1-2024 utility.
Writing portable scripts
- Use the key-string form (tar cf archive.tar files, tar xf archive.tar) with no leading dash: the Solnix synopsis shows only that form, Linux documents it as traditional usage, and the BSD pages keep a historical form of it.
- Avoid long options,
-Cdirectory in the middle of a create list, wildcards on extract and--exclude. They differ between illumos tar and the others, or are missing. - When extracting with Solnix tar, give names exactly as tar tf lists them, including any leading ./, since Solnix x, r and u need an exact match.
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.