look(1) on Solnix vs Linux and the BSDs
On Solnix, look is the illumos look at /usr/bin/look. It prints lines that begin with a string from a sorted file. The main differences from Linux and the BSDs are the default dictionary path (/usr/share/lib/dict/words) and the fact that the Solnix page documents no exit status.
The manual pages
What Solnix runs
A default Solnix system runs the illumos look at /usr/bin/look. No other variants are shipped. The Solnix page is dated March 29, 1994.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| all four | default word list path | With no file argument, Solnix look reads /usr/share/lib/dict/words. Linux, FreeBSD, OpenBSD and NetBSD read /usr/share/dict/words. A script that relies on the default word list needs a different path on Solnix.Source: Solnix look(1) DESCRIPTION; Linux look(1) DESCRIPTION; FreeBSD look(1) DESCRIPTION; OpenBSD look(1) DESCRIPTION; NetBSD look(1) DESCRIPTION |
| all four | exit status | The Solnix page documents no exit status. Linux, FreeBSD, OpenBSD and NetBSD document 0 when lines were found, 1 when none were found, and >1 on error. Do not rely on the status of Solnix look in scripts without testing it. Source: Solnix look(1) (no EXIT STATUS section); Linux/FreeBSD/OpenBSD look(1) EXIT STATUS; NetBSD look(1) DESCRIPTION |
| Linux | WORDLIST environment variable | Linux look reads WORDLIST as the path to a dictionary file. The Solnix page documents no environment variables. Source: Linux look(1) ENVIRONMENT (WORDLIST); Solnix look(1) (no ENVIRONMENT section) |
| Linux | -a alternative dictionary | Linux look has -a, --alternative to use the alternative dictionary file. The Solnix synopsis has no -a.Source: Linux look(1) -a, --alternative; Solnix look(1) SYNOPSIS |
| FreeBSD | -a accepted and ignored | FreeBSD look ignores -a and --alternative for compatibility. The Solnix page lists no -a and does not say what happens if it is given.Source: FreeBSD look(1) COMPATIBILITY; Solnix look(1) SYNOPSIS |
| Linux, FreeBSD | long options | Linux and FreeBSD look accept long options: --alphanum, --ignore-case, --terminate. The Solnix page documents only -d, -f and -t.Source: Linux look(1) OPTIONS; FreeBSD look(1) OPTIONS; Solnix look(1) OPTIONS |
| all four | default comparison mode | With no file, the Solnix default list is searched with collating sequence -df. Linux, FreeBSD, OpenBSD and NetBSD say that the default word list is compared on alphanumerics only and ignoring case. The manuals describe both in similar terms, but only Solnix and Linux tie it to -d and -f.Source: Solnix look(1) DESCRIPTION (collating sequence -df); Linux look(1) -d, -f; FreeBSD/OpenBSD/NetBSD look(1) DESCRIPTION |
| Linux | -d includes blanks | Linux -d compares blanks and alphanumerics, which matches sort -d since version 2.28. Solnix -d uses letters, digits, TAB and SPACE. The BSDs say only alphanumeric characters are compared.Source: Linux look(1) -d; Solnix look(1) -d; FreeBSD/OpenBSD/NetBSD look(1) -d |
| FreeBSD, OpenBSD, NetBSD | -d and blanks | Solnix -d compares letters, digits, TAB and SPACE. FreeBSD, OpenBSD and NetBSD say -d compares only alphanumeric characters, and their pages say that an older claim that tabs and blanks took part was incorrect.Source: Solnix look(1) -d; FreeBSD look(1) COMPATIBILITY; OpenBSD look(1) STANDARDS; NetBSD look(1) COMPATIBILITY |
| FreeBSD | multiple files and locale | FreeBSD look accepts file ... (several files) in its synopsis. Solnix takes one optional filename. FreeBSD also says lines are not compared by locale collating order, so input must be sorted with LC_COLLATE=C. The Solnix page does not say. Source: FreeBSD look(1) SYNOPSIS, BUGS; Solnix look(1) SYNOPSIS |
| all four | -t syntax and string length limit | Solnix -t is written as -tc with the character attached, and it ignores everything to the right of c in string. The other pages show -t as a separate argument and compare up to and including the first occurrence of the character. Solnix also limits the search string to 256 characters. The other pages state no limit.Source: Solnix look(1) SYNOPSIS, -tc, DESCRIPTION; Linux look(1) -t; FreeBSD/OpenBSD look(1) -t termchar; NetBSD look(1) -t |
Standards
- POSIX: look is not a POSIX.1-2024 utility.
- Solnix: The Solnix page refers to attributes(7), but the bundle does not show any interface stability value.
Writing portable scripts
- Pass the word list as an explicit file argument. The default path is
/usr/share/lib/dict/wordson Solnix and/usr/share/dict/wordselsewhere. - Use only
-d,-fand a-twith its character as a separate argument if you want one form for all systems, and sort the file with the same options first. Do not depend on the exit status on Solnix, since its page does not document one.
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.