linux job
阅读原文时间:2023年07月08日阅读:1

通常运行的进程 ctrl-z之后会暂停到后台

bash test.sh


Linux-4.15.0-36-generic-x86_64-with-Ubuntu-16.04-xenial
#39~16.04.1-Ubuntu SMP Tue Sep 25 08:59:23 UTC 2018
('64bit', 'ELF')
Python:2.7.12 (default, Dec  4 2017, 14:50:18)
[GCC 5.4.0 20160609]

程序暂停

Ctrl-Z

把程序调到前台

fg


jobs -l
[1]+ 24647 Stopped                 bash test.sh


jobs
[1]+  Stopped                 bash test.sh

杀死进程的方法

kill %1

1 就是上面方括号里的数

或者 用

kill -9 24647