Friday, July 4, 2014

Linux: how to kill all process instances by process name


ps -elf | grep <process_name> | grep -v grep | awk '{print $4}' | xargs kill -9

Example:

ps -elf | grep maven | grep -v grep | awk '{print $4}' | xargs kill -9 

No comments:

Post a Comment