<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Kill the undesired UNIX processes in one go</title>
	<atom:link href="http://www.tech-recipes.com/rx/742/kill-the-undesired-unix-processes-in-one-go/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tech-recipes.com/rx/742/kill-the-undesired-unix-processes-in-one-go/</link>
	<description>Computer and technology tutorials and guides</description>
	<lastBuildDate>Sat, 21 Nov 2009 20:38:45 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: </title>
		<link>http://www.tech-recipes.com/rx/742/kill-the-undesired-unix-processes-in-one-go/comment-page-1/#comment-3352</link>
		<dc:creator></dc:creator>
		<pubDate>Wed, 18 Apr 2007 07:21:56 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-3352</guid>
		<description>&lt;code&gt;
egrep -v &quot;ps&#124;sh&#124;PID&quot; file &#124; awk &#039;&#123;print $1&#125;&#039; &#124; xargs kill
&lt;/code&gt;
</description>
		<content:encoded><![CDATA[<p><code><br />
egrep -v &quot;ps|sh|PID&quot; file | awk '&#123;print $1&#125;' | xargs kill<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: </title>
		<link>http://www.tech-recipes.com/rx/742/kill-the-undesired-unix-processes-in-one-go/comment-page-1/#comment-3350</link>
		<dc:creator></dc:creator>
		<pubDate>Mon, 16 Apr 2007 00:02:05 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-3350</guid>
		<description>Hi,
&lt;strong&gt;PID  TTY            COMMAND
  2345 ?         0:00 msgcntl //
  4977 pts/tc    0:00 ps
  3807 ?         0:00 spectrum
  3813 ?         0:00 msgcntl //
  3802 ?         0:00 printmgr
  3814 ?         0:00 ssmcntl//
  3810 ?         0:00 ptrcntl//
  3815 ?         0:00 ssmcntl//
  3811 ?         0:00 termcntl//
  3817 ?         0:00 ssmcntl//
  3816 ?         0:00 pccntl//
  3798 ?         0:00 rsetcntl//
  2215 pts/tc    0:00 sh&lt;/strong&gt;

&lt;font color=&quot;blue&quot;&gt;&lt;strong&gt;In the above scenario, I have to kill all the process except ps and sh . How to do that ?&lt;/font&gt;&lt;/strong&gt;</description>
		<content:encoded><![CDATA[<p>Hi,<br />
<strong>PID  TTY            COMMAND<br />
  2345 ?         0:00 msgcntl //<br />
  4977 pts/tc    0:00 ps<br />
  3807 ?         0:00 spectrum<br />
  3813 ?         0:00 msgcntl //<br />
  3802 ?         0:00 printmgr<br />
  3814 ?         0:00 ssmcntl//<br />
  3810 ?         0:00 ptrcntl//<br />
  3815 ?         0:00 ssmcntl//<br />
  3811 ?         0:00 termcntl//<br />
  3817 ?         0:00 ssmcntl//<br />
  3816 ?         0:00 pccntl//<br />
  3798 ?         0:00 rsetcntl//<br />
  2215 pts/tc    0:00 sh</strong></p>
<p><font color="blue"><strong>In the above scenario, I have to kill all the process except ps and sh . How to do that ?</strong></font></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: </title>
		<link>http://www.tech-recipes.com/rx/742/kill-the-undesired-unix-processes-in-one-go/comment-page-1/#comment-3308</link>
		<dc:creator></dc:creator>
		<pubDate>Fri, 02 Mar 2007 05:08:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-3308</guid>
		<description>&lt;ul id=&quot;quote&quot;&gt;&lt;h6&gt;jproctor wrote:&lt;/h6&gt;Sorry to appear thick, but could you give an example of processname-patern
thanks for posting this great help jproctor&lt;/ul&gt;

you can use pgrep and pkill</description>
		<content:encoded><![CDATA[<ul id="quote">
<h6>jproctor wrote:</h6>
<p>Sorry to appear thick, but could you give an example of processname-patern<br />
thanks for posting this great help jproctor</ul>
<p>you can use pgrep and pkill</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: </title>
		<link>http://www.tech-recipes.com/rx/742/kill-the-undesired-unix-processes-in-one-go/comment-page-1/#comment-3307</link>
		<dc:creator></dc:creator>
		<pubDate>Thu, 01 Mar 2007 21:53:06 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-3307</guid>
		<description>You can use the following command :

kill -9 `ps -ef &#124; grep &lt;process-name&gt; &#124; grep -v grep &#124; awk &#039;{print $2}&#039;`

Just make sure that you keyin the correct process name in the above command.</description>
		<content:encoded><![CDATA[<p>You can use the following command :</p>
<p>kill -9 `ps -ef | grep &lt;process-name&gt; | grep -v grep | awk &#8216;{print $2}&#8217;`</p>
<p>Just make sure that you keyin the correct process name in the above command.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Holger</title>
		<link>http://www.tech-recipes.com/rx/742/kill-the-undesired-unix-processes-in-one-go/comment-page-1/#comment-1694</link>
		<dc:creator>Holger</dc:creator>
		<pubDate>Wed, 27 Apr 2005 15:15:52 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-1694</guid>
		<description>a kill -9 doesnt give the process the possibility to clean up; to exit &quot;voluntarily&quot;. can screw up its data.

always try a kill (without -9) first</description>
		<content:encoded><![CDATA[<p>a kill -9 doesnt give the process the possibility to clean up; to exit &#8220;voluntarily&#8221;. can screw up its data.</p>
<p>always try a kill (without -9) first</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: casper</title>
		<link>http://www.tech-recipes.com/rx/742/kill-the-undesired-unix-processes-in-one-go/comment-page-1/#comment-1403</link>
		<dc:creator>casper</dc:creator>
		<pubDate>Tue, 08 Mar 2005 06:58:56 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-1403</guid>
		<description>i think you might want to look into the killall command</description>
		<content:encoded><![CDATA[<p>i think you might want to look into the killall command</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: qmchenry</title>
		<link>http://www.tech-recipes.com/rx/742/kill-the-undesired-unix-processes-in-one-go/comment-page-1/#comment-1156</link>
		<dc:creator>qmchenry</dc:creator>
		<pubDate>Sun, 19 Dec 2004 19:11:10 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-1156</guid>
		<description>That&#039;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.

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 &#039;http&#039; you would simply use:

&lt;code&gt;   ..... &#124; grep http &#124; .... &lt;/code&gt;


Grep stands for global regular expression parser and is a magnificently powerful tool.  The important thing to take out of that mouthful is &#039;regular expression&#039; 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.</description>
		<content:encoded><![CDATA[<p>That&#8217;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.</p>
<p>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 &#8216;http&#8217; you would simply use:</p>
<p><code>   ..... | grep http | .... </code></p>
<p>Grep stands for global regular expression parser and is a magnificently powerful tool.  The important thing to take out of that mouthful is &#8216;regular expression&#8217; which is a formal language for representing elaborate wildcards for searching.  For example, a period matches any single character, so <strong>.at</strong> 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.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: </title>
		<link>http://www.tech-recipes.com/rx/742/kill-the-undesired-unix-processes-in-one-go/comment-page-1/#comment-1152</link>
		<dc:creator></dc:creator>
		<pubDate>Thu, 16 Dec 2004 03:43:14 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-1152</guid>
		<description>Sorry to appear thick, but could you give an example of processname-patern
thanks for posting this great help jproctor</description>
		<content:encoded><![CDATA[<p>Sorry to appear thick, but could you give an example of processname-patern<br />
thanks for posting this great help jproctor</p>
]]></content:encoded>
	</item>
</channel>
</rss>
