rmdir(1) on Solnix vs Linux and the BSDs
On Solnix, rmdir is the illumos /usr/bin/rmdir. It supports only -p and -s, and has no -v. Linux, FreeBSD and NetBSD accept -v, so a script using rmdir -v fails on Solnix.
The manual pages
- Solnix: rmdir(1) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: rmdir(1) coreutils-full-9.11
- FreeBSD: rmdir(1) 15.1-RELEASE
- OpenBSD: rmdir(1) 8.0
- NetBSD: rmdir(1) 11.0
- Standard: POSIX.1-2024 (IEEE Std 1003.1-2024),
rmdir
What Solnix runs
A default Solnix system runs the illumos rmdir at /usr/bin/rmdir. No other variants are shipped. The page also documents a ksh93 built-in rmdir, which is used when rmdir is run without a path prefix and the search finds /bin/rmdir or /usr/bin/rmdir. The built-in adds -e, --ignore-fail-on-non-empty, --parents and --suppress. The bundle does not say which shell is the default.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux, FreeBSD, NetBSD | -v verbose | Solnix /usr/bin/rmdir has no -v. Linux, FreeBSD and NetBSD use -v to report each directory processed. OpenBSD has no -v either.Source: Solnix rmdir(1) SYNOPSIS, OPTIONS; Linux rmdir(1) -v, --verbose; FreeBSD rmdir(1) -v; NetBSD rmdir(1) -v |
| Linux | -s and long options | Solnix /usr/bin/rmdir has -s, which suppresses the -p error message. Linux rmdir has no -s. Long options --parents and --suppress exist on Solnix only in the ksh93 built-in. Linux accepts --parents.Source: Solnix rmdir(1) OPTIONS (-s, ksh93 section); Linux rmdir(1) -p, --parents |
| Linux | --ignore-fail-on-non-empty | The ksh93 built-in on Solnix accepts -e and --ignore-fail-on-non-empty. Linux has only the long form --ignore-fail-on-non-empty. The /usr/bin/rmdir synopsis has neither option.Source: Solnix rmdir(1) OPTIONS (ksh93: -e, --ignore-fail-on-non-empty); Linux rmdir(1) --ignore-fail-on-non-empty |
| FreeBSD, OpenBSD, NetBSD | -p error messages | On Solnix, -p prints a message to standard error if all or part of the path could not be removed, and -s suppresses it. The FreeBSD, OpenBSD and NetBSD pages describe no such message and have no -s.Source: Solnix rmdir(1) -p, -s; FreeBSD rmdir(1) -p; OpenBSD rmdir(1) -p; NetBSD rmdir(1) -p |
| FreeBSD | exit status | Solnix documents only 0 for success and >0 for an error. FreeBSD distinguishes 1 (error removing a directory) from 2 (invalid arguments). Source: Solnix rmdir(1) EXIT STATUS; FreeBSD rmdir(1) EXIT STATUS |
| Linux | exit status documented | The Linux page has no EXIT STATUS section. Solnix documents 0 for success and >0 for an error. Source: Solnix rmdir(1) EXIT STATUS; Linux rmdir(1) (no EXIT STATUS section) |
| FreeBSD, OpenBSD, NetBSD | synopsis with several operands | The Solnix /usr/bin/rmdir synopsis shows a single dirname. The ksh93 synopsis and the BSD synopses show several directories. The DESCRIPTION says directories are processed in order, as on the BSDs, so the single-operand synopsis is probably just terse. The manual does not say otherwise.Source: Solnix rmdir(1) SYNOPSIS, DESCRIPTION; FreeBSD rmdir(1) SYNOPSIS |
Standards
- POSIX: rmdir is a POSIX.1-2024 utility.
- Solnix: Interface Stability: Committed. The ksh93 built-in binding to
/binand/usr/binis Volatile, and the built-in interfaces are Uncommitted. - FreeBSD: rmdir is expected to be IEEE Std 1003.2 (“POSIX.2”) compatible.
- OpenBSD: rmdir is compliant with the IEEE Std 1003.1-2008 (“POSIX.1”) specification.
- NetBSD: rmdir is expected to be IEEE Std 1003.2 (“POSIX.2”) compatible.
Writing portable scripts
- Use only rmdir
-pand plain operands in portable scripts.-vand-sare not available on every system. - Order operands with subdirectories before their parents, as all pages require. Check the exit status for failure, since the pages only agree that non-zero means an error.
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.