Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to often search a large directory structure (with 1 G / 13K files of data). find / grep take a lot of time. Is there any utility (or can one make an index of these files) for faster searching.

share|improve this question
What about locate? – ghm1014 Feb 28 '13 at 22:03
Isn't this just a software recommendation request? – Nathan Basanese Aug 5 '15 at 1:06

Depending on your Unix/Linux Flavor you can easily use slocate/mlocate/all the derivates.

Usually u can just hit updatedb as root and then do

locate <searchpattern>

Hitting updatedb again will update your present db and reflects the changes on the fs.

share|improve this answer

In a similar situation (differential backup) I do this first:

find /directory/ -printf . &>/dev/null

This way I get all the file metadata into the cache with optimal hard disk performance (would probably not make much sense with an SSD).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.