Using nohup on Solaris 10

nohupsolarisunix

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.

Best Answer

  • Start your sftp session as usual: sftp server1
  • Put it in the background with Ctrl+Z
  • Disconnect it from its parent with nohup -ga $(pgrep sftp)