unlink(1) on Solnix vs Linux and the BSDs
The published Solnix unlink(1) page is the GNU coreutils page, but the default command on PATH is the illumos one at /usr/sbin/unlink. The bundle has no text for the illumos version. Every system documents a one-operand unlink(file) call; only the GNU page lists options (--help, --version).
The manual pages
- Solnix: unlink(1) from
pkgs.solnix.coreutils - Linux: unlink(1) coreutils-full-9.11
- FreeBSD: unlink(1) 15.1-RELEASE
- NetBSD: unlink(8) 11.0
- Standard: POSIX.1-2024 (IEEE Std 1003.1-2024),
unlink
What Solnix runs
The published page comes from pkgs.solnix.coreutils (GNU coreutils 9.7). On a default Solnix system the command on PATH is the illumos /usr/sbin/unlink, and no other variants are shipped. The bundle contains no illumos unlink text, so this page cannot say whether the illumos version accepts --help, --version or `--`. Install pkgs.solnix.coreutils if you need the behaviour the GNU page describes.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux | same program | The published Solnix page and the Linux page are word-for-word the same GNU coreutils unlink page (Solnix 9.7, Linux coreutils-full-9.11). If you run the coreutils package, there is no documented difference. The default Solnix PATH command is illumos, not GNU. Source: Solnix unlink(1) SYNOPSIS, DESCRIPTION; Linux unlink(1) SYNOPSIS, DESCRIPTION; header line on default PATH |
| FreeBSD | unlink is rm in simple mode | FreeBSD documents unlink in the rm(1) page, as the same utility called by another name. It says no options may be supplied, so --help and --version, which the GNU page lists, are not documented there.Source: FreeBSD unlink(1) NAME, DESCRIPTION (last paragraph); Solnix unlink(1) --help, --version |
| FreeBSD | -- and directories | FreeBSD says the argument must not be a directory and that `--` may precede it. The GNU page says nothing about directories or `--`. The NetBSD page does not mention either. Source: FreeBSD unlink(1) DESCRIPTION (last paragraph), SYNOPSIS `unlink [--] file`; Solnix unlink(1) SYNOPSIS; NetBSD unlink(8) SYNOPSIS |
| FreeBSD | rm options do not apply | The FreeBSD page also describes rm options (-f, -i, -r, -v and others). They apply to rm only. Do not read them as unlink options: unlink takes none, and the GNU page has none either.Source: FreeBSD unlink(1) OPTIONS vs DESCRIPTION (last paragraph); Solnix unlink(1) DESCRIPTION |
| NetBSD | manual section and options | NetBSD documents unlink in section 8 (unlink(8)), not section 1. Its synopsis is `unlink file` with no options. --help and --version are not documented there.Source: NetBSD unlink(8) NAME, SYNOPSIS; Solnix unlink(1) SYNOPSIS |
| FreeBSD, NetBSD | exit status documented | NetBSD documents exit 0 on success and >0 on error. FreeBSD documents exit status only for rm (0 on success, >0 on error). The Solnix GNU page has no EXIT STATUS section. Source: NetBSD unlink(8) EXIT STATUS; FreeBSD unlink(1) EXIT STATUS; Solnix unlink(1) (no such section) |
| all four | non-GNU versions undocumented here | OpenBSD has no counterpart page in the bundle, so nothing is stated about OpenBSD unlink. Source: Bundle header COUNTERPART lines (linux, freebsd, netbsd only) |
Standards
- POSIX: unlink is a POSIX.1-2024 utility.
- Solnix: The published GNU coreutils page has no STANDARDS section. The bundle has no illumos ATTRIBUTES text for unlink.
- FreeBSD: The simplified unlink command conforms to Version 2 of the Single UNIX Specification (“SUSv2”).
- NetBSD: The unlink utility conforms to X/Open Commands and Utilities Issue 5 (“XCU5”).
Writing portable scripts
- Call unlink with exactly one file operand and no options. That is the only form all the pages document.
- For a name that starts with a dash, use a path such as ./-name. The FreeBSD page documents `--` only for unlink, and the other pages do not mention it.
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.