2013年12月6日 星期五

[linux]kill more than one process use ps aux grep awk

[linux]kill more than one process use ps aux grep awk

you can use ps aux ,grep find your program name

#ps aux | grep "prog_name"

using awk to parse process id
#ps aux | grep "prog_name" | awk '{print $2}'

kill all process
#kill -9 $(ps aux | grep "prog_name" | awk '{print $2}')

沒有留言:

張貼留言