LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-03-2003, 09:13 AM   #1
thebeaglebeagle
LQ Newbie
 
Registered: Sep 2003
Distribution: Redhat 6.2->9
Posts: 3

Rep: Reputation: 0
kill vs. killall, AIX vs. Linux


How can I kill all processes for a user in Linux?
In Unix, I often would type "killall". This would immediately kill all proccesses (including simple login shells) except for the one I ran killall in. This was great when I know a user had logged out completely and had tons of left over processes or crashed programs... I could su - to be him, and run "killall". In Redhat, killall seems to work very differently, and nothing in the man pages for kill or killall suggests a solution.
Oh wise Linux world, please help!
 
Old 09-24-2003, 02:41 AM   #2
zatriz
Member
 
Registered: Aug 2003
Location: Seattle, Wa
Distribution: Fedora,Trustix,Debian
Posts: 290

Rep: Reputation: 30
you could do a ps and grep that for lines tha match the user and then use awk get the the process pid and then feed to to xargs to break it down to one argument at a time and then feed that to kill
so like this
ps | grep | awk | xargs | kill
just write a simple bash script
There are also plenty of script floating around you could search on google for it

Last edited by zatriz; 09-24-2003 at 02:42 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command "killall" in Linux bharaniks Linux - Software 6 06-21-2005 05:00 AM
killall...but one? dibblethewrecke Programming 1 05-19-2005 11:31 AM
Alternatives for 'killall' Wallace740 Linux - Newbie 3 03-30-2005 03:21 AM
System hangs in update of AIX from 4.3.3 to AIX 5.2 jmurray67 AIX 2 07-25-2004 08:25 PM
kill/killall not working (?) didi156 Linux - Software 2 05-20-2004 11:47 PM


All times are GMT -5. The time now is 04:36 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration