<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Florent Clairambault &#187; DOL</title>
	<atom:link href="http://florent.clairambault.fr/tag/dol/feed" rel="self" type="application/rss+xml" />
	<link>http://florent.clairambault.fr</link>
	<description></description>
	<lastBuildDate>Sat, 04 Feb 2012 19:56:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19719</generator>
		<item>
		<title>DOL &#8211; Delete Oldest Logs</title>
		<link>http://florent.clairambault.fr/dol-delete-oldest-logs?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=dol-delete-oldest-logs</link>
		<comments>http://florent.clairambault.fr/dol-delete-oldest-logs#comments</comments>
		<pubDate>Wed, 25 Feb 2009 17:23:06 +0000</pubDate>
		<dc:creator>Florent Clairambault</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[DOL]]></category>

		<guid isPermaLink="false">http://florent.clairambault.fr/?p=305</guid>
		<description><![CDATA[This is a little program I made some time ago because I had some problems with some log files I generated. I didn&#8217;t know how big they would end up and I had a limited disk space. As you can guess, it can be used for any files. So I could have called it &#8220;DOF [...]]]></description>
			<content:encoded><![CDATA[<p>This is a little program I made some time ago because I had some problems with some log files I generated. I didn&#8217;t know how big they would end up and I had a limited disk space. As you can guess, it can be used for any files. So I could have called it &#8220;DOF &#8211; Delete Oldest Files&#8221;.</p>
<p>The idea of this tiny .Net program is to delete the oldest logs first. It scans every files and delete as many files as required to reach its objectives.</p>
<p>Command line arguments (-h option) :</p>

<div class="wp_codebox"><table><tr id="p3054"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code" id="p305code4"><pre class="sh" style="font-family:monospace;">DOL - Delete Oldest Logs (first)
Arguments are :
===============
-d          : Directory where to analyse files
-dr         : Directory where to analyse files recursively
-de         : Delete empty dirs
-sm         : Sort files by modification (default)
-sc         : Sort files by creation
-sa         : Sort files by access
-ds &lt;size&gt;  : Delete oldest logs to reach a total size of &lt;size&gt; (in bytes)
-dn &lt;nb&gt;    : Delete oldest logs to reach a total number of &lt;nb&gt;
-v          : Switch to verbose mode
&nbsp;
Numbers can have k,m,g :
1k = 1 024         bytes
1m = 1 048 576     bytes
1g = 1 073 741 824 bytes</pre></td></tr></table></div>

<p>So, on Windows, you will probably do somethind like :</p>

<div class="wp_codebox"><table><tr id="p3055"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p305code5"><pre class="sh" style="font-family:monospace;">dol.exe -de -dr C:\temp -ds 2g</pre></td></tr></table></div>

<p>On Linux, it&#8217;s the same thing with a &#8220;mono&#8221; before.</p>

<div class="wp_codebox"><table><tr id="p3056"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p305code6"><pre class="sh" style="font-family:monospace;">mono dol.exe -dr /var/log/apache -ds 1g</pre></td></tr></table></div>

<p>You can download it <a href="http://florent.clairambault.fr/downloads/dol.exe">here</a> (13.5 KB).</p>
]]></content:encoded>
			<wfw:commentRss>http://florent.clairambault.fr/dol-delete-oldest-logs/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/13 queries in 0.004 seconds using disk: basic
Object Caching 442/453 objects using disk: basic

Served from: florent.clairambault.fr @ 2012-02-07 10:13:18 -->
