from R News Vol. 7/1 April 2007 (http://cran.r-project.org/doc/Rnews/Rnews_2007-1.pdf):
If you need to run R code that executes for long periods of time upon remote machines, this amazing unix tool would became your best friend!
screen is a so-called terminal multiplexor, which allows us to create, shuffle, share, and suspend command line sessions within one window. It provides protection against disconnections and the flexibility to retrieve command line sessions remotely.
Starting using this utility is easy like ABC:
- Log in to remote server
- Run screen
- Run R and the long calculation
- Detach screen (Ctrl-a, Ctrl-d)
The R session continues working in the background, contained within the screen session. If we want to revisit the session to check its progress, then we:
- Log in remotely via secure shell
- Start screen -r, which recalls the unattached session
- Examine how your calculation/script is performing
- Detach the screen session, (Ctrl-a, Ctrl-d)
- Log out
This procedure can be used, clearly, for invoking whatever unix program/command you need to use; it is sufficient to substitute the R invoking command with your invoking command line program(for example python).
As usual in the shell-space, invoking man