How To - Search Linux Files Extremely Fast Using "locate" Command
This one is a great little “trick” I learned from a friend a while back and figured it would be a good one to share as well.
You will most likely need to install “locate” on the Linux machine. While the command you will be using is “locate”, the package was called “plocate”.
The “locate” command in Linux is very much like the “Everything” GUI app for Windows. If you have never tried “Everything,” I recommend it!
Install the locate Command
sudo apt install plocateUpdate the locate database
Once installed, run this command to update the plocate database
sudo updatedbLocation of the locate database
This is where it stores the names of the files and folders on the machine.
/var/lib/plocate/plocate.dbHow To Search Files Extremely Fast
Now that you have Locate installed, you can type search commands like this:
Specific File
example: "splash.css.gz"
locate splash.css.gzWildcard Search
example: Search for any files with the word “splash” in them.
locate "*splash*"Look at how fast the search is compared to “ls”!



