Updating locate command cache?!

Ray Leventhal ubuntu at swhi.net
Mon Oct 26 16:52:17 UTC 2009


Robert Kiwanuka wrote:
> This is a little puzzling!
> 
> $ ls /usr/local/lib/
> python2.6
> $ ls -a /usr/local/lib/
> .  ..  python2.6
> $ locate blas.a
> /usr/local/lib/blas.a
> /usr/local/lib/libblas.a
> robert at latitude-ubuntu:~$ locate lapack.a
> /usr/local/lib/lapack.a
> /usr/local/lib/liblapack.a
> $ rm /usr/local/lib/*.a
> rm: cannot remove `/usr/local/lib/*.a': No such file or directory
> $ locate blas.a
> /usr/local/lib/blas.a
> /usr/local/lib/libblas.a
> 
> Is there any way to force locate to update its cache?!
> $locate --help
> doesn't give any options for updating. I have rebooted twice and still 
> the problem persists!
> 
> Thanks,
> Robert
> PS: This is Ubuntu 9.04; 2.6.28-16-generic
> 
I'm not sure your issue will be addressed by this, but issuing

sudo updatedb && locate <your file or list of files here>

might do the trick

HTH,
-Ray

-- 
=====================================================================
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
=====================================================================
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments




More information about the ubuntu-users mailing list