Linux kill multi processes

The following command prints the second column in the output of processes which contains oraxpo in their name.

$ ps -ef | grep oraxpo | grep -v grep | awk '{print $2}'
4665
4667
4669
4671
4673
4675
4677
4679
4681
4683
4685
4687
4689
4691
4713
4715
4719
4735
4749
7720

Now all we need to do is to pass the result of this command to "kill -9".

$ kill -9 `ps -ef | grep oraxpo | grep -v grep | awk '{print $2}'`

NOTE: Please don't try this unless you have tried every thing else and there is no way else left then killing oracle like this.

猜你喜欢

转载自roddy.iteye.com/blog/2271984