man locate
says:
The locate database is typically built by user ``nobody'' and the
locate.updatedb(8) utility skips directories which are not readable for
user ``nobody'', group ``nobody'', or world. For example, if your HOME
directory is not world-readable, none of your files are in the database.
Since it's better for security to have a non-world-readable home directory, how do I make my home directory searchable (for me only)?
Obviously, I can just work around it by adding find ~ -type f > .locate
in crontab
and then do grep <search> ~/.locate
, but is there a standard way of doing this using the built-in locate
?