<?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: /bin/rm: Argument list too long</title>
	<atom:link href="http://www.karkomaonline.com/index.php/2005/01/binrm-argument-list-too-long/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.karkomaonline.com/index.php/2005/01/binrm-argument-list-too-long/</link>
	<description>a Blog for SysAdmins and Unix stuff in general</description>
	<lastBuildDate>Tue, 13 Sep 2011 05:10:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: anonymous</title>
		<link>http://www.karkomaonline.com/index.php/2005/01/binrm-argument-list-too-long/comment-page-1/#comment-68</link>
		<dc:creator>anonymous</dc:creator>
		<pubDate>Sun, 27 Nov 2005 19:52:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.karkoma.info/index.php/2005/01/07/binrm-argument-list-too-long/#comment-68</guid>
		<description>&lt;p&gt;Since the pruning of overcrowded quarantine directories is a pretty much recurring task, I have a handy shell function to do that (incorporates a basic sanity check, skips directories and dotfiles):&lt;/p&gt;



&lt;blockquote&gt;wipe() {
        if [ &quot;${1}&quot; == &quot;&quot; ] ; then
                echo &quot;Wiping out all non-directory files in ${PWD}.&quot;
        else
                echo &quot;Wiping out all files starting with &#039;${1}&#039; in ${PWD}.&quot;
        fi
&lt;p&gt;        echo -n &#039;Type &quot;YES&quot; to confirm: &#039;
        read YESNO
        if [ &quot;${YESNO}&quot; != &quot;YES&quot; ] ; then
                echo &#039;Maybe next time.&#039;
                return 0
        fi
&lt;p&gt;        # ok, wipe it
        find . \( -name &quot;${1}*&quot; -and \! -name &quot;.*&quot; -and -type f \) -print0 &#124; xargs -0 rm
}&lt;/blockquote&gt;



&lt;p&gt;Hope it helps.&lt;/p&gt;
&lt;p&gt;Kelas.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Since the pruning of overcrowded quarantine directories is a pretty much recurring task, I have a handy shell function to do that (incorporates a basic sanity check, skips directories and dotfiles):</p>
<blockquote><p>wipe() {<br />
        if [ "${1}" == "" ] ; then<br />
                echo &#8220;Wiping out all non-directory files in ${PWD}.&#8221;<br />
        else<br />
                echo &#8220;Wiping out all files starting with &#8216;${1}&#8217; in ${PWD}.&#8221;<br />
        fi</p>
<p>        echo -n &#8216;Type &#8220;YES&#8221; to confirm: &#8216;<br />
        read YESNO<br />
        if [ "${YESNO}" != "YES" ] ; then<br />
                echo &#8216;Maybe next time.&#8217;<br />
                return 0<br />
        fi
</p>
<p>        # ok, wipe it<br />
        find . \( -name &#8220;${1}*&#8221; -and \! -name &#8220;.*&#8221; -and -type f \) -print0 | xargs -0 rm<br />
}</p>
</blockquote>
<p>Hope it helps.</p>
<p>Kelas.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anonymous</title>
		<link>http://www.karkomaonline.com/index.php/2005/01/binrm-argument-list-too-long/comment-page-1/#comment-67</link>
		<dc:creator>anonymous</dc:creator>
		<pubDate>Fri, 07 Jan 2005 21:58:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.karkoma.info/index.php/2005/01/07/binrm-argument-list-too-long/#comment-67</guid>
		<description>&lt;p&gt;It seems that this is a limit inside the kernel and not a limitation of rm or a limitation of the shell. On the other hand if the filenames have white spaces the best way is to do something like this:&lt;/p&gt;



&lt;blockquote&gt;find . -name file_names_expr -print0 &#124; xargs -0 rm&lt;/blockquote&gt;



&lt;p&gt;Morpheo&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>It seems that this is a limit inside the kernel and not a limitation of rm or a limitation of the shell. On the other hand if the filenames have white spaces the best way is to do something like this:</p>
<blockquote><p>find . -name file_names_expr -print0 | xargs -0 rm</p></blockquote>
<p>Morpheo</p>
]]></content:encoded>
	</item>
</channel>
</rss>

