Linux command locate - useful for err... locating files?

I came across a useful linux command that i hadn't seen before. Called locate. it returns the full path of a file that you enter.

For example:

# locate php.ini
/etc/php.ini

As you can see it produces the full path for that file. Pretty handy. However there are occasions where it produces too many locations to be useful!

It can also work using regular expressions. Check out man locate for the full lowdown.

comments powered by Disqus