du(1b) on Solnix vs Linux and the BSDs
This page documents /usr/ucb/du, the BSD-compatibility du. It is not the du that a default Solnix system runs from /usr/bin/du. Its -d means "do not cross file systems" and takes no argument, whereas Linux and every BSD use -d depth. It has no -h, -c, -x, -H or -P.
The manual pages
- Solnix: du(1b) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: du(1) coreutils-full-9.11
- FreeBSD: du(1) 15.1-RELEASE
- OpenBSD: du(1) 8.0
- NetBSD: du(1) 11.0
- Standard: POSIX.1-2024 (IEEE Std 1003.1-2024),
du
What Solnix runs
A default Solnix system runs the illumos du at /usr/bin/du. The synopsis on this page is for /usr/ucb/du, so everything below describes that variant. /usr/xpg4/bin/du is also shipped, but this page does not describe it or /usr/bin/du. The page's SEE ALSO points to du(1) for the standard command. Check du(1), not this page, for what plain `du` does on PATH.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| all four | -d meaning | Solnix /usr/ucb/du -d takes no argument and stops du crossing file system boundaries. On Linux, FreeBSD, OpenBSD and NetBSD, -d takes a depth limit. A script using `du -d 1` fails or misbehaves on this variant.Source: Solnix du(1b) -d; Linux du(1) -d, --max-depth; FreeBSD du(1) -d depth; OpenBSD du(1) -d depth; NetBSD du(1) -d |
| all four | staying on one file system | Solnix /usr/ucb/du uses -d to skip other file systems and has no -x. Linux, FreeBSD, OpenBSD and NetBSD all use -x for this.Source: Solnix du(1b) SYNOPSIS and -d; Linux du(1) -x; FreeBSD du(1) -x; OpenBSD du(1) -x; NetBSD du(1) -x |
| all four | default block unit | Solnix /usr/ucb/du reports 512-byte units by default, and -k gives 1024-byte units. Linux defaults to 1024-byte units (512 only if POSIXLY_CORRECT is set). FreeBSD, OpenBSD and NetBSD default to 512-byte blocks.Source: Solnix du(1b) -k; Linux du(1) (units default to 1024 bytes); FreeBSD du(1) ENVIRONMENT; OpenBSD du(1) -k; NetBSD du(1) -k |
| all four | no human-readable or grand-total flags | Solnix /usr/ucb/du has no -h, -c, -m or -g. Linux, FreeBSD, OpenBSD and NetBSD have -h and -c. Linux, FreeBSD and NetBSD also have -m, and FreeBSD and NetBSD have -g. Sizes on Solnix are only in 512- or 1024-byte units.Source: Solnix du(1b) SYNOPSIS; Linux du(1) -h, -c, -m; FreeBSD du(1) -h, -c, -m, -g; OpenBSD du(1) -h, -c; NetBSD du(1) -h, -c, -m, -g |
| all four | -r is not the default | On Solnix /usr/ucb/du, error messages about unreadable directories are silent by default and -r turns them on. FreeBSD, OpenBSD and NetBSD document -r as the default, and FreeBSD and OpenBSD accept it and ignore it.Source: Solnix du(1b) -r; FreeBSD du(1) -r, STANDARDS; OpenBSD du(1) -r, STANDARDS; NetBSD du(1) -r |
| FreeBSD, OpenBSD, NetBSD | non-directory arguments | On Solnix /usr/ucb/du, file arguments that are not directories are ignored unless -a is given. The BSD pages say du displays usage for each file argument.Source: Solnix du(1b) NOTES; FreeBSD du(1) DESCRIPTION; OpenBSD du(1) DESCRIPTION; NetBSD du(1) DESCRIPTION |
| Linux | excluding subdirectories (-o) | Solnix -o leaves child directories out of a parent's total, and does nothing with -s. Linux has -S/--separate-dirs for "do not include size of subdirectories". The page does not say the two are identical. The BSD pages show no equivalent.Source: Solnix du(1b) -o; Linux du(1) -S, --separate-dirs; FreeBSD/OpenBSD/NetBSD du(1) OPTIONS |
| Linux, FreeBSD | hard links | Solnix counts a multiply linked file once, but counts the excess more than once if there are too many distinct linked files. Linux -l and FreeBSD -l count hard-linked files every time. OpenBSD and NetBSD count once per run, with no option to change it.Source: Solnix du(1b) DESCRIPTION and NOTES; Linux du(1) -l; FreeBSD du(1) -l; OpenBSD du(1) DESCRIPTION; NetBSD du(1) DESCRIPTION |
| all four | symlink options | Solnix /usr/ucb/du has only -L. The page does not say what happens to symlinks by default. All four counterparts have -H, -L and -P, and say -P (no links followed) is the default or that the last of the three wins.Source: Solnix du(1b) -L; Linux du(1) -H, -L, -P; FreeBSD du(1) -H, -L, -P; OpenBSD du(1) -H, -L, -P; NetBSD du(1) -H, -L, -P |
| FreeBSD, OpenBSD, NetBSD | BLOCKSIZE variable | The Solnix page documents only LC_* and LANG variables, not BLOCKSIZE. FreeBSD, OpenBSD and NetBSD du read BLOCKSIZE, unless a unit flag is given. Linux also reads DU_BLOCK_SIZE and BLOCK_SIZE. Source: Solnix du(1b) ENVIRONMENT VARIABLES; FreeBSD du(1) ENVIRONMENT; OpenBSD du(1) ENVIRONMENT; NetBSD du(1) ENVIRONMENT; Linux du(1) DU_BLOCK_SIZE |
| Linux, FreeBSD, NetBSD | missing extensions | Solnix /usr/ucb/du has no apparent-size option (Linux and FreeBSD -A), no -t threshold (Linux and FreeBSD), no exclude options (Linux --exclude, FreeBSD -I), and no inode counts (Linux --inodes, NetBSD -i).Source: Solnix du(1b) SYNOPSIS; Linux du(1) -A, -t, --exclude, --inodes; FreeBSD du(1) -A, -t, -I; NetBSD du(1) -i |
Standards
- POSIX: du is a POSIX.1-2024 utility.
- FreeBSD: The du utility is compliant with the IEEE Std 1003.1-2008 (“POSIX.1”) specification. The flags [
-ABIPcdghlmnt], [--libxo], [--si] and the BLOCKSIZE environment variable are extensions.-ris accepted but ignored. - OpenBSD: The du utility is compliant with the IEEE Std 1003.1-2008 (“POSIX.1”) specification. The flags [
-cdhP] and the BLOCKSIZE environment variable are extensions.-ris accepted but ignored.
Writing portable scripts
- Do not use
-d,-h,-cor-xin scripts that may run on Solnix/usr/ucb/du:-dmeans something different there and the others do not exist. Stick to-a,-kand-s, which every page in the bundle lists. - Always pass
-kif you need 1024-byte units. The default is 512 bytes on the BSDs and the Solnix/usr/ucb/du, but 1024 on Linux.
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.