AirV's Blog

Just another blog

KillAll

Script équivalent de la commande killall pour solaris :

Utilisateur

à tester :

ps -edf | /usr/local/gnu/bin/gawk -v user=$1 ‘{ if ( $1 == user ) { print $2 }}’ | xargs kill -9

Ok :

ps -edf | awk ‘ {if ($1 == « rozec ») print $1 }’ | xargs kill -9

ps -edf | awk ‘/rozec / { print $2 }’ | xargs kill -9

Process

à tester :

ps -edf | /usr/local/gnu/bin/gawk -v proc=$1 ‘{ if ( $8 == proc ) { print $2 }}’ | xargs kill -9

mercredi 22 novembre 2006 Posté par à 16:51 | Linux | 3 commentaires