bash: force exec’d process to have unbuffered stdout

GNU coreutils-8.5 also has the stdbuf command to modify I/O stream buffering: http://www.pixelbeat.org/programming/stdio_buffering/ So, in your example case, simply invoke: stdbuf -oL /usr/bin/some_binary > /tmp/my.log 2>&1 This will allow text to appear immediately line-by-line (once a line is completed with the end-of-line “\n” character in C). If you really want immediate output, use -o0 instead. … Read more