Pause a screen terminal
I constantly use terminal screens to manage different tasks in linux. I would like to know if is possible to 'pause' or 'suspend' a given screen and resume it later (no reboot in between).
Let's say that I create the following screen:
screen -S RThen I start R and let a process running:
for(lop in 1:1000000){
print(lop)}There is a way to say something like:
screen -X -S R pauseAnd resume afterwards wit something like:
screen -X -S R pauseMy whole point is to release some processing power temporarily without killing long processes. I would be glad for any light here.
1 Answer
Since you started screen with screen -S R, you initially started with a shell inside the screen session, probably bash. So, you could take advantage of bash's job management by pressing Ctrl+Z to suspend the R process, and then resume it later with fg:
[1] 7221
[1] 7222
[1] 7223
[1] 7224
^Z
[1]+ Stopped R
$ fg
[1] 7225 1