<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>John Bernard Abella [blog] &#187; linux rm</title>
	<atom:link href="http://www.johnbernardabella.com/tag/linux-rm/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.johnbernardabella.com</link>
	<description>A System Admin&#039;s Notebook, A Programmers Journal</description>
	<lastBuildDate>Sun, 05 Feb 2012 14:13:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Alternative for rm command</title>
		<link>http://www.johnbernardabella.com/alternative-for-rm-command/</link>
		<comments>http://www.johnbernardabella.com/alternative-for-rm-command/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 16:07:17 +0000</pubDate>
		<dc:creator>jba_21</dc:creator>
				<category><![CDATA[Linux Help]]></category>
		<category><![CDATA[linux command]]></category>
		<category><![CDATA[linux rm]]></category>
		<category><![CDATA[remove files]]></category>
		<category><![CDATA[rm]]></category>
		<category><![CDATA[rm command]]></category>

		<guid isPermaLink="false">http://www.johnbernardabella.com/2008/02/03/alternative-for-rm-command/</guid>
		<description><![CDATA[Ive been handling webserver with more than 1000 website and lots of unique visitors per month. Session are stored on the server hard drive and every end of the month i need to clean it up. Now i was puzzled by rm command. rm -f * in /tmp/ directory. The terminal choked and gave out: [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Ive been handling  webserver with more than 1000 website and lots of unique visitors per month. Session are stored on the server hard drive and every end of the month i need to clean it up.</p>
<p>Now i was puzzled by rm command.<br />
<code>rm -f *</code></p>
<p>in /tmp/ directory. The terminal choked and gave out:</p>
<p><code>-bash: /bin/rm: Argument list too long</code></p>
<p>Apparently there are a maximum number of files that can be passed to rm.</p>
<p><code>ls -1 | grep sess | wc -l</code></p>
<p><code>382611</code></p>
<p></p>
<p>wow 382611 session files! image how long it would take if you have an application that running with sessions.<br />
The solution for this problem would be :</p>
<p><code>find . -name 'sess*' | xargs rm </code></p>
<div class="shr-publisher-8"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.johnbernardabella.com/alternative-for-rm-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

