Operating System - HP-UX
1847006 Members
4903 Online
110257 Solutions
New Discussion

Re: Do inodes cache directory size?

 
Philip Kime
Regular Advisor

Do inodes cache directory size?

If I run du on a directory, it's mch quicker the second time. Is this an artefact of memory caching or will it in fact remain faster? I'm asking because I have to do some heavy find'ing and I'll like to be able to prune on directory size checksums but there's no point if I use du to do this and it has to go through the whole tree anyway ...
2 REPLIES 2
John Bolene
Honored Contributor

Re: Do inodes cache directory size?

It is memory caching.

It will remain faster as long as the entries reside in cache.
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
Wodisch_1
Honored Contributor

Re: Do inodes cache directory size?

Hi,

for the case you mentioned I would recommend to do only a single "find . -print" and redirect the ouput into a (temporary) file.
Then use "grep" on that file - much less trouble for your system, much faster for your results...

HTH,
Wodisch