Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Forgo the alias and read the man page.' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Forgo the alias and read the man page.
Authored by: locateUser on Sep 19, '11 02:12:58PM
If you set the cron job to make your own version of the locate database, you don't need to use an alias to access it with a different command. In the man page for locate the use of the environment variable LOCATE_PATH is documented. Assuming that you have placed your version of the locate database in $HOME/Library/llocate.database, then modify your environment in one of your standard dot files (.bashrc is one):
    export LOCATE_PATH=$HOME/Library/llocate.database:
Note the trailing colon--this will allow locate to use your custom database for your own files and fall back to the system locate database. If you have reasonably restrictive permissions on your machine, then this will allow you to use the power of locate to search both your own filespace as well as what you should be able to see on the system as a regular user.

[ Reply to This | # ]