Another way to skin this cat is to use the `stdbuf` program, which is part of the GNU Coreutils (FreeBSD also has its own one).

 stdbuf -i0 -o0 -e0 command

This turns off buffering completely for input, output and error. For some applications, line buffering may be more suitable for performance reasons:

 stdbuf -oL -eL command

<sub>Note that it only works for `stdio` buffering (`printf()`, `fputs()`...) for dynamically linked applications, and only if that application doesn't otherwise adjust the buffering of its standard streams by itself, though that should cover most applications.</sub>