Link to home
Start Free TrialLog in
Avatar of supportpro
supportpro

asked on

How to stop all old process in one command

I hve more than 200 old backup process running when I issue
ps -ef| grep bp

how can i kill all the 200 backup process in HPUX
Avatar of Tintin
Tintin

Assuming a modern version of HP-UX

pkill bp

or the longer way

ps -ef | awk '/[b]p {print $2}'  | xargs kill
Avatar of supportpro

ASKER

# ps -ef | awk '/[b]p {print $2}'
 syntax error The source line is 1.
 The error context is
                /[b]p {print >>>  $2} <<<
 awk: Quitting
 The source line is 1.


please provide the corrected syntax
ASKER CERTIFIED SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks