Skip to content

Instantly share code, notes, and snippets.

@eegrok
Created June 28, 2012 23:09
Show Gist options
  • Select an option

  • Save eegrok/3014621 to your computer and use it in GitHub Desktop.

Select an option

Save eegrok/3014621 to your computer and use it in GitHub Desktop.
osx locate.updatedb script -- edit to make all files visible to you findable via locate
from: http://recoveringphysicist.com/16/limitations-of-the-mac-osx-locate-utility
(normally files in directories that aren't readable by the nobody user / world readable are not locateable).
One can edit a copy of /usr/libexec/locate.updatedb and put the edited copy in place either by hand or via launchctl. I replaced three occurrences of “nobody” with my username in that script, reran it, and now locate reports on all files under ~/Library — indeed on all files readable by my user.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment