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

Reply via email to