intercept stdout/stderr of another process or disowned process

2010-11-23 1 min read bash Fedora Linux
The command is definately going to save your day if you have disowned the process by mistake. Only uses strace so might as well work on Solaris also, though not tried it. intercept stdout/stderr of another process or disowned process 1 <td> <div class="text codecolorer"> strace -e write=1,2 -p $PID 2>&1 | sed -un "/^ |/p" | sed -ue "s/^.{9 }(.{50}).+/1/g" -e 's/ //g' | xxd -r -p </div> </td> </tr> Useful to recover a output(stdout and stderr) “disown”ed or “nohup“ep process of other instance of ssh. Continue reading