<?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 Files Older Than x Days on Linux</title>
	<atom:link href="http://www.howtogeek.com/howto/ubuntu/delete-files-older-than-x-days-on-linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.howtogeek.com/howto/ubuntu/delete-files-older-than-x-days-on-linux/</link>
	<description>Computer Help from your Friendly How-To Geek</description>
	<lastBuildDate>Tue, 24 Nov 2009 22:17:59 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ovidiu</title>
		<link>http://www.howtogeek.com/howto/ubuntu/delete-files-older-than-x-days-on-linux/comment-page-1/#comment-79862</link>
		<dc:creator>Ovidiu</dc:creator>
		<pubDate>Thu, 12 Nov 2009 09:50:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/ubuntu/delete-files-older-than-x-days-on-linux/#comment-79862</guid>
		<description>I even tried this to no avail: find -path &quot;/var/lib/amavis/tmp/*&quot; -mtime +12 {} \;
 and this find -path /var/lib/amavis/tmp/* -mtime +12 {} \;</description>
		<content:encoded><![CDATA[<p>I even tried this to no avail: find -path &#8220;/var/lib/amavis/tmp/*&#8221; -mtime +12 {} \;<br />
 and this find -path /var/lib/amavis/tmp/* -mtime +12 {} \;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ovidiu</title>
		<link>http://www.howtogeek.com/howto/ubuntu/delete-files-older-than-x-days-on-linux/comment-page-1/#comment-79860</link>
		<dc:creator>Ovidiu</dc:creator>
		<pubDate>Thu, 12 Nov 2009 09:46:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/ubuntu/delete-files-older-than-x-days-on-linux/#comment-79860</guid>
		<description>hello.
trying this on Debian 5.0 and getting an error, could you maybe help me figure out what is wrong?

h1550830:/var/lib/amavis/tmp# find /var/lib/amavis/tmp/* -mtime +12 {} \;
find: paths must precede expression: {}
Usage: find [-H] [-L] [-P] [-Olevel] [-D help&#124;tree&#124;search&#124;stat&#124;rates&#124;opt&#124;exec] [path...] [expression]</description>
		<content:encoded><![CDATA[<p>hello.<br />
trying this on Debian 5.0 and getting an error, could you maybe help me figure out what is wrong?</p>
<p>h1550830:/var/lib/amavis/tmp# find /var/lib/amavis/tmp/* -mtime +12 {} \;<br />
find: paths must precede expression: {}<br />
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philippe</title>
		<link>http://www.howtogeek.com/howto/ubuntu/delete-files-older-than-x-days-on-linux/comment-page-1/#comment-77347</link>
		<dc:creator>Philippe</dc:creator>
		<pubDate>Thu, 01 Oct 2009 15:18:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/ubuntu/delete-files-older-than-x-days-on-linux/#comment-77347</guid>
		<description>Please remove my post, I discovered faults in it!</description>
		<content:encoded><![CDATA[<p>Please remove my post, I discovered faults in it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philippe</title>
		<link>http://www.howtogeek.com/howto/ubuntu/delete-files-older-than-x-days-on-linux/comment-page-1/#comment-77339</link>
		<dc:creator>Philippe</dc:creator>
		<pubDate>Thu, 01 Oct 2009 12:09:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/ubuntu/delete-files-older-than-x-days-on-linux/#comment-77339</guid>
		<description>Artem Russakovskii and others, is there an argument for find, so that directories will NOT be removed?

(From a NTFS slave-disc, I need to delete the 200 000 oldest and 50 000 newest files and only keep the directory tree and all files from a 20-day period. (Permission of NTFS files &quot;cannot be decided&quot;, so ownership is missing, which causes 250 000 questions &quot;cannot move to trash, cancel/remove?&quot; when I try using GNU desktop). (It is a &quot;blue screen of death&quot; disc of course...))</description>
		<content:encoded><![CDATA[<p>Artem Russakovskii and others, is there an argument for find, so that directories will NOT be removed?</p>
<p>(From a NTFS slave-disc, I need to delete the 200 000 oldest and 50 000 newest files and only keep the directory tree and all files from a 20-day period. (Permission of NTFS files &#8220;cannot be decided&#8221;, so ownership is missing, which causes 250 000 questions &#8220;cannot move to trash, cancel/remove?&#8221; when I try using GNU desktop). (It is a &#8220;blue screen of death&#8221; disc of course&#8230;))</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dennis</title>
		<link>http://www.howtogeek.com/howto/ubuntu/delete-files-older-than-x-days-on-linux/comment-page-1/#comment-76908</link>
		<dc:creator>dennis</dc:creator>
		<pubDate>Mon, 21 Sep 2009 16:32:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/ubuntu/delete-files-older-than-x-days-on-linux/#comment-76908</guid>
		<description>a lot of smart people here ... =)

this tip and the comments help a lot.</description>
		<content:encoded><![CDATA[<p>a lot of smart people here &#8230; =)</p>
<p>this tip and the comments help a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: spage</title>
		<link>http://www.howtogeek.com/howto/ubuntu/delete-files-older-than-x-days-on-linux/comment-page-1/#comment-75440</link>
		<dc:creator>spage</dc:creator>
		<pubDate>Mon, 17 Aug 2009 13:55:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/ubuntu/delete-files-older-than-x-days-on-linux/#comment-75440</guid>
		<description>Great tip. implemented this to clear stale mysql dumps.

Offer... What about scheduling a cron to touch the file daily, weekly, or whatever? this will keep the file from aging and thus keep it from being deleted by this command?</description>
		<content:encoded><![CDATA[<p>Great tip. implemented this to clear stale mysql dumps.</p>
<p>Offer&#8230; What about scheduling a cron to touch the file daily, weekly, or whatever? this will keep the file from aging and thus keep it from being deleted by this command?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Artelius</title>
		<link>http://www.howtogeek.com/howto/ubuntu/delete-files-older-than-x-days-on-linux/comment-page-1/#comment-73522</link>
		<dc:creator>Artelius</dc:creator>
		<pubDate>Sun, 21 Jun 2009 01:28:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/ubuntu/delete-files-older-than-x-days-on-linux/#comment-73522</guid>
		<description>In response to Offer (re deleting files which are still open in some process)

Under UNIX, the filesystem is like a &quot;map&quot; you use to locate files. Sometimes there are two different paths to the same file (these are called &quot;hard links&quot; and can be created with the ln command).

When you &quot;remove&quot; a file, actually you are just removing one method of finding the file (this is why removing a file is sometimes called &quot;unlinking&quot;). When you remove ALL methods of finding a file, the file is really deleted and no longer takes up space.

In your case, there are two links to the file: 
/tmp/dont_delete_me.txt
and
your program&#039;s handle to this file

If you remove the first of these, the file will not be deleted - it will still &quot;exist&quot; but will ONLY be accessible to the program that has the file open. When this program closes the file, the file disappears completely.


Artelius</description>
		<content:encoded><![CDATA[<p>In response to Offer (re deleting files which are still open in some process)</p>
<p>Under UNIX, the filesystem is like a &#8220;map&#8221; you use to locate files. Sometimes there are two different paths to the same file (these are called &#8220;hard links&#8221; and can be created with the ln command).</p>
<p>When you &#8220;remove&#8221; a file, actually you are just removing one method of finding the file (this is why removing a file is sometimes called &#8220;unlinking&#8221;). When you remove ALL methods of finding a file, the file is really deleted and no longer takes up space.</p>
<p>In your case, there are two links to the file:<br />
/tmp/dont_delete_me.txt<br />
and<br />
your program&#8217;s handle to this file</p>
<p>If you remove the first of these, the file will not be deleted &#8211; it will still &#8220;exist&#8221; but will ONLY be accessible to the program that has the file open. When this program closes the file, the file disappears completely.</p>
<p>Artelius</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Offer</title>
		<link>http://www.howtogeek.com/howto/ubuntu/delete-files-older-than-x-days-on-linux/comment-page-1/#comment-73178</link>
		<dc:creator>Offer</dc:creator>
		<pubDate>Thu, 11 Jun 2009 10:37:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/ubuntu/delete-files-older-than-x-days-on-linux/#comment-73178</guid>
		<description>Hi all,

This is all great, but I still can&#039;t figure something out...
lets say I want to clean /tmp every day.
Let us say file /tmp/dont_delete_me.txt is 7 days old. The process creating the file is still up and holding the file open. For this example let us say the process will write a single line every once in a while…
If I would try to delete the file, what will happen to the holding process? Is there a way to know if a file is in use/open?

I would like to clear a production server /tmp directory but never harm any running process…

Thanks,
Offer Baruch</description>
		<content:encoded><![CDATA[<p>Hi all,</p>
<p>This is all great, but I still can&#8217;t figure something out&#8230;<br />
lets say I want to clean /tmp every day.<br />
Let us say file /tmp/dont_delete_me.txt is 7 days old. The process creating the file is still up and holding the file open. For this example let us say the process will write a single line every once in a while…<br />
If I would try to delete the file, what will happen to the holding process? Is there a way to know if a file is in use/open?</p>
<p>I would like to clear a production server /tmp directory but never harm any running process…</p>
<p>Thanks,<br />
Offer Baruch</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Wells</title>
		<link>http://www.howtogeek.com/howto/ubuntu/delete-files-older-than-x-days-on-linux/comment-page-1/#comment-71630</link>
		<dc:creator>Matt Wells</dc:creator>
		<pubDate>Sat, 09 May 2009 07:25:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/ubuntu/delete-files-older-than-x-days-on-linux/#comment-71630</guid>
		<description>I run a script that takes the client&#039;s URL and puts it into a file called database on my shared cPanel hosting.  I want to empty that file once a day.  What is the command line that I would enter into the advanced cron editor?  I am probably wront but would it be something like:

cp dev/null /home/username/public_html/directory/cgi-2009/database

Please let me know..

Thanks Much,

Matt W.</description>
		<content:encoded><![CDATA[<p>I run a script that takes the client&#8217;s URL and puts it into a file called database on my shared cPanel hosting.  I want to empty that file once a day.  What is the command line that I would enter into the advanced cron editor?  I am probably wront but would it be something like:</p>
<p>cp dev/null /home/username/public_html/directory/cgi-2009/database</p>
<p>Please let me know..</p>
<p>Thanks Much,</p>
<p>Matt W.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sir Hoagy</title>
		<link>http://www.howtogeek.com/howto/ubuntu/delete-files-older-than-x-days-on-linux/comment-page-1/#comment-70645</link>
		<dc:creator>Sir Hoagy</dc:creator>
		<pubDate>Mon, 20 Apr 2009 21:54:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/ubuntu/delete-files-older-than-x-days-on-linux/#comment-70645</guid>
		<description>How very cool this command showed up on &quot;stumbleupon&quot; when I just spoke with my friend today regarding reaping old files on our Linux server .  We were going to have a cron command every Mon/Wed/Sat but this....THIS frickin&#039; is sweet!  So much thanks!</description>
		<content:encoded><![CDATA[<p>How very cool this command showed up on &#8220;stumbleupon&#8221; when I just spoke with my friend today regarding reaping old files on our Linux server .  We were going to have a cron command every Mon/Wed/Sat but this&#8230;.THIS frickin&#8217; is sweet!  So much thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
