How to get a list of programs running with nohup

后端 未结 5 1936
情话喂你
情话喂你 2021-01-29 19:25

I am accessing a server running CentOS (linux distribution) with an SSH connection. Since I can\'t always stay logged in, I use \"nohup [command] &\" to run my programs.

5条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-29 19:47

    Instead of nohup, you should use screen. It achieves the same result - your commands are running "detached". However, you can resume screen sessions and get back into their "hidden" terminal and see recent progress inside that terminal.

    screen has a lot of options. Most often I use these:

    To start first screen session or to take over of most recent detached one:

    screen -Rd 
    

    To detach from current session: Ctrl+ACtrl+D

    You can also start multiple screens - read the docs.

提交回复
热议问题