1. command & : 后台运行,你关掉终端会停止运行
2. nohup command & : 后台运行,你关掉终端也会继续运行(不依赖当前终端)

 

ctrl+z , 挂起程序

bg 1 , 1为作业号,后台运行

fg 1,调用到前台运行

jobs 查看后台的工作任务

 

输出重定向到文件

[nohup] command > out.file 2>&1 &

nohup, no hang up, 不依赖当前终端,及时关闭当前终端,也会继续运行。

 

参考地址:

https://www.cnblogs.com/lwm-1988/archive/2011/08/20/2147299.html

 

相关文章:

  • 2021-09-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-04
  • 2022-02-07
  • 2021-11-17
  • 2021-06-18
  • 2021-10-19
相关资源
相似解决方案