Convention Listings
                                                                                                                        About Us | Donate! | Contribute! | Report Problems
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.
Discuss this!  ( 3 comments )

Raiden's Realm Social Bookmarking
If you have any problems with any of these links, please let us know.  Thanks.

Digg it! Slashdot It! Del.icio.us Add to StumbleUpon Add to Technorati Reddit! Add to Google Bookmarks Add to FaceBook Share Add to Twitter

Average vistor rating: (Waiting on 2 more votes.)

Community Image Gallery

More Images
Submit new images to gallery

Shows and Cons Latest Additions

 1.  KDE Akademy 2010
 2.  FOSS Nigeria 2010
 3.  LInux Konferenca 2010
 4.  MySQL Conference & Expo 2010
 5.  Maemo Summit 2009
More

Announcements

There are no current announcements.

How much do you like Raiden's Realm?

I love you guys!
You're alright
Uncertain
You've got issues
I hate you!
Penguins Rock!
Other

More Polls
Latest Releases
(courtesy of Distrowatch)

1. PC/OS 10.1
Released: 03/11
2. Wolvix 2.0.0-build52
Released: 03/11
3. trixbox 2.8.0.4
Released: 03/10
4. Xange 2010 (x86_64)
Released: 03/10
5. VortexBox 1.2
Released: 03/10
6. GParted 0.5.2-1
Released: 03/10

More
All original content on this site is copyright of Raiden's Realm via the Creative Commons license. All rights reserved.

Any non original content is the sole property of the respective owners.