之前一直都是用 screen 来后台运行 Linux 进程,但是 screen 对于已经在运行的进程就不方便处理了,这个时候怎么办呢?
-
- Run some SOMECOMMAND
- 1.** ctrl+z **to stop (pause) the program and get back to the shell
- 2. bg to run it in the background
- 3. disown -h so that the process isn’t killed when the terminal closes
-
- Type **exit **to get out of the shell because now your good to go as the operation will run in the background in it own process so its not tied to a shell
- 套路摘选自下面的连接。
这次训练直接用 bg 结果把自己的任务直接干掉了。。。「sad」。记得用 disown -h 来让任务逃离 「terminal」的控制。