kill all processes by process name - kill $(ps -ef | grep processname | awk '{print $2}'
kill $(ps -ef | grep processname | awk '{print $2}'
[root@localhost ~]# ps aux | grep sleep | grep -v grep | awk '{print $2}'
6631
6632
6633
6634
6635
6636
[root@localhost ~]# kill $(ps aux | grep sleep | grep -v grep | awk '{print $2}')
[root@localhost ~]# ps aux | grep sleep | grep -v grep | awk '{print $2}'
[1] Terminated sleep 600
[2] Terminated sleep 600
[3] Terminated sleep 600
[4] Terminated sleep 600
[5]- Terminated sleep 600
[6]+ Terminated sleep 600
[root@localhost ~]# ps aux | grep sleep | grep -v grep | awk '{print $2}'
[root@localhost ~]#
[root@localhost ~]# ps aux | grep sleep | grep -v grep | awk '{print $2}'
6631
6632
6633
6634
6635
6636
[root@localhost ~]# kill $(ps aux | grep sleep | grep -v grep | awk '{print $2}')
[root@localhost ~]# ps aux | grep sleep | grep -v grep | awk '{print $2}'
[1] Terminated sleep 600
[2] Terminated sleep 600
[3] Terminated sleep 600
[4] Terminated sleep 600
[5]- Terminated sleep 600
[6]+ Terminated sleep 600
[root@localhost ~]# ps aux | grep sleep | grep -v grep | awk '{print $2}'
[root@localhost ~]#
ps aux | grep -i csp_build | awk '{print $2}' | xargs sudo kill -9
Comments
Post a Comment