<?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: Delete all directories more than a week old</title>
	<atom:link href="http://systembash.com/content/delete-directories-older-than-week/feed/" rel="self" type="application/rss+xml" />
	<link>http://systembash.com/content/delete-directories-older-than-week/</link>
	<description>Technology and System Administration</description>
	<lastBuildDate>Thu, 02 Feb 2012 21:12:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Dave</title>
		<link>http://systembash.com/content/delete-directories-older-than-week/comment-page-1/#comment-3461</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Thu, 02 Aug 2007 15:21:49 +0000</pubDate>
		<guid isPermaLink="false">http://systembash.com/content/delete-directories-older-than-week/#comment-3461</guid>
		<description>That is correct - I actually have it with a \n (newline character) but wordpress stripped it out of my post. using $i there is correct.</description>
		<content:encoded><![CDATA[<p>That is correct &#8211; I actually have it with a \n (newline character) but wordpress stripped it out of my post. using $i there is correct.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Drager</title>
		<link>http://systembash.com/content/delete-directories-older-than-week/comment-page-1/#comment-41418</link>
		<dc:creator>Dave Drager</dc:creator>
		<pubDate>Thu, 02 Aug 2007 15:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://systembash.com/content/delete-directories-older-than-week/#comment-41418</guid>
		<description>That is correct - I actually have it with a n (newline character) but wordpress stripped it out of my post. using $i there is correct.</description>
		<content:encoded><![CDATA[<p>That is correct &#8211; I actually have it with a n (newline character) but wordpress stripped it out of my post. using $i there is correct.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Steinfeld</title>
		<link>http://systembash.com/content/delete-directories-older-than-week/comment-page-1/#comment-3460</link>
		<dc:creator>Michael Steinfeld</dc:creator>
		<pubDate>Thu, 02 Aug 2007 15:02:55 +0000</pubDate>
		<guid isPermaLink="false">http://systembash.com/content/delete-directories-older-than-week/#comment-3460</guid>
		<description>I think you meant to have this ..

for i in `find /home/backup/ -maxdepth 1 -type d -mtime +7 -print`
  do echo -e &quot;Deleting directory $i&quot; #you have &quot;in&quot; not &quot;i&quot;
  rm -rf $i
done

also you can just use a find one liner:

find /home/backup/ -maxdepth 1 -type d -mtime +7 -exec echo &quot;Removing Directory =&gt; {}&quot; \; -exec rm -rf &quot;{}&quot; \;

Keep in mind that -mtime n is rounded up to the next *full* 24-hour period. So for e.g -mtime +0 would find the directories that have not been modified starting with the day before yesterday.</description>
		<content:encoded><![CDATA[<p>I think you meant to have this ..</p>
<p>for i in `find /home/backup/ -maxdepth 1 -type d -mtime +7 -print`<br />
  do echo -e &#8220;Deleting directory $i&#8221; #you have &#8220;in&#8221; not &#8220;i&#8221;<br />
  rm -rf $i<br />
done</p>
<p>also you can just use a find one liner:</p>
<p>find /home/backup/ -maxdepth 1 -type d -mtime +7 -exec echo &#8220;Removing Directory =&gt; {}&#8221; \; -exec rm -rf &#8220;{}&#8221; \;</p>
<p>Keep in mind that -mtime n is rounded up to the next *full* 24-hour period. So for e.g -mtime +0 would find the directories that have not been modified starting with the day before yesterday.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Steinfeld</title>
		<link>http://systembash.com/content/delete-directories-older-than-week/comment-page-1/#comment-41417</link>
		<dc:creator>Michael Steinfeld</dc:creator>
		<pubDate>Thu, 02 Aug 2007 15:02:00 +0000</pubDate>
		<guid isPermaLink="false">http://systembash.com/content/delete-directories-older-than-week/#comment-41417</guid>
		<description>I think you meant to have this ..

for i in `find /home/backup/ -maxdepth 1 -type d -mtime +7 -print`
  do echo -e &quot;Deleting directory $i&quot; #you have &quot;in&quot; not &quot;i&quot;
  rm -rf $i
done

also you can just use a find one liner:

find /home/backup/ -maxdepth 1 -type d -mtime +7 -exec echo &quot;Removing Directory =&gt; {}&quot; ; -exec rm -rf &quot;{}&quot; ;

Keep in mind that -mtime n is rounded up to the next *full* 24-hour period. So for e.g -mtime +0 would find the directories that have not been modified starting with the day before yesterday.</description>
		<content:encoded><![CDATA[<p>I think you meant to have this ..</p>
<p>for i in `find /home/backup/ -maxdepth 1 -type d -mtime +7 -print`<br />
  do echo -e &#8220;Deleting directory $i&#8221; #you have &#8220;in&#8221; not &#8220;i&#8221;<br />
  rm -rf $i<br />
done</p>
<p>also you can just use a find one liner:</p>
<p>find /home/backup/ -maxdepth 1 -type d -mtime +7 -exec echo &#8220;Removing Directory =&gt; {}&#8221; ; -exec rm -rf &#8220;{}&#8221; ;</p>
<p>Keep in mind that -mtime n is rounded up to the next *full* 24-hour period. So for e.g -mtime +0 would find the directories that have not been modified starting with the day before yesterday.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kumaran</title>
		<link>http://systembash.com/content/delete-directories-older-than-week/comment-page-1/#comment-173</link>
		<dc:creator>Kumaran</dc:creator>
		<pubDate>Wed, 28 Mar 2007 13:50:41 +0000</pubDate>
		<guid isPermaLink="false">http://systembash.com/content/delete-directories-older-than-week/#comment-173</guid>
		<description>Good one!!</description>
		<content:encoded><![CDATA[<p>Good one!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kumaran</title>
		<link>http://systembash.com/content/delete-directories-older-than-week/comment-page-1/#comment-41416</link>
		<dc:creator>Kumaran</dc:creator>
		<pubDate>Wed, 28 Mar 2007 13:50:00 +0000</pubDate>
		<guid isPermaLink="false">http://systembash.com/content/delete-directories-older-than-week/#comment-41416</guid>
		<description>Good one!!</description>
		<content:encoded><![CDATA[<p>Good one!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching using disk: basic

Served from: systembash.com @ 2012-02-09 01:27:38 -->
