Slocate
From Linux 101, The beginner's guide to all things Linux.
When it comes time to search for files on your computer, this can be a slow process. If you go through each directory and attempt to find a file you are looking for, it is takes a good bit of time even if the process is automated. This is because your harddrive is one of the slowest things in your computer.
In an effort to speed this up, a program called locate was created. locate read from a simple database of a file listing created by updatedb. This process turns out to be much quicker, because it does not require so many hard drive seeks.
After locate was created, it was discovered that it could be a potential security risk, because people could see the files of other users. To enhance security, slocate was created. The slocate version of updatedb also stores file permissions, and it will only show the files which the user has the permissions to see.
|
Note: Most distributions have a cron/at entry each night to run updatedb. Usually there is no need to run it yourself. Also if the database is older than 7 days, it should warn you. |
Some useful commands:
- #
updatedb- (as root to update the database of files. This process could take several minutes.)
-
locate <search string>

