<?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: Linux or Unix find and remove files with one find command on fly</title> <atom:link href="http://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/feed/" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/</link> <description>Every answer asks a more beautiful question.</description> <lastBuildDate>Fri, 10 Feb 2012 19:55:56 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Asghar Ali</title><link>http://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/#comment-63973</link> <dc:creator>Asghar Ali</dc:creator> <pubDate>Sun, 30 Oct 2011 13:11:26 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linuxunix-how-to-find-and-remove-files.php#comment-63973</guid> <description>Thanks Dude! I really need it.</description> <content:encoded><![CDATA[<p>Thanks Dude! I really need it.</p> ]]></content:encoded> </item> <item><title>By: vijay</title><link>http://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/#comment-63375</link> <dc:creator>vijay</dc:creator> <pubDate>Tue, 11 Oct 2011 04:39:47 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linuxunix-how-to-find-and-remove-files.php#comment-63375</guid> <description>how to delete only c &amp; java programs in red hat linux....</description> <content:encoded><![CDATA[<p>how to delete only c &amp; java programs in red hat linux&#8230;.</p> ]]></content:encoded> </item> <item><title>By: Question</title><link>http://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/#comment-61439</link> <dc:creator>Question</dc:creator> <pubDate>Tue, 09 Aug 2011 23:34:45 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linuxunix-how-to-find-and-remove-files.php#comment-61439</guid> <description>is there supposed to be a space before -exec in the example?
find . -type f -name &quot;FILE-TO-FIND&quot; -exec rm -f {} \;</description> <content:encoded><![CDATA[<p>is there supposed to be a space before -exec in the example?<br
/> find . -type f -name &#8220;FILE-TO-FIND&#8221; -exec rm -f {} \;</p> ]]></content:encoded> </item> <item><title>By: Basil</title><link>http://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/#comment-60516</link> <dc:creator>Basil</dc:creator> <pubDate>Wed, 06 Jul 2011 15:17:15 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linuxunix-how-to-find-and-remove-files.php#comment-60516</guid> <description>How can check and redirect to a single file with the file names that contains the certain string of text? For example:
If my files abc.txt, aaa.txt and bbb.txt where both aaa and bbb contains ERROR, and abc not. I need to point out the names aaa.txt and bbb.txt to another file ccc.txt...
Just to name a few, but there might be others. I need a bash script to do this.
Am searching for a solution from a week...:(</description> <content:encoded><![CDATA[<p>How can check and redirect to a single file with the file names that contains the certain string of text? For example:</p><p>If my files abc.txt, aaa.txt and bbb.txt where both aaa and bbb contains ERROR, and abc not. I need to point out the names aaa.txt and bbb.txt to another file ccc.txt&#8230;</p><p>Just to name a few, but there might be others. I need a bash script to do this.<br
/> Am searching for a solution from a week&#8230;:(</p> ]]></content:encoded> </item> <item><title>By: beli</title><link>http://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/#comment-60329</link> <dc:creator>beli</dc:creator> <pubDate>Wed, 29 Jun 2011 12:04:25 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linuxunix-how-to-find-and-remove-files.php#comment-60329</guid> <description>Thanks!</description> <content:encoded><![CDATA[<p>Thanks!</p> ]]></content:encoded> </item> <item><title>By: rangga</title><link>http://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/#comment-60291</link> <dc:creator>rangga</dc:creator> <pubDate>Tue, 28 Jun 2011 06:24:41 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linuxunix-how-to-find-and-remove-files.php#comment-60291</guid> <description>can we combine locate with rm ?
thanks</description> <content:encoded><![CDATA[<p>can we combine locate with rm ?</p><p>thanks</p> ]]></content:encoded> </item> <item><title>By: surreyian</title><link>http://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/#comment-59178</link> <dc:creator>surreyian</dc:creator> <pubDate>Wed, 04 May 2011 08:25:06 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linuxunix-how-to-find-and-remove-files.php#comment-59178</guid> <description>thanks</description> <content:encoded><![CDATA[<p>thanks</p> ]]></content:encoded> </item> <item><title>By: Vivek Gite</title><link>http://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/#comment-58903</link> <dc:creator>Vivek Gite</dc:creator> <pubDate>Thu, 28 Apr 2011 22:47:20 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linuxunix-how-to-find-and-remove-files.php#comment-58903</guid> <description>Add semicolon (;) to command:
&lt;code&gt;find . -name “find name” -exec rm {}\ ;&lt;/code&gt;</description> <content:encoded><![CDATA[<p>Add semicolon (;) to command:<br
/> <code>find . -name “find name” -exec rm {}\ ;</code></p> ]]></content:encoded> </item> <item><title>By: surreyian</title><link>http://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/#comment-58799</link> <dc:creator>surreyian</dc:creator> <pubDate>Thu, 28 Apr 2011 16:30:46 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linuxunix-how-to-find-and-remove-files.php#comment-58799</guid> <description>i tried to use the command to find and delete files
find . -name &quot;find name&quot; -exec rm {}\
but the return message is missing argument to &#039;-exec&#039;
what have I done wrong?</description> <content:encoded><![CDATA[<p>i tried to use the command to find and delete files</p><p>find . -name &#8220;find name&#8221; -exec rm {}\</p><p>but the return message is missing argument to &#8216;-exec&#8217;</p><p>what have I done wrong?</p> ]]></content:encoded> </item> <item><title>By: Badtz</title><link>http://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/#comment-56531</link> <dc:creator>Badtz</dc:creator> <pubDate>Tue, 22 Mar 2011 15:47:10 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linuxunix-how-to-find-and-remove-files.php#comment-56531</guid> <description>For instance
/bin/rm: Argument list too long
-bash-3.2$ ls -l &#124; wc -l
161995
-bash-3.2$ find . -delete
-bash-3.2$</description> <content:encoded><![CDATA[<p>For instance</p><p>/bin/rm: Argument list too long<br
/> -bash-3.2$ ls -l | wc -l<br
/> 161995<br
/> -bash-3.2$ find . -delete<br
/> -bash-3.2$</p> ]]></content:encoded> </item> <item><title>By: Badtz</title><link>http://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/#comment-56530</link> <dc:creator>Badtz</dc:creator> <pubDate>Tue, 22 Mar 2011 15:42:19 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linuxunix-how-to-find-and-remove-files.php#comment-56530</guid> <description>-delete will also work in a directory with say... hundreds of thousands of files, -exec rm -rf will crash.</description> <content:encoded><![CDATA[<p>-delete will also work in a directory with say&#8230; hundreds of thousands of files, -exec rm -rf will crash.</p> ]]></content:encoded> </item> <item><title>By: Bruce Jenkins</title><link>http://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/#comment-56372</link> <dc:creator>Bruce Jenkins</dc:creator> <pubDate>Fri, 18 Mar 2011 13:24:51 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linuxunix-how-to-find-and-remove-files.php#comment-56372</guid> <description>Thanks for the code Riley! I have been looking for something like this.</description> <content:encoded><![CDATA[<p>Thanks for the code Riley! I have been looking for something like this.</p> ]]></content:encoded> </item> <item><title>By: TheRiley</title><link>http://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/#comment-50665</link> <dc:creator>TheRiley</dc:creator> <pubDate>Wed, 10 Nov 2010 22:14:35 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linuxunix-how-to-find-and-remove-files.php#comment-50665</guid> <description>this culls directories older than 10 days:
find /somePath -type d -name  &#039;someNamePrefix*&#039; -mtime +10 -print &#124; xargs rm -rf ;</description> <content:encoded><![CDATA[<p>this culls directories older than 10 days:</p><p>find /somePath -type d -name  &#8216;someNamePrefix*&#8217; -mtime +10 -print | xargs rm -rf ;</p> ]]></content:encoded> </item> <item><title>By: Chethan</title><link>http://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/#comment-50118</link> <dc:creator>Chethan</dc:creator> <pubDate>Fri, 15 Oct 2010 06:14:15 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linuxunix-how-to-find-and-remove-files.php#comment-50118</guid> <description>#include
int main()
{
execl(&quot;/bin/rm&quot;, &quot;rm&quot;, &quot;-f&quot;, &quot;/home/cc/rr* &quot;, (char*)0);
printf(&quot;end&quot;);
return 0;
}
In the above program, I want to delete all file /home/cc/rr*. With above program it is not working, I mean it is not deleting. Please help.</description> <content:encoded><![CDATA[<p>#include</p><p>int main()<br
/> {<br
/> execl(&#8220;/bin/rm&#8221;, &#8220;rm&#8221;, &#8220;-f&#8221;, &#8220;/home/cc/rr* &#8220;, (char*)0);<br
/> printf(&#8220;end&#8221;);<br
/> return 0;<br
/> }</p><p>In the above program, I want to delete all file /home/cc/rr*. With above program it is not working, I mean it is not deleting. Please help.</p> ]]></content:encoded> </item> <item><title>By: liveD</title><link>http://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/#comment-49817</link> <dc:creator>liveD</dc:creator> <pubDate>Thu, 30 Sep 2010 07:29:11 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linuxunix-how-to-find-and-remove-files.php#comment-49817</guid> <description>find . -type f -name &quot;FILE-TO-FIND&quot; -delete;</description> <content:encoded><![CDATA[<p>find . -type f -name &#8220;FILE-TO-FIND&#8221; -delete;</p> ]]></content:encoded> </item> <item><title>By: Jeremy</title><link>http://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/#comment-49724</link> <dc:creator>Jeremy</dc:creator> <pubDate>Sun, 26 Sep 2010 05:15:50 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linuxunix-how-to-find-and-remove-files.php#comment-49724</guid> <description>Fantastic tips. These helped me create some commands to add to my ~/.bash_logout file to perform file/directory cleanup on logout. Cheers!</description> <content:encoded><![CDATA[<p>Fantastic tips. These helped me create some commands to add to my ~/.bash_logout file to perform file/directory cleanup on logout. Cheers!</p> ]]></content:encoded> </item> <item><title>By: Robert</title><link>http://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/#comment-48995</link> <dc:creator>Robert</dc:creator> <pubDate>Tue, 24 Aug 2010 01:49:41 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linuxunix-how-to-find-and-remove-files.php#comment-48995</guid> <description>Did you ever find a solution to this problem. If so please let me know the details because I have the exact same issue. Thank you.</description> <content:encoded><![CDATA[<p>Did you ever find a solution to this problem. If so please let me know the details because I have the exact same issue. Thank you.</p> ]]></content:encoded> </item> <item><title>By: Tristan</title><link>http://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/#comment-46723</link> <dc:creator>Tristan</dc:creator> <pubDate>Sat, 03 Apr 2010 16:58:45 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linuxunix-how-to-find-and-remove-files.php#comment-46723</guid> <description>Very nice find. Had a bunch of music I copied over from my Mac that had Ableton files in them which weren&#039;t needed on my laptop.
Quick way of getting rid of them.
Thanks a bunch.</description> <content:encoded><![CDATA[<p>Very nice find. Had a bunch of music I copied over from my Mac that had Ableton files in them which weren&#8217;t needed on my laptop.</p><p>Quick way of getting rid of them.</p><p>Thanks a bunch.</p> ]]></content:encoded> </item> <item><title>By: lupht</title><link>http://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/#comment-44997</link> <dc:creator>lupht</dc:creator> <pubDate>Thu, 03 Dec 2009 07:51:58 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linuxunix-how-to-find-and-remove-files.php#comment-44997</guid> <description>Kiran:
Try the -ignore_readdir_race option</description> <content:encoded><![CDATA[<p>Kiran:</p><p>Try the -ignore_readdir_race option</p> ]]></content:encoded> </item> <item><title>By: Roshan</title><link>http://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/#comment-44749</link> <dc:creator>Roshan</dc:creator> <pubDate>Wed, 18 Nov 2009 06:24:53 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linuxunix-how-to-find-and-remove-files.php#comment-44749</guid> <description>How to override after find command?
Note :i know find command but dont know how to combine these operations.
cat &quot;I&#039;m repled content&quot; &gt; test.zip .
ex:
1&gt; i have to find files with name &quot;*test*.*&quot;  and replace the content of the file with &quot;I&#039;m replaced content&quot;.
2&gt; find the file with size more than 10mb and replace the content of the file with &quot;I&#039;m replaced content&quot;.</description> <content:encoded><![CDATA[<p>How to override after find command?<br
/> Note :i know find command but dont know how to combine these operations.<br
/> cat &#8220;I&#8217;m repled content&#8221; &gt; test.zip .<br
/> ex:<br
/> 1&gt; i have to find files with name &#8220;*test*.*&#8221;  and replace the content of the file with &#8220;I&#8217;m replaced content&#8221;.<br
/> 2&gt; find the file with size more than 10mb and replace the content of the file with &#8220;I&#8217;m replaced content&#8221;.</p> ]]></content:encoded> </item> </channel> </rss>
