[SM-Discuss] Using 'locate' in sorcery?

Paul Mahon dufflebunk at dufflebunk.homeip.net
Mon Apr 4 10:48:07 EDT 2005


Sorcery doesn't use locate, it generally uses find... if you were asking
why sorcery uses it.
If you were asking the more general question, "Why use locate?" Here's
why:
Updatedb can be scheduled to run at a time when you're not using the
computer (5am on Sundays is usually good for me), this keeps the db up
to date, and locating a file takes a fraction of a second. It takes
about as long to do an updatedb as it takes to do a 'find /' and with
locate you can do multiple lookups without having to search the whole HD
each time.

On Mon, 2005-04-04 at 10:23 -0400, Jeremy Kolb wrote:
> But why use locate?  I never run updatedb and after awhile the db gets 
> horribly out of synch.  Updatedb also takes a ridiculous amount of time 
> to run.  What is locate doing in sorcery?  Why not use find?
> 
> Jeremy
> 
> 
> Paul Mahon wrote:
> > locate is provided by findutils, which is still part of the base system.
> > You will need to run updatedb at least once as root to create the
> > locatedb file. I don't think it runs it automaticaly, and I don't think
> > it sets up a cron job to do it either.
> > 
> > On Mon, 2005-04-04 at 09:15 -0500, sergey at optimaltec.com wrote:
> > 
> >>It looks like the latest devel sorcery is using `locate.' I can see the messages
> >>that /var/cache/locatedb is missing. I don't think locate is part of the
> >>basesystem. Any reason for this?
> >>Thanks!
> >>
> >>Sergey.
> >>_______________________________________________
> >>SM-Discuss mailing list
> >>SM-Discuss at lists.ibiblio.org
> >>http://lists.ibiblio.org/mailman/listinfo/sm-discuss
> >>
> >>
> >>
> >>------------------------------------------------------------------------
> >>
> >>_______________________________________________
> >>SM-Discuss mailing list
> >>SM-Discuss at lists.ibiblio.org
> >>http://lists.ibiblio.org/mailman/listinfo/sm-discuss
> 
> _______________________________________________
> SM-Discuss mailing list
> SM-Discuss at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/sm-discuss
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.ibiblio.org/pipermail/sm-discuss/attachments/20050404/676f1749/attachment.bin 


More information about the SM-Discuss mailing list