Name

locate

Synopsis

    locate [options] [pattern]

Search database(s) of filenames and print matches. *, ?, [, and ] are treated specially; / and . are not. Matches include all files that contain pattern unless pattern includes metacharacters, in which case locate requires an exact match.

Solaris does not provide this command. Mac OS X uses the original BSD version of this command that takes no options. For details on the GNU/Linux version of this command, see the slocate entry in the later section "Alphabetical Summary of GNU/Linux Commands.”

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.