Category: Linux Terminal
Added: 27th of November 2020
Viewed: 2,226 times
Using mlocate to find files by name, extension using the terminal in Linux
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