How to search directory for specific files?

What is the fastest method to search for files in the Linux directory tree?

  • Answer:

    I use the locate command. Locate just queries a database and prints out the location of the file as it is in the database. The only drawback is that you have to index your files regularly if your directories and files change to keep the database up to date. updatedb -->Indexes files. (you can do this in a cron job if you don't want to do it manually) locate filename -->prints the location of the file filename.

wiki.answers.com Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.