Sign in

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.

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 withTopicWhat differs
Linuxsame program as the gnutar packageThe 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
Linuxoption stylesThe 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
Linuxmodes GNU has and illumos lacksThe 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, NetBSDmodifier arguments follow key orderOn 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 SolnixOn 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, NetBSDextract matching and wildcardsOn 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, NetBSDexcluding filesOn 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 meaningOn 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
OpenBSDblocking factor limitsSolnix 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, NetBSDarchive formats read and writtenFreeBSD 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

TaskSolnixFreeBSDOpenBSDNetBSD
create an archive from filestar cf tarfile filetar -cf archive filetar -cf archive filetar -cf archive file
list the contents of an archivetar tf tarfiletar -tf archivetar -tf archivetar -tf archive
extract all files from an archivetar xf tarfiletar -xf archivetar -xf archivetar -xf archive
archive symlink targets instead of the linkstar chf tarfile file—tar -chf archive file—

Standards

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, -C directory 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.