<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Tech-Recipes - Latest Comments in Kill the undesired UNIX processes in one go</title><link>http://tech-recipes.disqus.com/</link><description>Cookbook of Tech Tutorials</description><atom:link href="https://tech-recipes.disqus.com/kill_the_undesired_unix_processes_in_one_go_unix_tech_recipes/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 06 Jun 2011 12:38:15 -0000</lastBuildDate><item><title>Re: Kill the undesired UNIX processes in one go</title><link>http://www.tech-recipes.com/rx/742/kill-the-undesired-unix-processes-in-one-go/#comment-219239727</link><description>&lt;p&gt;This worked for me. Thank you very much.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Herberth Amaral</dc:creator><pubDate>Mon, 06 Jun 2011 12:38:15 -0000</pubDate></item><item><title>Re: Kill the undesired UNIX processes in one go</title><link>http://www.tech-recipes.com/rx/742/kill-the-undesired-unix-processes-in-one-go/#comment-135196257</link><description>&lt;p&gt;pkill -U &amp;lt;user name=""&amp;gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tomasz Su</dc:creator><pubDate>Thu, 27 Jan 2011 02:50:04 -0000</pubDate></item><item><title>Re: Kill the undesired UNIX processes in one go</title><link>http://www.tech-recipes.com/rx/742/kill-the-undesired-unix-processes-in-one-go/#comment-2768780</link><description>&lt;p&gt;&lt;code&gt;&lt;br&gt;egrep -v "ps|sh|PID" file | awk '{print $1}' | xargs kill&lt;br&gt;&lt;/code&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Wed, 18 Apr 2007 03:21:56 -0000</pubDate></item><item><title>Re: Kill the undesired UNIX processes in one go</title><link>http://www.tech-recipes.com/rx/742/kill-the-undesired-unix-processes-in-one-go/#comment-2768779</link><description>&lt;p&gt;Hi,&lt;br&gt;&lt;strong&gt;PID  TTY            COMMAND&lt;br&gt;  2345 ?         0:00 msgcntl //&lt;br&gt;  4977 pts/tc    0:00 ps&lt;br&gt;  3807 ?         0:00 spectrum&lt;br&gt;  3813 ?         0:00 msgcntl //&lt;br&gt;  3802 ?         0:00 printmgr&lt;br&gt;  3814 ?         0:00 ssmcntl//&lt;br&gt;  3810 ?         0:00 ptrcntl//&lt;br&gt;  3815 ?         0:00 ssmcntl//&lt;br&gt;  3811 ?         0:00 termcntl//&lt;br&gt;  3817 ?         0:00 ssmcntl//&lt;br&gt;  3816 ?         0:00 pccntl//&lt;br&gt;  3798 ?         0:00 rsetcntl//&lt;br&gt;  2215 pts/tc    0:00 sh&lt;/strong&gt;&lt;br&gt;&amp;lt;font color="blue"&amp;gt;&lt;strong&gt;In the above scenario, I have to kill all the process except ps and sh . How to do that ?&lt;/strong&gt;&amp;lt;/font&amp;gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Sun, 15 Apr 2007 20:02:05 -0000</pubDate></item><item><title>Re: Kill the undesired UNIX processes in one go</title><link>http://www.tech-recipes.com/rx/742/kill-the-undesired-unix-processes-in-one-go/#comment-2768778</link><description>&lt;p&gt;&amp;lt;ul id="quote"&amp;gt;&amp;lt;h6&amp;gt;jproctor wrote:&amp;lt;/h6&amp;gt;Sorry to appear thick, but could you give an example of processname-patern&lt;br&gt;thanks for posting this great help jproctor&amp;lt;/ul&amp;gt;&lt;/p&gt;&lt;p&gt;you can use pgrep and pkill&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Fri, 02 Mar 2007 00:08:00 -0000</pubDate></item><item><title>Re: Kill the undesired UNIX processes in one go</title><link>http://www.tech-recipes.com/rx/742/kill-the-undesired-unix-processes-in-one-go/#comment-2768777</link><description>&lt;p&gt;You can use the following command :&lt;/p&gt;&lt;p&gt;kill -9 `ps -ef | grep &amp;lt;process-name&amp;gt; | grep -v grep | awk '{print $2}'`&lt;/p&gt;&lt;p&gt;Just make sure that you keyin the correct process name in the above command.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Thu, 01 Mar 2007 16:53:06 -0000</pubDate></item><item><title>Re: Kill the undesired UNIX processes in one go</title><link>http://www.tech-recipes.com/rx/742/kill-the-undesired-unix-processes-in-one-go/#comment-2768776</link><description>&lt;p&gt;a kill -9 doesnt give the process the possibility to clean up; to exit "voluntarily". can screw up its data.&lt;/p&gt;&lt;p&gt;always try a kill (without -9) first&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Holger</dc:creator><pubDate>Wed, 27 Apr 2005 11:15:52 -0000</pubDate></item><item><title>Re: Kill the undesired UNIX processes in one go</title><link>http://www.tech-recipes.com/rx/742/kill-the-undesired-unix-processes-in-one-go/#comment-2768775</link><description>&lt;p&gt;i think you might want to look into the killall command&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">casper</dc:creator><pubDate>Tue, 08 Mar 2005 01:58:56 -0000</pubDate></item><item><title>Re: Kill the undesired UNIX processes in one go</title><link>http://www.tech-recipes.com/rx/742/kill-the-undesired-unix-processes-in-one-go/#comment-2768774</link><description>&lt;p&gt;That's a good question.  Using grep has a brief but steep learning curve.  Most UNIX commands do.  Once you get the basics, you can put grep to powerful use.&lt;/p&gt;&lt;p&gt;In the most basic usage, grep will search through text looking for the search string.  If you want to look for commands containing the string 'http' you would simply use:&lt;/p&gt;&lt;p&gt;&lt;code&gt;   ..... | grep http | .... &lt;/code&gt;&lt;/p&gt;&lt;p&gt;Grep stands for global regular expression parser and is a magnificently powerful tool.  The important thing to take out of that mouthful is 'regular expression' which is a formal language for representing elaborate wildcards for searching.  For example, a period matches any single character, so &lt;strong&gt;.at&lt;/strong&gt; would match bat, cat, rat, and so on.  Used in a grep statement, it would match that regular expression anywhere in the line, so it would also match brat and bats.  Regular expressions would be a great idea for a series of rec.pes.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">qmchenry</dc:creator><pubDate>Sun, 19 Dec 2004 14:11:10 -0000</pubDate></item><item><title>Re: Kill the undesired UNIX processes in one go</title><link>http://www.tech-recipes.com/rx/742/kill-the-undesired-unix-processes-in-one-go/#comment-2768773</link><description>&lt;p&gt;Sorry to appear thick, but could you give an example of processname-patern&lt;br&gt;thanks for posting this great help jproctor&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Wed, 15 Dec 2004 22:43:14 -0000</pubDate></item></channel></rss>