I noticed that locate doesn't include mounted HFS+ volumes (those visible under /Volumes). Here's how to adjust that situation:
[Editor's note: I broke the copy commands onto two lines using the backslash, so they should work if copied and pasted (they did when I tested), but if they don't, enter them as one line...]
- Save the current shell script that updates the locate database:
% sudo cp -p /usr/libexec/locate.updatedb \
/usr/libexec/locate.updatedb.orig - Update the shell script to include the mounted HFS+ volumes (use the name of your favorite editor in place of "edit", mine is bbedit):
% sudo edit /usr/libexec/locate.updatedb
- Locate the find command (about 2/3 down towards the end of the file) and change -fstype devfs to -fstype devfs -o -fstype hfs (i.e., add the hfs filesystem type to the find command).
- Save the updated /usr/libexec/locate.updatedb
- Update the locate database (manually):
% sudo /usr/libexec/locate.updatedb
% sudo cp -p /usr/libexec/locate.updatedb.orig \Hope this helps.
/usr/libexec/locate.updatedb
[Editor's note: I broke the copy commands onto two lines using the backslash, so they should work if copied and pasted (they did when I tested), but if they don't, enter them as one line...]
•
[3,245 views]

