killing off loged in users wasRe: Sending Text to Synthesizer

Adam Myrow amyrow at midsouth.rr.com
Sun May 8 12:00:11 EDT 2005


On Sun, 8 May 2005, Kenny Hitt wrote:

> Hi.  I'm sure there's more than one way to do it, but try
>
> who
>
> The who command will tell you all the users loged into the system.
>
> Then use
>
> ps aux|grep username

Actually, "ps -u username" is quicker.  This doesn't always work, but 
sending a hangup "kill -1" to a shell like bash, or tcsh, will often 
cause all the other processes under that shell to exit.  One thing that 
really isn't taught much is to use "kill -9" as an absolute last resort. 
Since "kill -9" can't be ignored or trapped, any unsaved data will be lost 
when the process exits.  Generally, the hangup works better for editors 
and such, as they will usually save any unsaved data in a temporary file. 
For example, vi clones like vim and elvis will save unsaved data in 
/var/tmp, and there is a "-r" option to recover them.  Pine will save any 
partial email when sent a terminate or hangup signal, and ask you about it 
the next time you go to compose a new email.  Of course, if you don't want 
the process to save anything, a -9 will do that.  Then, there are the 
daemons that treat hangup as a command to re-read their log files.  It's 
best to kill those with any script for them, otherwise, try the default 
signal of 15, or use a "kill -9" as a last resort.




More information about the Speakup mailing list