I have two Tomcat processes, one is called event-ws, another is called app-event-ws. I sometimes need to kill event-ws from a shell script: The above will find and kill both of them; how can I find exactly find one of them? Answer pgrep / pkill are the best tools to use in this case, instead of ps: Each command matches