Everywhere All articles Download

Command line and power tools

Using locate on a Mac

Updated 2026-07-31 · 4 min read

locate is the closest thing Unix has to an instant filename index. On macOS it is disabled by default and updated weekly, which explains most complaints about it.

Enabling it

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist

Then build the database, which takes several minutes:

sudo /usr/libexec/locate.updatedb

Using it

locate invoice
locate -i INVOICE        # case-insensitive
locate "*.pdf" | head -20

It is genuinely instant, because it is reading a prepared database rather than walking directories.

The catch

The database updates weekly, via a launch daemon. Anything created since the last update is invisible; anything deleted still appears. For a tool whose entire appeal is being current, that is a serious limitation.

Rebuild manually when it matters:

sudo /usr/libexec/locate.updatedb

What it does not cover

locate.updatedb skips a lot by default — /tmp, /var/folders, network mounts, and anything the daemon cannot read. It also stores only paths, so there is no size or date filtering.

Where it fits

locate is a reasonable middle ground: faster than find, less complete than a maintained index, and free. If you want the speed without the staleness, the difference is a tool that watches the filesystem for changes rather than rebuilding on a schedule — which is what FSEvents makes possible, and what separates a weekly snapshot from a live index.

Common questions

Why does locate not find a file I just created?

The database is rebuilt weekly. Run sudo /usr/libexec/locate.updatedb to refresh it.

Is locate faster than find?

Much. It reads a prepared database instead of walking the filesystem — at the cost of being out of date.

Find any file before you finish typing

Everywhere keeps track of every file on your Mac — including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.

Download for Mac

Related

© 2026 Caretopia Network Private Limited Everywhere for Mac Articles Privacy Support