ar(1) on Solnix vs Linux and the BSDs
On Solnix, ar is the illumos ar at /usr/bin/ar, which takes dashed operations such as -r, -q and -x and documents no long options. GNU ar is available as gar from pkgs.solnix.binutils, and FreeBSD's ar is llvm-ar, which writes zero timestamps and UIDs/GIDs by default.
The manual pages
- Solnix: ar(1) from
pkgs.solnix.illumos-world-man; the default on Solnix · illumos.org - Solnix: gar(1) (its page calls it ar) from
pkgs.solnix.binutils; add the package to get it - Linux: ar(1) binutils-2.46
- FreeBSD: ar(1) 15.1-RELEASE
- Standard: POSIX.1-2024 (IEEE Std 1003.1-2024),
ar
What Solnix runs
A default Solnix system runs the illumos ar at /usr/bin/ar. /usr/xpg4/bin/ar is also shipped. Its synopsis has no stand-alone -s form and no -s on -q, and its -v writes no message to standard error when writing to an archive. GNU ar is not on PATH by default: add pkgs.solnix.binutils, which installs it as gar (its page calls it ar).
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux | same program as gar | The gar from pkgs.solnix.binutils is GNU ar, and its page matches the Linux binutils ar page. Where this note describes Linux ar, gar behaves the same; /usr/bin/ar does not.Source: Solnix gar(1) NAME, SYNOPSIS, DESCRIPTION; Linux ar(1) SYNOPSIS, DESCRIPTION |
| Linux, FreeBSD | long options | Solnix /usr/bin/ar documents no long options. GNU ar's synopsis has --plugin, --target, --output, --record-libdeps and --thin. The FreeBSD llvm-ar page mentions --format (output format when rebuilding) and --plugin (ignored).Source: illumos ar(1) SYNOPSIS; Linux ar(1) SYNOPSIS; FreeBSD ar(1) DESCRIPTION |
| Linux, FreeBSD | operation syntax | Solnix ar documents each operation as a dashed option (ar -r, ar -x) with separate flags. GNU ar takes the operation and modifiers in any order in the first argument; llvm-ar writes the operation first. Both make the dash optional.Source: illumos ar(1) SYNOPSIS; Linux ar(1) OPTIONS; FreeBSD ar(1) SYNOPSIS |
| FreeBSD | -C and -T on extract | Solnix -x accepts -C (do not replace like-named files) and -T (truncate over-long names); without -T a too-long name is an error. In llvm-ar, T applies to d, q and r, and x takes only o and P.Source: illumos ar(1) SYNOPSIS, -C, -T; FreeBSD ar(1) Operations (d [NT], q [LT], r [abTu], x [oP]) |
| Linux | qs and quick append | GNU ar treats the command qs as a synonym for r, replacing existing members. Solnix -q quickly appends without checking whether the files are already in the archive, and -s is a separate option.Source: illumos ar(1) -q, -s; Linux ar(1) OPTIONS q |
| FreeBSD | deterministic archives | llvm-ar writes zero timestamps and UIDs/GIDs by default, and its U modifier writes the real values. The Solnix page documents no such default. Source: FreeBSD ar(1) DESCRIPTION, Deterministic Archives; illumos ar(1) DESCRIPTION |
| FreeBSD | archive formats | FreeBSD llvm-ar reads SVR4, GNU, BSD, Big Archive and Darwin archives and writes all but SVR4; --format picks the format when it rebuilds an SVR4 archive. The Solnix page describes only the portable format in ar.h(3HEAD).Source: FreeBSD ar(1) DESCRIPTION; illumos ar(1) DESCRIPTION |
| Linux | -M script mode | GNU ar documents -M, which reads an MRI librarian script from standard input. The Solnix page documents no -M.Source: Linux ar(1) DESCRIPTION (-M); illumos ar(1) SYNOPSIS |
| FreeBSD | deleting a missing member | In llvm-ar, deleting a file that is not in the archive is not an error. The Solnix page does not say what -d does with a missing file.Source: FreeBSD ar(1) Operations d; illumos ar(1) -d |
Everyday tasks
| Task | Solnix | Linux | FreeBSD |
|---|---|---|---|
| list the contents of an archive | ar -t archive | ar t archive | — |
| add or replace files in an archive | ar -r archive file | ar r archive member | llvm-ar r archive files |
| delete files from an archive | ar -d archive file | ar d archive member | llvm-ar d archive files |
| quickly append files to an archive | ar -q archive file | ar q archive member | — |
| print an archive member to standard output | ar -p archive file | ar p archive member | — |
| regenerate the archive symbol table/index | ar -s archive | ar s archive | — |
Standards
- POSIX: ar is a POSIX.1-2024 utility.
- Solnix: ATTRIBUTES: Interface Stability for
/usr/bin/aris Committed.
Writing portable scripts
- Write operations in the dashed form the Solnix synopsis shows (
-d,-m,-p,-q,-r,-t,-x); the GNU ar and llvm-ar pages accept a leading dash too. Avoid long options,-M,-C,-Tand-V. - Do not rely on timestamps in archives. llvm-ar zeroes them by default unless U is given, and Solnix does not document a default.
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.