Step 1: Copy and modify database update program I first copied the original program to a new directory, with this command:
cp /usr/libexec/locate.updatedb ~/bin/llocate.updatedb
I then modified the permissions on my copy:
chmod 755 ~/bin/llocate.updatedb
Finally, I made a few changes to the location of the new database directory, changed the pruned paths, and added vfat to my available filesystems, so that lines 52 to 54 now looked like this:
${FCODES:=$HOME/Library/llocate.database} # the database
${SEARCHPATHS:="$HOME"} # directories to be put in the database
${PRUNEPATHS:="$HOME/tmp $HOME/Library "} # unwanted directories
Step 2: set up crontab I created the file $HOME/bin/cron/crontab that contains the following line to get my llocate to update every hour at the 25 minute mark:
25 * * * * $HOME/bin/llocate.updatedb
Then I load the command into my crontab using crontab $HOME/bin/cron/crontab, and make sure it worked by typing crontab -l.
Step 3: Create the alias Finally, I set up the alias to get the command to work automatically by adding the following command to my $HOME/.bashrc file:
alias llocate='locate -d $HOME/Library/llocate.database'
You should now be able to easily "llocate" your own files!

