I was having this headache for a while:
I'm putty onto my develop machine everyday. Pretty often I need to run some time-consuming tasks, i.e. making a complete build of the whole project, which takes really long time (for my current project, it takes bout one to two hours).
So, when I need to rush to a meeting or go home when the task is still running, I cannot simply close the lid and put the laptop into standby mode because this will close the internet connection and thus disconnect putty from the remote host. The session created by putty would thus just terminated, oops....my task got terminated easily.
Then my wife found me the solution: screen
screen is a Linux tool that allows you to run multiple virtual terminals within a single terminal. To make my task running even I close the putty. I only use some simply options of screen.
1. Before start the time-consuming job, or better to be right after you log into your remote host, run >screen
2. Run your jobs or doing whatever you want to do.
3. When you want to leave or close your putty, simply close it, your session will still running.
4. When you want to start to work again. open another putty and type:
> screen -r
If there's only one screen session detached, it will be bring back automatically. Otherwise, this will gives you a list of virtual terminals that screen maintains. Type >screen -r [pid.tty.host] to get back the session that you were working in.
That's it!
When screen is controlling your session, you may not scroll back the terminal buffer as screen is recording them. To scroll back, type ctrl-a + ESC and then use up- and down- arrow keys to browse up and down. You would notice that screen actually provides you a much bigger buffer! Yeah~~
Monday, September 10, 2007
Subscribe to:
Post Comments (Atom)
4 comments:
Thanks for this discovery. I never knew such functionality really existed. It did work for me... Thanks a lot.
Phaneendra Kiran
Sweet, very handy for long running tasks
Oh! was exited and know of this and working great! million thanks dude for the small screen linux tool!
Technical Resume
Thank you!!! Very helpful post!
Post a Comment