3.8.13

Screen > nohup

I've been using SCREEN for everything lately.  Its this simple but I always forget the incantations.  So... here goes.  Very dumb post.  But I need it for notes :)


NOTE: Screen is not across accounts! Make sure, when you run these commands, you are aware of your login.


1) Create a new screen, call it "my_process":
> screen -S my_process

Now, click "Ctrl-A + d" (that is, hit "CTRL+A", followed by "d").  This will detach you from your screen session.

2) Now find its name:
> screen -ls 17276.my_process
3) Finally, get back into it.
> screen -x 17276.my_process

4) And finally, kill it

    > screen -S 17276.my_process -X kill

(or screen -r to rejoin as opposed to join it anew.  in general , i just use -x)

This is way simpler than using nohup, because you don't have to artifically log data to a file unnecessarily, nor do you have to manage multiple temporary files.

Also - it gives you context specific history - so that you can scroll through your history in context of the different processes that your running.

No comments:

Post a Comment