Dropbox and locate

command linedropbox

I frequently use the locate command to find files on my machine, but it doesn't index the Dropbox folder. I can't find any way to configure the folder selection. Is there a way to include dropbox in the locate database (locatedb)?

(locate is not enabled by default on mac; you have to run sudo /usr/libexec/locate.updatedb to set it up the first time)

Best Answer

Locatedb is controlled by the file /etc/locate.rc. You can add your dropbox path to the line starting with SEARCHPATHS.