bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: output as found


From: Bernhard Voelker
Subject: Re: output as found
Date: Tue, 17 Jun 2014 10:34:57 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

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

[Prev in Thread] Current Thread [Next in Thread]