• I have huge file to transfer from one server to another server.
  • Im using sftp mode and using command eg: "sftp>put file.txt"
  • Question : how do i run the command in nohup so that i can close my sftp session without killing the transfer process.
有帮助吗?

解决方案 2

echo "put file.txt" | sftp -b - servername &

If I understand you correctly.

其他提示

  echo "put file.txt" | sftp username@hostname
  ctrl-z
  bg
  disown

Nohup doesn't work with sftp, if you close the shell , it will kill the process. Just put the command to run in crontab, process will continue, even you close all shells.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top