First page Back Continue Last page Overview Graphics
Finding Files with locate
Get me all files or directories matching the string “document”
Locate uses a pre-existing indexed database
- cron invokes updatedb daily to update the index of files and directories found attached to the filesystem
- Therefore, if you have just created a file, or downloaded a program, locate will not find it!
Notes:
Most modern distributions run updatedb through cron (the job execution scheduler) daily.
Sometimes you suddenly listen your hard disk spinning wildly for a couple of minutes, and then it stops. Your computer hasn't gone mad – it's updatedb doing its daily chores.
An outdated index is practically useless, since it will not reflect the real contents of your filesystem. So running updatedb at least weekly is recommended.