Linux – No log content with tail but when terminating a process I see content with less

io-redirectionlinuxnohuptail

Basically, I am running:

nohup ./executable &> /tmp/out.log &

In order to make sure the process is running I ran the command:

tail -f /tmp/out.log

But the only thing I can get from tail is "nohup: ignoring input", and once killing the process that previously started I can see the contents of out.log

Best Answer

Run your program as:

nohup stdbuf -oL ./executable &> /tmp/out.log &

stdbuf can change the default buffering.

Related Question