Thank you for your suggestions. As I see my problem can be converted to a function request or a wish :-)
If I strace 'ls -1f' I can see some getdents64() calls and write() calls in turns, so I think it is possible to list entries in case of no implicite or explicite sort. Best regards, Istvan 2014-06-17 10:34 GMT+02:00 Bernhard Voelker <m...@bernhard-voelker.de>: > On 06/11/2014 04:45 PM, Istvan Toth wrote: > >> is there a way to list files immediately as 'find' finds them? >> >> The problem is when searching in large NFS-mounted directories (e.g. >> millions of files in a poorly designed, flat directory) >> we must wait for the big number of getdents64 calls to end up before we >> get >> the first entry found. >> > > As no-one else jumps in: > > I think you can't force to already print something of the current > getdents64 call ... as this one is blocking, and find will have to > wait until it finishes. > > OTOH, if you want find to flush the output of directories already > processed before, then you could either use an external tool for > printing, like this: > > $ find . -exec printf "%s\n" '{}' + > > or use the tool stdbuf(1) from the coreutils package - if available > on your platform - to set the output to line buffering: > > $ stdbuf -oL find . > > Have a nice day, > Berny >