locate(1) on Solnix vs Linux and the BSDs

locate is not in the base Solnix system. The published page is GNU locate from findutils (pkgs.solnix.findutils). It differs from the BSD locate programs in having long options, --regex, --existing and --all, and in matching a plain-string pattern as a substring and a glob pattern against the whole path.

What Solnix runs

Not installed by default: add pkgs.solnix.findutils. The page documents the GNU version of locate and refers to updatedb(1) for building the database. No other illumos variants are shipped.

Differences

Compared withTopicWhat differs
FreeBSD, OpenBSD, NetBSDimplementationThe Solnix page documents GNU locate (findutils). The three BSD pages document BSD locate, which uses a different, compressed database format and has far fewer options.
Source: Solnix locate(1) DESCRIPTION ("documents the GNU version of locate"); FreeBSD/OpenBSD/NetBSD locate(1) SYNOPSIS
FreeBSD, OpenBSD, NetBSDglob matching of patterns with metacharactersGNU locate matches a glob pattern against the whole name exactly, so patterns should usually start and end with *. On the BSDs the page says no characters must be matched explicitly, including slashes. The BSD pages do not state that globs must be anchored.
Source: Solnix locate(1) DESCRIPTION; FreeBSD/OpenBSD/NetBSD locate(1) DESCRIPTION
FreeBSD, OpenBSD, NetBSDregular expressionsSolnix locate has -r/--regex and --regextype, with emacs-style regular expressions by default. The BSD pages document no regex option, only shell globbing.
Source: Solnix locate(1) -r, --regextype; FreeBSD/OpenBSD/NetBSD locate(1) SYNOPSIS and DESCRIPTION
FreeBSD, OpenBSD, NetBSD-S statistics outputSolnix accepts -S as a synonym for --statistics, but its output differs between GNU and BSD locate. Do not parse it across systems. NetBSD has no -S.
Source: Solnix locate(1) -S; FreeBSD locate(1) -S; OpenBSD locate(1) -S; NetBSD locate(1) SYNOPSIS
FreeBSD-m and -sSolnix accepts -m (--mmap) and -s (--stdio) but does nothing with them. On FreeBSD, -m selects mmap(2) (the default) and -s selects stdio(3).
Source: Solnix locate(1) -m, -s; FreeBSD locate(1) -m, -s
OpenBSD-b meaningBoth Solnix and OpenBSD have -b, which matches against the last path component. On Solnix, the default -w matches the whole name. FreeBSD and NetBSD have no -b.
Source: Solnix locate(1) -b, -w; OpenBSD locate(1) -b; FreeBSD/NetBSD locate(1) SYNOPSIS
FreeBSD, OpenBSD, NetBSD-d empty element and stdinSolnix treats empty elements of the -d path as the default database and reads a database from stdin with -. FreeBSD also reads stdin with -, and says a single colon refers to the default database. OpenBSD says an empty name does. The OpenBSD and NetBSD pages do not mention -.
Source: Solnix locate(1) -d; FreeBSD locate(1) -d; OpenBSD locate(1) -d; NetBSD locate(1) -d
FreeBSD, OpenBSD, NetBSDexistence checks and extra optionsSolnix has -e/-E to filter by current existence, -A to require all patterns to match, -p, -L/-P/-H and --max-database-age. The BSD pages document none of these. The BSD pages recommend find(1) for files that change often.
Source: Solnix locate(1) -e, -E, -A, -p, -L, -P, --max-database-age; FreeBSD/OpenBSD locate(1) BUGS
OpenBSD, NetBSD-c, -0, -l, -i availabilityNetBSD locate has only -d. OpenBSD has no -0 or -m/-s. Solnix and FreeBSD have -0 for NUL-separated output, which is useful with xargs-style tools.
Source: Solnix locate(1) -0; FreeBSD locate(1) -0; OpenBSD locate(1) SYNOPSIS; NetBSD locate(1) SYNOPSIS
OpenBSDcase-insensitive matching and localeOpenBSD -i always works in the C locale with ASCII case rules. The Solnix page says only that case distinctions are ignored in both the pattern and the file names, and does not mention locale.
Source: OpenBSD locate(1) -i; Solnix locate(1) -i
OpenBSD, NetBSDexit statusOpenBSD exits 0 on success, with zero matches not an error. NetBSD exits >0 when no match is found. The Solnix page has no EXIT STATUS section.
Source: OpenBSD locate(1) EXIT STATUS; NetBSD locate(1) EXIT STATUS; Solnix locate(1)
FreeBSD, OpenBSD, NetBSDdatabase location and buildingThe BSD pages name locate.updatedb(8) and, on FreeBSD and OpenBSD, /var/db/locate.database as the default database. The Solnix page refers to updatedb(1) and says the administrator chooses the default database file name. The default path is not stated.
Source: Solnix locate(1) DESCRIPTION; FreeBSD locate(1) -d, SEE ALSO; OpenBSD locate(1) -d, SEE ALSO
FreeBSD, OpenBSDdatabase portabilityThe BSD databases are not byte-order independent. The Solnix page says the GNU database format since 4.0 lets machines with different byte orders share databases, and that old formats are still read.
Source: Solnix locate(1) -d; FreeBSD locate(1) BUGS; OpenBSD locate(1) BUGS

Standards

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

Writing portable scripts

  • Use only a plain pattern and -d, which every system documents, and do not rely on -r, -e, -b or -S output. Check that locate exists on Solnix first, as it is not in the base system.
  • Quote patterns that contain glob characters. For exact results on files that change often, use find(1) rather than a database that may be days old.

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.