|
|
Make the locate command ignore certain directories
Hm, I feel sad to tell you that there is an easier way, since you spent surely a lot of time in editing the system file. But first of all, modifying a system file is not recommended, especially if there is a config file which will make things work for you. First you should have read the manpages:
Then you would have seen that the locate database config file is:
in the manpage you also will see this:
and the usage of the command:
I recommend creating a locate.rc file in /etc and specifying the prunepaths there.
---
Make the locate command ignore certain directories
thx cilly for that info on /etc/locate.rc. It does sound like that shoudl be the place to put pruned dir.
Can you give us a little info on the format for the /etc/locate.rc file. By default there is no locate.rc file so I am not sure of the syntax of this file. Quick search on Google yields this info - looks like it could be used (not this is for OpenBSD - DO NOT USE WITHOUT MODIFYING):
Make the locate command ignore certain directories
This looks good!
I would use the full path:
You only need to add i.e.
---
Make the locate command ignore certain directories
Where does /etc/locate.rc come from? I have 10.2 and 10.3, but couldn't find this file on either system. I think that's the reason the hint poster didn't use it.
Make the locate command ignore certain directories
The locatedb.rc does not exist and as a previous poster noted - I don't think the version of locate included with OS X or Fink is taking into acct the locatedb.rc by default. I tried the format above and told it to prune my "Previous Systems" dir and it did not. So it looks like the rc is not being used. I don't even see a cmdline switch to get locate.updatedb to read in teh configs from locatedb.rc.
Make the locate command ignore certain directories
do man locate.updatedb and you will see it is locate.rc !
Make the locate command ignore certain directories
Actually locate.rc is what I used - I just typed it wrong above. Still not observing my prefs in /etc/locate.rc
Make the locate command ignore certain directories
yes, but if you actually read locate.updatedb (which is a shell script) you see that it doesn't account for these command line arguments anywhere. I don't see how it could possibly use them. I think the man page must be out of sync with the installed version. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.07 seconds |
|