I am working in CentOS 7.3 and I kicked off a couple of lengthy processes, unfortunately in the foreground. Then I went away from the terminal and was disconnected from my VPN due to inactivity. So I reestablished my connection and I can see the processes are still active and I get PIDs. Is there any way I can reclaim the process STDOUT if it was just printing to the console and not streamed into a file?

  • 1
    Probably not, and the worse news is when your lengthy processes write to stdout they will probably get signals which kill them. – icarus Feb 19 '17 at 3:23

If the processes are still active and didn't get killed, you can use repytr or reredirect to attach them to a new terminal, see this question.

The way to avoid this problem is to use screen or tmux before you start processes on remote machines.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.