Sam*_*amK 23 bash job-control background-process
可能的重复:
如何否认正在运行的进程并将其关联到新的屏幕外壳?
我启动了一个持续很长时间的命令。我不得不断开连接,所以我bg
在退出之前将它移到后台(使用 CTRL+Z 和)。
像这样的东西:
$ my_command
***command is beeing executed and is taking a long time***
^Z
[1]+ Stopped my_command
$ bg
[1]+ my_command &
$ exit
Run Code Online (Sandbox Code Playgroud)
我重新连接并可以在进程列表中看到该命令,但无法使用fg
.
$ fg
-bash: fg: current: no such job
Run Code Online (Sandbox Code Playgroud)
我如何在前台恢复我的工作?