I was using rsync to copy 15GB files between servers using putty. I want to know that if i close putty terminal does that also termiates rync or not because file is not copied properly.
I have tried that when i am doing backups then even if i close putty then scrip continue to run in background
Press the i button from the keyboard to start the editing. Press the Esc button to stop the editing. Type :wq! to Save the file & Close the editing window.
Assuming your goal is to have the rsync command continue to run, the simplest thing is to orphan the job. There are two ways to do this:
(rsync foo bar &)
The above will create the job detached from your terminal in the beginning, so closing the terminal will not stop it.
rsync foo bar & # or without &, then Ctrl-Z to stop, then "bg" to background
disown
The above will disown a running job, so you can close the terminal without stopping it.
Finally, you could use the program screen(1)
or similar to keep a terminal session alive and intact (and able to be resumed) even when you end your Putty session.
Generally most command will quit if the console is closed. If you want them to keep running look at the NOHUP command (Nohup is No Hang Up Process, a hang over from the days of modems and 'hanging up' the phone)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With