|
|
Create a customized user-centric locate database
Interesting approach, but you could skip steps 1 and 2 (and eliminate the overhead of the cron job running the extra process to build a duplicate-but-smaller locate database), and simply replace step 3's alias with:
That'll filter the 60,000ish lines returned for ".doc" through grep, returning the 584 that start with /Users/your_name/. That said, I normally disable the weekly run of the Apple-supplied locate.updatedb, then install GNU findutils under /usr/local (I prefer GNU's find, xargs, and locate over BSD's), and set up /etc/daily.local so it updates the database every night (I get cranky with week-old results, and want all files locatable, rather than just those visible to user "nobody", since I'm the only user on the system). If I want up-to-the-minute results, there's always find or Spotlight.
Create a customized user-centric locate database
While the method you suggested should work as well, it requires that the original locate command be set up and running on all user directories. Mine was not set to do this by default. Likewise, because of this others can search your files quite easily. Something that you may not want.
Create a customized user-centric locate database
Your approach assumes that your permissions are not by default restrictive. Locate's view of the filesystem is supposed to be of the user nobody, otherwise it would override the systems permissions. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks 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.09 seconds |
|