[Ubuntu] Does the "find" command cache file system info?

Liam Proven lproven at gmail.com
Sun Sep 16 16:06:29 UTC 2012


On 16 September 2012 00:16, John Hupp <ubuntu at prpcompany.com> wrote:
> I'm curious about this observation: If I do a find search on the root
> directory, it ordinarily takes a minute or two -- as one would expect if it
> were examining everything afresh.
>
> But if I follow that up with a different find search on the root, it
> finishes in a few seconds.
>
> Does find cache file system information and reuse it under certain
> conditions?  Or does Linux itself cache some sort of information from an
> initial search that a subsequent search benefits from?

This is precisely what a disk cache is *for*. It is the purpose of its
existence. It caches the indices of, well, pretty much all the
directories of your disk, so next time, the search is purely in
memory.

-- 
Liam Proven • Profile: http://lproven.livejournal.com/profile
Email: lproven at cix.co.uk • GMail/G+/Twitter/Flickr/Facebook: lproven
MSN: lproven at hotmail.com • Skype/AIM/Yahoo/LinkedIn: liamproven
Tel: +44 20-8685-0498 • Cell: +44 7939-087884




More information about the ubuntu-users mailing list