Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
How can I disown a running process and associate it to a new screen shell?

I have started (as expected) a long copy process from ssh shell (putty) which died due to client problem. What I see now is that process is still actively running, but I have no way to control it, since my shell died:

# w
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     pts/0    192.168.X.Y   15:35    2:03m  4:39   4:39  cp -i -a source/ /data/

Now I am wondering if I could somehow transfer this process to my new ssh terminal (or screen).

share|improve this question

marked as duplicate by jofel, Renan, uther, jasonwryan, Gilles Jan 15 '13 at 23:32

This question was marked as an exact duplicate of an existing question.

Reptyr does what you need:

reptyr is a utility for taking an existing running program and attaching it to a new terminal. Started a long-running process over ssh, but have to leave and don't want to interrupt it? Just start a screen, use reptyr to grab it, and then kill the ssh session and head on home.

share|improve this answer

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