factor(1) on Solnix vs Linux and the BSDs

On Solnix, factor is the illumos /usr/bin/factor. It takes at most one integer, no more than 10^14, and has no options. GNU factor on Linux takes any number of operands and has -h/--exponents. The bundle has no FreeBSD, OpenBSD or NetBSD factor page.

What Solnix runs

A default Solnix system runs the illumos factor at /usr/bin/factor, published in pkgs.solnix.illumos-world-man. No other variants are shipped. The only counterpart in the bundle is Linux (GNU coreutils). The BSD pages are not included, so this page makes no claims about them.

Differences

Compared withTopicWhat differs
Linuxupper limitSolnix factor handles positive integers up to 10^14. The Linux page states no limit. A script that factors larger numbers works on Linux but is outside the documented range on Solnix.
Source: Solnix factor(1) DESCRIPTION, OPERANDS; Linux factor(1) DESCRIPTION
Linuxnumber of operandsSolnix factor takes at most one integer argument: factor [integer]. Linux factor takes any number of NUMBER operands: factor [OPTION] [NUMBER]...
Source: Solnix factor(1) SYNOPSIS; Linux factor(1) SYNOPSIS
LinuxoptionsSolnix factor documents no options. Linux has -h/--exponents, --help and --version. On Linux, -h means --exponents, not help. A script passing these flags fails on Solnix as far as the manual shows.
Source: Solnix factor(1) SYNOPSIS; Linux factor(1) -h, --exponents, --help, --version
Linuxrepeated factorsSolnix writes each prime factor the proper number of times and has no way to group them. Linux can print repeated factors as p^e (unless e is 1) with -h/--exponents.
Source: Solnix factor(1) DESCRIPTION; Linux factor(1) -h, --exponents
Linuxstdin handlingWith no argument, Solnix factor prompts for integers one at a time and exits on 0 or any non-numeric character. Linux reads numbers from standard input when none are given. Its page does not say what ends that loop or how bad input is handled.
Source: Solnix factor(1) DESCRIPTION; Linux factor(1) DESCRIPTION
Linuxzero or non-numeric argumentSolnix factor with an argument of 0 or a non-numeric string writes 0 and exits. The Linux page does not describe this case.
Source: Solnix factor(1) DESCRIPTION; Linux factor(1) DESCRIPTION
Linuxexit statusSolnix documents exit status 0 for success and 1 for an error. The Linux page has no EXIT STATUS section, so the manual does not say what it returns.
Source: Solnix factor(1) EXIT STATUS; Linux factor(1)
Linuxrun timeSolnix factor takes time proportional to sqrt(n), and reaches that worst case when n is prime or the square of a prime. The Linux page gives no performance information.
Source: Solnix factor(1) DESCRIPTION; Linux factor(1)

Standards

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

Writing portable scripts

  • Pass one integer per call and keep it at or below 10^14. Do not pass options, and do not rely on -h/--exponents, which Solnix does not document.
  • Do not parse the output for p^e notation. Solnix writes repeated factors out in full, and this is the only form the Solnix page documents.

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.