From: Yohanes Santoso Date: 2006-07-10T23:28:40+09:00 Subject: Re: fastest way of looping through directories "Thomas Coopman" writes: > I'm looking for the fastest way for looping through directories. > > at the moment i'm using Find but when I test this, the first time it runs > really slow (like 20 seconds) the second time it runs much much quicker Find is about the fastest way. The bottleneck is in the I/O. There is not much you can do about that beside getting a better disk subsytem. The reason it was faster the second time is because your OS had cached the information. If the list of entries are fixed or do not change much, you can try saving them in a file, so subsequent runs do not have to traverse through the directories again. YS.