I tried this
Code:
ps aux | awk '{ print $8 " " $2 }' | grep -w Z | awk '{ print $2 }' | xargs -0 sudo kill -9
That will first print
"Z 11022"
and then
"11022"
Then I used xargs to pass a command to each output. Is this correct?
Code:
xargs -0 sudo kill -9
However I get this output:
Code:
...
11022
".
Usage:
kill pid ... Send SIGTERM to every process listed.
kill signal pid ... Send a signal to every process listed.
kill -s signal pid ... Send a signal to every process listed.
kill -l List all signal names.
kill -L List all signal names in a nice table.
kill -l signal Convert between signal numbers and names.