strings(1) on Solnix vs Linux and the BSDs
On Solnix, strings is the illumos strings at /usr/bin/strings, with only -a, -n, -N, -o and -t. The biggest trap is -o: on Solnix it means -t d (decimal offsets), but on Linux, FreeBSD and OpenBSD it means -t o (octal).
The manual pages
- Solnix: strings(1) from
pkgs.solnix.illumos-world-man; the default on Solnix · illumos.org - Solnix: gstrings(1) (its page calls it strings) from
pkgs.solnix.binutils; add the package to get it - Linux: strings(1) binutils-2.46
- FreeBSD: strings(1) 15.1-RELEASE
- OpenBSD: strings(1) 8.0
- Standard: POSIX.1-2024 (IEEE Std 1003.1-2024),
strings
What Solnix runs
A default Solnix system runs the illumos strings at /usr/bin/strings. No other illumos variants are shipped. GNU strings is available from pkgs.solnix.binutils, installed as gstrings, and its page calls it strings. It is not the command on PATH by default.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux, FreeBSD, OpenBSD | -o meaning | Solnix strings -o is equivalent to -t d, so offsets are decimal. On Linux, FreeBSD and OpenBSD, -o is equivalent to -t o, so offsets are octal. The same command line prints different offsets.Source: illumos strings(1) -o; Linux strings(1) -o; FreeBSD strings(1) -o; OpenBSD strings(1) -o |
| Linux | gstrings is GNU strings | The gstrings page from pkgs.solnix.binutils has the same synopsis and options as the Linux strings page: it is GNU strings, the same program. Linux behaviour applies to gstrings, not to /usr/bin/strings.Source: Solnix gstrings(1) from pkgs.solnix.binutils SYNOPSIS, OPTIONS; Linux strings(1) SYNOPSIS, OPTIONS |
| Linux, FreeBSD, OpenBSD | no long options | The Solnix synopsis lists only short options. It has no --all, --bytes, --radix, --print-file-name, --help or --version. Linux, FreeBSD and OpenBSD document these long forms.Source: illumos strings(1) SYNOPSIS; Linux strings(1) OPTIONS; FreeBSD strings(1) SYNOPSIS; OpenBSD strings(1) SYNOPSIS |
| Linux, FreeBSD, OpenBSD | -f file name prefix | Solnix strings has no -f to print the file name before each string. Linux, FreeBSD and OpenBSD all document -f / --print-file-name.Source: illumos strings(1) SYNOPSIS, OPTIONS; Linux, FreeBSD and OpenBSD strings(1) -f |
| Linux, FreeBSD, OpenBSD | no -e encoding | Solnix strings looks for ASCII strings and has no -e option. Linux, FreeBSD and OpenBSD select 7-bit, 8-bit, 16-bit or 32-bit encodings with -e, which is how you find wide-character strings.Source: illumos strings(1) DESCRIPTION; Linux strings(1) -e; FreeBSD strings(1) -e; OpenBSD strings(1) -e |
| Linux, FreeBSD, OpenBSD | -v and -h | On Linux, FreeBSD and OpenBSD, -v prints the version; Linux also accepts -V for the version, and FreeBSD uses -h for help. The Solnix page documents neither -v nor -h.Source: Linux strings(1) -v, -V; FreeBSD strings(1) -h, -v; OpenBSD strings(1) -v; illumos strings(1) OPTIONS |
| Linux, FreeBSD, OpenBSD | -N section filter | Solnix -N name restricts the search to the named ELF section, may be repeated and is ignored with -a; the page says no standard specifies it. The Linux, FreeBSD and OpenBSD pages have no equivalent.Source: illumos strings(1) -N, ATTRIBUTES; Linux strings(1) OPTIONS; FreeBSD strings(1) DESCRIPTION; OpenBSD strings(1) OPTIONS |
| Linux | meaning of lone - | On Solnix, a lone - is interchangeable with -a. On Linux, - is position dependent: it forces a full scan only of files named after it, even if -d was given.Source: illumos strings(1) NOTES, -a; Linux strings(1) -a, DESCRIPTION |
| Linux | default scan scope | By default Solnix scans sections of type SHT_PROGBITS that have the SHF_ALLOC flag; -a scans everywhere. The Linux page says the default depends on how strings was configured, and offers -d for data sections only.Source: illumos strings(1) DESCRIPTION; Linux strings(1) DESCRIPTION, -d |
| Linux, FreeBSD, OpenBSD | what ends a string | Solnix strings end at a NEWLINE or NULL. The Linux page says strings end at control characters such as newline and carriage return but not tab, and -w includes other whitespace. FreeBSD and OpenBSD say only 'followed by an unprintable character'.Source: illumos strings(1) DESCRIPTION; Linux strings(1) -n, -w; FreeBSD strings(1) DESCRIPTION; OpenBSD strings(1) DESCRIPTION |
| Linux, OpenBSD | @file option files | The Linux and OpenBSD pages document @file, which reads command-line options from a file. The Solnix page documents no such feature. Source: Linux strings(1) @file; OpenBSD strings(1) @file; illumos strings(1) OPTIONS |
Everyday tasks
| Task | Solnix | Linux | FreeBSD | OpenBSD |
|---|---|---|---|---|
| print the printable strings in a file | strings file | strings file | strings file | strings file |
| scan the whole file, not just loaded sections | strings -a file | strings -a file | strings -a file | strings -a file |
| set the minimum string length | strings -n number file | strings -n number file | strings -n number file | strings -n number file |
| show each string's offset in hexadecimal | strings -t x file | strings -t x file | strings -t x file | strings -t x file |
| show each string's offset in decimal | strings -t d file | — | strings -t d file | strings -t d file |
| search only a named ELF section | strings -N name file | — | — | — |
Standards
- POSIX: strings is a POSIX.1-2024 utility.
- Solnix: ATTRIBUTES: the strings utility, including all options except
-N, is specified by standards (see standards(7));-Nis not currently specified by any standard. CSI is Enabled.
Writing portable scripts
- Use only
-a,-nnumber and-td|o|x, which the Solnix, Linux, FreeBSD and OpenBSD pages all document. Write-td or-to instead of-o. - Do not rely on
-f,-e,-N, long options or the default section scope. They are missing from Solnix or differ between systems.
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.