sum(1b) on Solnix vs Linux and the BSDs
sum(1b) is the illumos BSD-compatibility sum at /usr/ucb/sum. It prints a 16-bit checksum and a size in kilobytes, and the page calls it obsolete. The /usr/bin/sum on PATH is a different program (sum(1)) that returns different checksums.
The manual pages
- Solnix: sum(1b) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: sum(1) coreutils-full-9.11
- FreeBSD: sum(1) 15.1-RELEASE
- NetBSD: sum(1) 11.0
What Solnix runs
The page documents /usr/ucb/sum, which is not the sum on PATH. A default Solnix system runs the illumos /usr/bin/sum, described in sum(1). The NOTES section says the two return different checksums for the same file. The bundle does not include the text of sum(1), so this page cannot say how /usr/bin/sum differs beyond that.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux, FreeBSD, NetBSD | which sum runs | On Solnix, plain sum resolves to /usr/bin/sum, not the /usr/ucb/sum documented here. Run /usr/ucb/sum explicitly to get this page's behaviour. The counterpart systems document a single sum.Source: Solnix sum(1b) SYNOPSIS and NOTES; header line on PATH |
| Linux, FreeBSD, NetBSD | no options | Solnix /usr/ucb/sum has the synopsis 'sum file...' and documents no options. Linux has -r and -s/--sysv. NetBSD has -a, -c, -n, -o and others. FreeBSD sum has no options in its synopsis, but cksum takes -o.Source: Solnix sum(1b) SYNOPSIS; Linux sum(1) -r, -s; NetBSD sum(1) SYNOPSIS; FreeBSD sum(1) SYNOPSIS |
| Linux | algorithm choice | Linux sum defaults to the BSD algorithm with 1K blocks, and -s selects System V with 512-byte blocks. The Solnix page names no algorithm and offers no switch.Source: Linux sum(1) -r, -s, --sysv; Solnix sum(1b) DESCRIPTION |
| FreeBSD, NetBSD | checksum width and algorithm | FreeBSD and NetBSD sum is cksum defaulting to historic algorithm 1, a 16-bit checksum. Solnix also prints a 16-bit checksum, but its page says the result can differ between machines with 16-bit and 32-bit ints. The BSD pages do not say this. Source: FreeBSD sum(1) DESCRIPTION, -o; NetBSD sum(1) DESCRIPTION, -o; Solnix sum(1b) DESCRIPTION |
| FreeBSD, NetBSD | output format | BSD sum writes a checksum, a count and the file name. For algorithms 1 and 2 the count is in blocks (1024 and 512 bytes). Solnix prints the checksum and the size in kilobytes. The Solnix page does not say whether the file name is printed. Source: FreeBSD sum(1) DESCRIPTION, -o; NetBSD sum(1) -o; Solnix sum(1b) DESCRIPTION |
| NetBSD | verification and other digests | NetBSD sum accepts -c to verify a list of checksums and -a to choose MD5, SHA-1, SHA-2 and other algorithms. Solnix /usr/ucb/sum can only calculate and display a checksum.Source: NetBSD sum(1) -a, -c; Solnix sum(1b) DESCRIPTION |
| FreeBSD, NetBSD | exit status | FreeBSD and NetBSD document exit 0 on success and >0 on error. The Solnix page has no exit status section. Source: FreeBSD sum(1) EXIT STATUS; NetBSD sum(1) DESCRIPTION; Solnix sum(1b) |
| Linux, FreeBSD, NetBSD | large files and status | The Solnix page refers to largefile(7) for files of 2 Gbyte (2^31 bytes) or more and marks the utility obsolete. The counterpart pages say neither. FreeBSD and NetBSD say sum is provided for compatibility only. Source: Solnix sum(1b) USAGE, NOTES; FreeBSD sum(1) DESCRIPTION; NetBSD sum(1) DESCRIPTION |
Standards
- POSIX: sum is not a POSIX.1-2024 utility.
- FreeBSD: The cksum utility is expected to conform to IEEE Std 1003.2-1992 (“POSIX.2”). The page makes no such statement for sum.
Writing portable scripts
- Do not compare sum output across systems or between
/usr/bin/sumand/usr/ucb/sumon Solnix: the algorithm, block size and result can differ. Use a cryptographic hash tool for integrity checks.
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.