<?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"
	>
<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>
	<pubDate>Wed, 19 Nov 2008 17:04:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Dave</title>
		<link>http://systembash.com/content/delete-directories-older-than-week/#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 - 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-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 "Deleting directory $i" #you have "in" not "i"
  rm -rf $i
done

also you can just use a find one liner:

find /home/backup/ -maxdepth 1 -type d -mtime +7 -exec echo "Removing Directory =&#62; {}" \; -exec rm -rf "{}" \;

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-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>
</channel>
</rss>
