This Article Shows You How-to have a Freshly Updated Locate Database for Searching/Finding Stuff on Linux.
The locate Command is the Easiest and Fastest Way to Find and Search for Files, Directories, Images and Paths on the Unix-like Systems.
If you want to Find a Tutorial for Getting-Started with the Locate Command you Find a Link Inside the Guide.
Relax and Take the Time for Reading, Understanding and Enjoying the Clear Insight Brought to You by this Guide.
- Open a Terminal Window
(Press “Enter” to Execute Commands)
- Check the updatedb Location
The updatedb Path in Most Linux Distros should be: /usr/bin/updatedb
If you Do Not Get any Output find Documentation About the updatedb Command for your System.
- Login as Superuser
If Got “User is Not in Sudoers file” then Look: Solution
- Edit the Root Crontab
The File will be Open on your Default System Terminal Editor and this is One between Two:
- To have a Database Updated Hourly Add this Line to the Crontab
58 * * * * /usr/bin/updatedb
In vi Editor you Need to Hit the “i” Key to Enter in Editing Mode.
- Save & Exit with
- On nano: Ctrl+x
- On vi:
For Getting-Started Using the locate Command.