|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Killing multiple jobs
Hi All,
I have number of jobs to be killed and I get the PID by doing ps -aux | grep -i irq | awk '{print $2}' which gives me all the process id's that I need to kill. How do I kill all of them in the command line? thanks, |
|
#2
|
|||
|
|||
|
Looks like the following command will kill all the jobs.
ps -aux | grep -i irq | awk "{print $2}' | xargs kill |
|
#3
|
|||
|
|||
|
I do the following:
ps -aux | grep -i irq | awk '{print "kill "$2}' |sh -x The -x means you get to see it killing each process. I use this method when, say, removing/moving/copying lots of files, so that can see it in progress and not just wait for the command prompt to return. Cheers, Andy |
|
#4
|
|||
|
|||
|
???
Why don't you use:
killall irq instead? |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Killing multiple jobs |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|