Take a look at the source code of the "find" command how this is done.
find is very fast in doing this.

Werner


On Tue, 24 Apr 2001, Min Yuan wrote:

> Hello,
>
> We have a directory on Redhat 6.2 with 500, 000 files. In our code we open and read 
>the directory and for each entry in the directory we use lstat() to check for some 
>information. The whole scanning takes more than eight hours which is terribly long.
>
> Is there any way we could reduce this length of time? If the answer is NO, then is 
>there any official documents about it and where can we find it?
>
> Thank you!
>
> Min Yuan
> VytalNet, Inc.
> (905)844-4453 Ext. 241
>



_______________________________________________
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

Reply via email to