stat(1) on Solnix vs Linux and the BSDs

stat is not in the Solnix base system. The Solnix page is GNU coreutils stat, published by pkgs.solnix.coreutils, and it matches the Linux page. The BSD stat is a different program: -f takes a format string there, while GNU uses -c/--format and -f means file-system status.

What Solnix runs

Not installed by default: add pkgs.solnix.coreutils. The bundle lists no other illumos variant and does not say what the base system provides under this name. The Solnix page is GNU coreutils 9.7 (April 2025).

Differences

Compared withTopicWhat differs
Linuxsame programThe Solnix and Linux pages describe the same GNU coreutils stat. Options and format sequences are identical in the bundle: -L, -f, -c/--format, --printf, -t, --cached, --help and --version. Only the version differs: Solnix 9.7, Linux coreutils-full-9.11.
Source: Solnix stat(1) SYNOPSIS and DESCRIPTION; Linux stat(1) SYNOPSIS and DESCRIPTION
FreeBSD, OpenBSD, NetBSD-f meaningOn Solnix (GNU), -f displays file system status instead of file status. On FreeBSD, OpenBSD and NetBSD, -f format takes a format string. A BSD script using stat -f '%z' file fails or misbehaves under GNU stat.
Source: Solnix stat(1) -f, --file-system; FreeBSD/OpenBSD/NetBSD stat(1) -f format
FreeBSD, OpenBSD, NetBSDcustom format optionSolnix uses -c FORMAT or --format=FORMAT, and --printf=FORMAT for backslash escapes with no trailing newline. The BSD pages document -f format and no -c or --printf option. The BSD -n suppresses the newline.
Source: Solnix stat(1) -c, --format, --printf; FreeBSD/OpenBSD/NetBSD stat(1) SYNOPSIS, -f, -n
FreeBSD, OpenBSD, NetBSDformat sequences differSolnix format letters are GNU-style: %s is size in bytes, %U is the owner name, %Y is the mtime in epoch seconds, %F is the file type. In the BSD pages, a format is built from optional flags, size, precision, fmt, sub and datum fields, such as %z for size, %Sm for a time string and %Su for the owner name.
Source: Solnix stat(1) valid format sequences for files; OpenBSD stat(1) FORMATS (datum z, a/m/c/B); NetBSD stat(1) -s example format
FreeBSD, OpenBSD, NetBSDterse and shell outputSolnix -t/--terse prints a fixed GNU field list: %n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %W %o. On the BSDs, -t takes a strftime(3) time format. -s prints shell variable assignments, and -r prints raw numbers.
Source: Solnix stat(1) -t, --terse; FreeBSD/OpenBSD/NetBSD stat(1) -t timefmt, -s, -r
FreeBSD, OpenBSD, NetBSDsymlink default and -LBSD stat uses lstat(2) by default and -L switches to stat(2), falling back to lstat if the target is missing (FreeBSD, NetBSD). The Solnix page documents only -L, --dereference (follow links) and does not say what the default is.
Source: FreeBSD/OpenBSD/NetBSD stat(1) DESCRIPTION and -L; Solnix stat(1) -L, --dereference
FreeBSD, OpenBSD, NetBSDhuman-readable and long outputSolnix has no -l, -x or -F. On the BSDs, -l gives ls -lT format, -x gives a more verbose layout, and -F appends type characters and implies -l. For Solnix, use --format or --terse.
Source: FreeBSD/OpenBSD/NetBSD stat(1) -l, -x, -F; Solnix stat(1) SYNOPSIS
FreeBSDFreeBSD-only options and readlinkFreeBSD stat has -H (NFS file handle, needs root) and -h (list sparse file holes). The FreeBSD page also covers readlink, invoked under that name. The Solnix page documents none of these.
Source: FreeBSD stat(1) NAME, SYNOPSIS, -H, -h; Solnix stat(1) SYNOPSIS
FreeBSD, OpenBSD, NetBSDno file argumentBSD stat with no file argument shows the file descriptor for standard input, and the file argument is optional. The Solnix synopsis requires FILE... and the page does not describe a stdin default.
Source: FreeBSD/OpenBSD/NetBSD stat(1) DESCRIPTION; Solnix stat(1) SYNOPSIS
FreeBSD, OpenBSD, NetBSDremote cache control and SELinuxSolnix has --cached=MODE (always, never, default) and the %C SELinux context sequence. The BSD pages show no such option or field.
Source: Solnix stat(1) --cached, %C; FreeBSD/OpenBSD/NetBSD stat(1) SYNOPSIS

Standards

  • POSIX: stat is not a POSIX.1-2024 utility.

Writing portable scripts

  • Do not rely on stat -f or -c in a portable script: -f means file-system status under GNU and a format string on the BSDs. Detect which stat is present, or use ls or find instead.
  • On Solnix, stat is not in the base system. Add pkgs.solnix.coreutils before using GNU stat options in a script.

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.