I need to transfer a large number of files over SFTP (only between Solaris servers) which takes a very long time. I cannot keep my PC on for this duration. I tried:
nohup sftp server1
While the shell is open, I see files are downloaded. When I close the shell it stops. In ps -ef I don't see the sftp process. The file nohup.out states: Killed by signal 15
If instead I do ctrl-z, bg, disown it works. However this requires the bash shell. I'd prefer a solution for ksh.
Thanks.
sftp server1
nohup -ga $(pgrep sftp)
Sounds like a perfect task for GNU Screen.
I don't use KSH myself, but have you tried:
Could you not use scp in a script ? This is non-interactive and therefore doesnt require a terminal, and will work fine with nohup.