Reputation: 603
Trying to kill
very process related to Java. Is there a way to use pipe for it? I have tried
ps -e|grep "java"|kill
and
ps -e|grep "java"|xargs kill
Neither works.
Upvotes: 4
Views: 7898
Reputation: 313
You can also use pkill java
. pkill
is pgrep
and kill
combined into one command.
Upvotes: 1
Reputation: 20759
There is, but this is easier (presuming your system has killall
):
killall java
Upvotes: 6