If I use a command like this one: ./program >> a.txt & , and the program is a long running one then I can only see the output once the program ended. That means I ha
If you're trying to modify the behavior of an existing program try stdbuf (part of coreutils starting with version 7.5 apparently).
This buffers stdout up to a line:
stdbuf -oL command > output
This disables stdout buffering altogether:
stdbuf -o0 command > output