1,信号 杀手三人组
#kill
#pkill 慎用,容易模糊匹配进程误杀
#killall
kill命令发送信号
2,后台进程管理
[root@cat logs]# vim a.log [1]+ Stopped vim a.log [root@cat logs]# jobs [1]+ Stopped vim a.log [root@cat logs]# bg [1]+ vim a.log & [1]+ Stopped vim a.log [root@cat logs]# kill %1 [1]+ Stopped vim a.log [root@cat logs]# jobs [1]+ Stopped vim a.log [root@cat logs]# kill %1 [1]+ Stopped vim a.log [root@cat logs]# jobs [1]+ Stopped vim a.log [root@cat logs]# ps -aux|grep vim Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ root 1619 0.0 0.0 139164 3384 ? S Apr09 0:00 vim /data/liexin_config/app.ini root 2363 0.0 0.0 139256 4776 pts/0 T 20:00 0:00 vim a.log root 2888 0.0 0.0 103340 876 pts/0 S+ 20:01 0:00 grep vim root 15312 0.0 0.0 139344 1684 ? S 2021 0:00 vim db.ini [root@cat logs]# kill 2363 [root@cat logs]# jobs [1]+ Stopped vim a.log [root@cat logs]# ps -aux|grep vim Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ root 1619 0.0 0.0 139164 3384 ? S Apr09 0:00 vim /data/liexin_config/app.ini root 2363 0.0 0.0 139256 4776 pts/0 T 20:00 0:00 vim a.log root 2907 0.0 0.0 103340 880 pts/0 S+ 20:01 0:00 grep vim root 15312 0.0 0.0 139344 1684 ? S 2021 0:00 vim db.ini [root@cat logs]# kill -9 2363 [root@cat logs]# jobs [1]+ 已杀死 vim a.log [root@cat logs]# jobs