[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}')
arrow
arrow
    文章標籤
    ps aux linux awk grep
    全站熱搜

    peicheng 發表在 痞客邦 留言(0) 人氣()