Up to $140 off-Lowest  Prices of 2024(Nov.21-Dec.2)

My Computer Tips

Home | About | Categories | All Tips & Tutorials

Using mlocate to find files by name, extension using the terminal in Linux

ID: 221

Category: Linux Terminal

Added: 27th of November 2020

Views: 2,279

To find files by name, extension we can use the mlocate command in the terminal. I found this really useful trying to track down a file a couple of days ago.

You will first need to install mlocate by entering the following command

sudo apt-get install mlocate

Then it's just a matter of using the mlocate command followed by what you want to search for.

For example to search for .png files
mlocate .png

To search and count the number of .png files use the -c switch
mlocate -c .png

For further information on mlocate just enter the following in the terminal
mlocate --help