On 25/10/2019 08:56, Ray Satiro wrote:
Recently I tracked down a delay in some scripts to this line:

find / -name filename* 2>/dev/null | head -n 1

Some notes:

find(1) will only get the sigpipe if it writes _after_ head(1) exits.

The write pattern is dependent on the buffering in the pipeline. See:
https://www.pixelbeat.org/programming/stdio_buffering/

If you do want to only print a _single_ file, you can do this within find(1) 
like:
  find / -name 'initrd*' -print -quit

cheers,
Pádraig

Reply via email to