[root@mainlinemb daodao-site]# fg 1
-bash: fg: 1: no such job
[root@mainlinemb daodao-site]# jobs
[2]-  Stopped                 vim src/tr/com/daodao/util/DaoDaoUIUtil.java
[3]+  Stopped                 bounce_httpd.sh -f -d
[root@mainlinemb daodao-site]# fg 3
bounce_httpd.sh -f -d

[3]+  Stopped                 bounce_httpd.sh -f -d
[root@mainlinemb daodao-site]# bg 3
[3]+ bounce_httpd.sh -f -d &

& 最经常被用到 这个用在一个命令的最后,可以把这个命令放到后台执行

ctrl+z 将前台任务暂停并放到后台

jobs  查看当前挂起的任务,在fg或bg之前,执行查看

fg 1~n  前台运行挂起的任务。

bg 1~n 后台运行挂起的任务。(不会随着窗口的关闭而终止)

如果只有一个任务,可以直接fg或bg

 

 

相关文章:

  • 2021-11-03
  • 2022-12-23
  • 2022-01-12
  • 2021-06-27
  • 2021-05-31
  • 2022-12-23
  • 2021-09-01
  • 2022-12-23
猜你喜欢
  • 2021-10-19
  • 2021-08-07
  • 2021-10-08
  • 2021-07-04
  • 2022-01-25
  • 2022-01-19
相关资源
相似解决方案