用killall杀死所有同名的进程。
[email protected]:~/workpalce/git$ ps -aux | grep vim wang 6548 0.3 0.3 17116 7520 pts/18 S+ 15:55 0:00 vim a wang 6549 0.5 0.3 17116 7440 pts/4 S+ 15:55 0:00 vim b wang 6551 0.0 0.0 6860 844 pts/1 S+ 15:55 0:00 grep --color=auto vim [email protected]:~/workpalce/git$ killall -15 vim [email protected]:~/workpalce/git$ ps -aux | grep vim wang 6554 0.0 0.0 6860 884 pts/1 S+ 15:55 0:00 grep --color=auto vim
用pkill杀死所有同名的进程。
[email protected]:~/workpalce/git$ ps -aux | grep vim wang 6557 0.5 0.3 17168 7596 pts/18 S+ 15:56 0:00 vim thtest.py wang 6558 1.0 0.3 17116 7588 pts/4 S+ 15:56 0:00 vim b wang 6560 0.0 0.0 6860 836 pts/1 R+ 15:56 0:00 grep --color=auto vim [email protected]:~/workpalce/git$ pkill -15 vim [email protected]:~/workpalce/git$ ps -aux | grep vim wang 6563 0.0 0.0 6860 796 pts/1 S+ 15:56 0:00 grep --color=auto vim
时间: 2024-11-07 12:06:17