[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Locate with exclude?



At 11:37 PM +0530 2/18/07, Vivek J. Patankar wrote:
>Jonathan Rawle wrote:
>> An alternative approach (assuming your FC4 directories are backups you don't
>> need them very often) is to make them unreadable by ordinary users. locate
>> won't return files you wouldn't have permission to see in a directory
>> listing. So you can chmod the directories so they are only readable by
>> root, then they won't show up in locate results. If you ever do want to
>> find something in those directories, run locate as root.
>
>Won't work. The database for /locate/ is updated by a cron job that runs
>as root. So it will index the entire filesystem, except for exclusions
>set in updatedb.conf.

Does too work, as only the files that would be visible to the user running
locate will be reported by locate.  See man updatedb, and try it.
-- 
____________________________________________________________________
TonyN.:'                       <mailto:tonynelson georgeanelson com>
      '                              <http://www.georgeanelson.com/>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]