سؤال

  • 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