Home page of this blog

Friday, September 3, 2010

linux locate command

Today evening, my colleague was searching for a header file (errno.h) using nautilus in Ubuntu. He was waiting for his search to complete and making fun of the gnome icon doing animation. He waited for another 15 minutes ...

But, still nautilus kept on searching ... not a single result. Then I offered him my help, by opening command line.

locate errno.h






and instantly, it displayed all the files to the disbelief of my colleague

So do you want to search system files like that instantly? Use locate command



locate <system filename you want to search >


say for e.g I want to find javadoc, index.html path to open javadoc locally, here is how I search

locate index.html | grep java








Invoke updatedb as rootTo keep your locate db always updated which is maintained as an index for that superfast search

sudo updatedb



No comments:

Post a Comment