Tuesday, January 06, 2009

Performing / Managing Background Jobs in Linux

To perform processes in the background in Linux, use the command screen (instead of the session-tied-up nohup).

Screens are terminal sessions which can be detached (placed in the background) and reattached (placed in the foreground). When detached, these screens still run and can be brought back again for use in future connections.

Command list:

screen -list
     Displays all the running screens and their socknames
screen -S
     Creates a new screen with as the name instead of a generated one
screen -r
     Reattaches a detached screen

When a screen is attached, you can either use..

Ctrl+A then Ctrl+D to detach the current screen, or
Ctrl+D to terminal the screen.

0 Comments:

Post a Comment

<< Home