Does quitting putty close the running command

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)


I'd advocate performing long operations such as rsyncing 15GB across a network (or more pertinent to StackOverflow and programming, performing a large build on a remote host) within a GNU Screen session.

Then you can disconnect from the session (by closing PuTTY, if you like) and reconnect later to see how your job is progressing.


Update some time later...

These days I use and recommend tmux over gnu-screen.


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.