Monday, October 25, 2010

Kill multiple jobs OR Kill all jobs of a particular user

# Create a list of specific jobs of a user
ps -ef |grep [username]|grep [jobname eg. telnet]|awk '{print $2}' > /tmp/fileout
while read userpid; do kill -9 $userpid;done < /tmp/fileout

No comments: