Tutorial: Rebuild your Locate Database (Page 1 of 1)
Written by
Steve Lake
Posted on: Nov 18, 2009 at 01:55pm
Section:
Tutorials
Printer Friendly Version
Legacy URL

Most people may not know about the wonderful command line tool called "Locate". It's similar to "Find" in that it allows you to find files on your system. However, it's considerably faster (<1sec for results vs possible minutes) than find. The only downside is, the results that Locate gives you may be up to a week out of date. This is because the Locate tool uses a database for all its searches instead of the hard drive as Find does.
A simple way to rectify this, should you be searching for things on your hard drive and need as current a copy as possible (cron does it automatically every week, but periodically you may need to force your pc to create a more current version of the database in between cron runs), is to run the update utility for the Locate tool.
To do this, simply open a command prompt and type "sudo /usr/bin/updatedb". It may give you a warning about updating the db as root, as it'll reveal files that a normal update won't (cron runs with slightly less privileges, so certain hidden files don't get picked up in a normal update). You can safely ignore that. The full update will take anywhere from 1-3 minutes to run, depending on the speed of your system. Once it's done, you're all set.
On a side note, if you should ever need to employ additional options when updating the database, just type "man updatedb" to pull up the man page and see the full list of options available to you.
|
Average vistor rating: (Waiting on 2 more votes.) | |
|
Latest Articles

Shows and Cons Latest Additions

Announcements
 There are no current announcements.
How much do you like Raiden's Realm?

Latest Releases (courtesy of Distrowatch)

More
|