[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}')
相关文章