The locate utility searches a database for all
pathnames which match the specified pattern.
The database is recomputed periodically (usually weekly or daily), and
contains the pathnames of all files which are publicly accessible.

Shell globbing and quoting characters
(‘*’,
‘?’,
‘\’,
‘[’, and
‘]’) may be used in
pattern, although they will have to be
escaped from the shell. Preceding any character with a backslash
(‘\’) eliminates any special meaning
which it may have. The matching differs in that no characters must be matched
explicitly, including slashes (‘/’).

As a special case, a pattern containing no globbing characters
(“foo”) is matched as though it were “*foo*”.

Historically, locate stores only characters between
32 and 127. The current implementation stores all characters except newline
(‘\n’) and NUL
(‘\0’). The 8-bit character support does
not waste extra space for plain ASCII file names. Characters less than 32 or
greater than 127 are stored as 2 bytes.

locate may fail to list some files that are
present, or may list files that have been removed from the system. This is
because locate only reports files that are
present in a periodically reconstructed database (typically rebuilt once a
week by the weekly(8) script).
Use find(1) to locate files that
are of a more transitory nature.

The locate database is built by user
“nobody” using
find(1). This will skip
directories which are not readable by user “nobody”, group
“nobody”, or the world. E.g., if your home directory is not
world-readable, your files will not appear in the
database.

The locate database is not byte order independent.
It is not possible to share the databases between machines with different byte
order. The current locate implementation
understands databases in host byte order or network byte order. So a
little-endian machine can't understand a locate database which was built on a
big-endian machine.