Skip to contentSkip to conversation

Disconnecting users at once

DISCUSSION Murali Potla 2 participants 2 messages Oct 20, 2003

lore
Share & tools
lore
#0 lore raw

Hi,

I have some users (around 8) logged in to Linux server. I want to kill (or disconnect) them all in one command. How can I do that ??

Thanks & Regards
Murali

#1 lore raw
Quoted 5 lines · Murali Potla

Hi,

I have some users (around 8) logged in to Linux server. I want to kill (or disconnect) them all in one command. How can I do that ??

If you wanna kill them :

for i in ps aux | grep user | grep -v grep | awk '{print $2}'; do kill -9 $i; done;

Quoted 10 lines

Thanks & Regards
Murali

-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 4 lines
"This is UNIX country.    //=\  Tommy Tovbin
 if you listen carefully, \=//
 you can hear            //=\  tovbin at niisi dot msk dot ru
 Windows reboot..."      \=//  http://m1.sm.bmstu.ru