If you are a CLI enthusiast like myself and always looking for a file but don't know where it is exactly then I got a solution for you
First install mlocate in your system
update: I failed to mention that you need to first update your database before searching anything
put this in your terminal
sudo updatedb
Type
locate keyword
and you will see your results like this. However, if you search for something that is very common you will get hundreds of results and that won't be ideal.
However, if you search for something that is very common you will get hundreds of results and that won't be ideal.
My typical command is the following
locate keyword | grep keyword
grep searches one or more files for lines that matches a regular expression pattern.
Hope this helps whenever you are trying to edit a file that you haven't touched in months.
Top comments (3)
Have you tried using
whereis
?yes, but whereis doesn't show as much results as locate
Ohh I see, I found out that
whereis
searches only in the dirs listed inPATH