User Tools

Site Tools


kurs:kill_user.sh

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

kurs:kill_user.sh [2014/09/10 21:22]
kurs:kill_user.sh [2014/09/10 21:22] (current)
Line 1: Line 1:
 +<​code>​
 +#/bin/bash
 +
 +if [ -z $1 ]
 +then
 +  echo "Bitte geben Sie einen User an"
 +  exit 1
 +fi
 +
 +thread=`ps -u $1 | awk '​{print $1}' | grep -v PID`
 +
 +#echo $thread
 +
 +j=0
 +
 +for i in ${thread[*]}
 +do
 +    echo "​kill"​ $i
 +done
 +</​code>​
  
kurs/kill_user.sh.txt ยท Last modified: 2014/09/10 21:22 (external edit)