Linux Ubuntu locate Command Quick Start
This short Tutorial will Get you Started with a Very Useful Linux Ubuntu Shell Utility: the locate Command.
Almost all we are working on linux before or after we need desperately to Find something from the Shell.
The Easiest and Fastest Way to Find System’s Entities in Unix-like Platforms is Matched Using the “locate” Shell Command.
-
Open a Shell session
Ctrl+Alt+t to open a Terminal emulator on Desktop
(Press “Enter” to Execute Commands) -
First, Update the Locate Database:
sudo updatedb
If Got “User is Not in Sudoers file” then see: How to Enable sudo
You will need to Wait for a little while, depending from the Size of your System, Until the Locate Database is Updated…
This procedure Should be Repeated Every Time you Use the locate Command after your System made some Significant Change.How to Automatically Update the locate Database with Cron
-
Simple Keyword Searching
locate [myKeyword]
Whith the Syntax above you can Locate All Files, Directories, Images and Locations Containing the Given “myKeyword”
-
How to Refine your locate Search-Results.
How to Use grep with locate