<?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>gregs &#187; debian</title>
	<atom:link href="http://gregs.tcias.co.uk/category/comps/nix/debian/feed/" rel="self" type="application/rss+xml" />
	<link>http://gregs.tcias.co.uk</link>
	<description>helping me remember what I figure out</description>
	<lastBuildDate>Fri, 03 Feb 2012 01:04:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Folder disk usage</title>
		<link>http://gregs.tcias.co.uk/2011/04/01/folder-disk-usage/</link>
		<comments>http://gregs.tcias.co.uk/2011/04/01/folder-disk-usage/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 13:50:39 +0000</pubDate>
		<dc:creator>gregs</dc:creator>
				<category><![CDATA[*nix]]></category>
		<category><![CDATA[comps]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[disk]]></category>
		<category><![CDATA[space]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://gregs.tcias.co.uk/?p=653</guid>
		<description><![CDATA[Today my server ran out of disk space. With the help of my friend Ed I was able to pin point the exact location. If you run this command from the root of your server: PLAIN TEXT CODE: du -sh &#8230; <a href="http://gregs.tcias.co.uk/2011/04/01/folder-disk-usage/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today my server ran out of disk space. <img src='http://gregs.tcias.co.uk/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  With the help of my friend Ed I was able to pin point the exact location. If you run this command from the root of your server:</p>
<div class="igBar"><span id="lcode-3"><a href="#" onclick="javascript:showPlainTxt('code-3'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-3">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">du -sh * </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>You will get something like the following:</p>
<div class="igBar"><span id="lcode-4"><a href="#" onclick="javascript:showPlainTxt('code-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-4">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">5</span>.1M&nbsp; &nbsp; bin</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">4</span>.0K&nbsp; &nbsp; boot</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">8</span>.0K&nbsp; &nbsp; dev</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">5</span>.3M&nbsp; &nbsp; etc</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">795M&nbsp; &nbsp; home</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">11M&nbsp;lib</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp;lib64</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">16K&nbsp;lost+found</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">4</span>.0K&nbsp; &nbsp; media</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">4</span>.0K&nbsp; &nbsp; mnt</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">4</span>.0K&nbsp; &nbsp; opt</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp;proc</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">26M&nbsp;root</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">3</span>.8M&nbsp; &nbsp; sbin</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">4</span>.0K&nbsp; &nbsp; selinux</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">4</span>.0K&nbsp; &nbsp; srv</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp;sys</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp;tmp</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">1</span>.3G&nbsp; &nbsp; usr</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">2</span>.4G&nbsp; &nbsp; var </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Then you can start drilling down the folders until you find the exact culprit. In my case a log file had grown to 8 Gig in size.</p>
]]></content:encoded>
			<wfw:commentRss>http://gregs.tcias.co.uk/2011/04/01/folder-disk-usage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This site is now powered by Nginx</title>
		<link>http://gregs.tcias.co.uk/2011/03/22/this-site-is-now-powered-by-nginx/</link>
		<comments>http://gregs.tcias.co.uk/2011/03/22/this-site-is-now-powered-by-nginx/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 16:58:35 +0000</pubDate>
		<dc:creator>gregs</dc:creator>
				<category><![CDATA[*nix]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[comps]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[web server]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[squeeze]]></category>

		<guid isPermaLink="false">http://gregs.tcias.co.uk/?p=644</guid>
		<description><![CDATA[I took the plunge this afternoon and switched from Apache 2 to NGinx. For the most part I followed the instructions posted here. Since I am now running Debian Squeeze there were a few things to note: spawn-fcgi: there's a &#8230; <a href="http://gregs.tcias.co.uk/2011/03/22/this-site-is-now-powered-by-nginx/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I took the plunge this afternoon and switched from Apache 2 to NGinx. For the most part I followed the instructions <a href="http://library.linode.com/web-servers/nginx/php-fastcgi/debian-5-lenny">posted here</a>. Since I am now running Debian Squeeze there were a few things to note:</p>
<ol>
<li>spawn-fcgi: there's a package for it so I just used that :
<div class="igBar"><span id="lcode-9"><a href="#" onclick="javascript:showPlainTxt('code-9'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-9">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sudo apt-get install spawn-fcgi </div>
</li>
</ol>
</div>
</div>
</div>
<p></li>
<li>the stop/start script complained when adding it to the boot/shutdown cycle, but one posted in the comments worked:
<div class="igBar"><span id="lcode-10"><a href="#" onclick="javascript:showPlainTxt('code-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-10">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#!/bin/bash</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">### BEGIN INIT INFO</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Provides: php-fastcgi</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Required-Start: $all</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Required-Stop: $all</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Default-Start: <span style="color:#800000;color:#800000;">2</span> <span style="color:#800000;color:#800000;">3</span> <span style="color:#800000;color:#800000;">4</span> <span style="color:#800000;color:#800000;">5</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Default-Stop: <span style="color:#800000;color:#800000;">0</span> <span style="color:#800000;color:#800000;">1</span> <span style="color:#800000;color:#800000;">6</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Short-Description: starts the php-fastcgi process</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Description: starts php-fastcgi using start-stop-daemon</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">### END INIT INFO</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PHP_SCRIPT=/usr/bin/php-fastcgi</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">FASTCGI_USER=www-data</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">RETVAL=<span style="color:#800000;color:#800000;">0</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">case <span style="color:#CC0000;">"$1"</span> in</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">start<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">su - $FASTCGI_USER -c $PHP_SCRIPT</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">RETVAL=$?</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">;;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">stop<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">killall -<span style="color:#800000;color:#800000;">9</span> php5-cgi</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">RETVAL=$?</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">;;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">restart<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">killall -<span style="color:#800000;color:#800000;">9</span> php5-cgi</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">su - $FASTCGI_USER -c $PHP_SCRIPT</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">RETVAL=$?</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">;;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">*<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">echo <span style="color:#CC0000;">"Usage: php-fastcgi {start|stop|restart}"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">exit <span style="color:#800000;color:#800000;">1</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">;;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">esac </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">exit $RETVAL </div>
</li>
</ol>
</div>
</div>
</div>
<p></li>
<li>Next to stop Apache from starting up run:
<div class="igBar"><span id="lcode-11"><a href="#" onclick="javascript:showPlainTxt('code-11'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-11">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sudo update-rc.<span style="">d</span> -f apache2 remove </div>
</li>
</ol>
</div>
</div>
</div>
<p></li>
<li>On the rewrite front, I needed to <a href="http://michaelshadle.com/2009/03/19/finally-using-nginxs-try-files-directive">add the following</a> to my virtual host configuration to have those seo friendly urls up and running again:
<div class="igBar"><span id="lcode-12"><a href="#" onclick="javascript:showPlainTxt('code-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-12">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">try_files $uri $uri/ /index.<span style="">php</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://gregs.tcias.co.uk/2011/03/22/this-site-is-now-powered-by-nginx/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Once again Kudos Linode</title>
		<link>http://gregs.tcias.co.uk/2010/06/12/once-again-kudos-linode/</link>
		<comments>http://gregs.tcias.co.uk/2010/06/12/once-again-kudos-linode/#comments</comments>
		<pubDate>Sun, 13 Jun 2010 02:16:20 +0000</pubDate>
		<dc:creator>gregs</dc:creator>
				<category><![CDATA[*nix]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linode]]></category>

		<guid isPermaLink="false">http://gregs.tcias.co.uk/?p=516</guid>
		<description><![CDATA[I recently had to re-build my VPS and with the help of the documents over Linode's Library I was up and running again within a couple of hours. A great concise, informative and accurate resource for configuring Linux based servers. &#8230; <a href="http://gregs.tcias.co.uk/2010/06/12/once-again-kudos-linode/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently had to re-build my VPS and with the help of the documents over <a href="http://library.linode.com/">Linode's Library</a> I was up and running again within a couple of hours. A great concise, informative and accurate resource for configuring Linux based servers. Thanks again to the folks at Linode!</p>
]]></content:encoded>
			<wfw:commentRss>http://gregs.tcias.co.uk/2010/06/12/once-again-kudos-linode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring Jetty&#8217;s memory usage</title>
		<link>http://gregs.tcias.co.uk/2010/04/20/configuring-jettys-memory-usage/</link>
		<comments>http://gregs.tcias.co.uk/2010/04/20/configuring-jettys-memory-usage/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 01:20:59 +0000</pubDate>
		<dc:creator>gregs</dc:creator>
				<category><![CDATA[*nix]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[jetty]]></category>

		<guid isPermaLink="false">http://gregs.tcias.co.uk/?p=512</guid>
		<description><![CDATA[Debian specific, but if you need to edit jvm configuration details for Jetty, look for this file: PLAIN TEXT CODE: /etc/default/jetty And locate the lines below to start fine tuning Jetty's memory usage: PLAIN TEXT CODE: # Extra options to &#8230; <a href="http://gregs.tcias.co.uk/2010/04/20/configuring-jettys-memory-usage/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Debian specific, but if you need to edit jvm configuration details for Jetty, look for this file:</p>
<div class="igBar"><span id="lcode-15"><a href="#" onclick="javascript:showPlainTxt('code-15'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-15">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/etc/default/jetty </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>And locate the lines below to start fine tuning Jetty's memory usage: </p>
<div class="igBar"><span id="lcode-16"><a href="#" onclick="javascript:showPlainTxt('code-16'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-16">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Extra options to pass to the JVM&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">JAVA_OPTIONS=<span style="color:#CC0000;">"-Xmx256m -Djava.awt.headless=true"</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://gregs.tcias.co.uk/2010/04/20/configuring-jettys-memory-usage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recursive delete</title>
		<link>http://gregs.tcias.co.uk/2010/03/22/recursive-delete/</link>
		<comments>http://gregs.tcias.co.uk/2010/03/22/recursive-delete/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 05:30:52 +0000</pubDate>
		<dc:creator>gregs</dc:creator>
				<category><![CDATA[*nix]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://gregs.tcias.co.uk/?p=496</guid>
		<description><![CDATA[I new it was possible, just never took the time to look it up. PLAIN TEXT CODE: rm -rf `find . -type d -name .svn` As with all types of deletes, recursive or not, use with caution. For windows use: &#8230; <a href="http://gregs.tcias.co.uk/2010/03/22/recursive-delete/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I new it was possible, just never took the time to <a title="[SVN] Recursively delete .svn folders" href="http://blog.snakehit.be/2007/08/29/svn-recursively-delete-svn-folders/">look it up</a>.</p>
<div class="igBar"><span id="lcode-19"><a href="#" onclick="javascript:showPlainTxt('code-19'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-19">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">rm -rf `find . -type d -name .<span style="">svn</span>` </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>As with all types of deletes, recursive or not, use with caution.</p>
<p>For windows use:</p>
<div class="igBar"><span id="lcode-20"><a href="#" onclick="javascript:showPlainTxt('code-20'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-20">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">del /S .<span style="">svn</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://gregs.tcias.co.uk/2010/03/22/recursive-delete/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deploying grails app to Jetty</title>
		<link>http://gregs.tcias.co.uk/2010/03/20/deploying-grails-app-to-jetty/</link>
		<comments>http://gregs.tcias.co.uk/2010/03/20/deploying-grails-app-to-jetty/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 13:35:59 +0000</pubDate>
		<dc:creator>gregs</dc:creator>
				<category><![CDATA[*nix]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[jetty]]></category>

		<guid isPermaLink="false">http://gregs.tcias.co.uk/?p=489</guid>
		<description><![CDATA[Short and sweet, step by step guide for creating a grails war and deploying it to your Jetty server (includes apache2 proxy steps) grails war (your app), in this case epic.war Copy to server PLAIN TEXT CODE: scp epic.war user@server:/location &#8230; <a href="http://gregs.tcias.co.uk/2010/03/20/deploying-grails-app-to-jetty/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Short and sweet, step by step guide for creating a grails war and deploying it to your Jetty server (includes apache2 proxy steps)</p>
<ol>
<li>grails war (your app), in this case epic.war</li>
<li>Copy to server
<div class="igBar"><span id="lcode-31"><a href="#" onclick="javascript:showPlainTxt('code-31'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-31">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">scp epic.<span style="">war</span> user@server:/location </div>
</li>
</ol>
</div>
</div>
</div>
<p></li>
<li>On Debian the location for jetty webapps is: /var/lib/jetty/webapps</li>
<li>Copy from upload location to the above folder (I used sudo)</li>
<li>Change permissions:
<div class="igBar"><span id="lcode-32"><a href="#" onclick="javascript:showPlainTxt('code-32'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-32">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sudo chown jetty:adm epic-<span style="color:#800000;color:#800000;">0</span>-<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">1</span>.<span style="">war</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></li>
<li>created a *.xml context file in /etc/jetty/contexts, with something like this [note case is important!!]:
<div class="igBar"><span id="lcode-33"><a href="#" onclick="javascript:showPlainTxt('code-33'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-33">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;?xml version=<span style="color:#CC0000;">"1.0"</span>&nbsp; encoding=<span style="color:#CC0000;">"ISO-8859-1"</span>?&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;!DOCTYPE Configure PUBLIC <span style="color:#CC0000;">"-//Mort Bay Consulting//DTD Configure//EN"</span> <span style="color:#CC0000;">"http://jetty.mortbay.org/configure.dtd"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;Configure class=<span style="color:#CC0000;">"org.mortbay.jetty.webapp.WebAppContext"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &lt;Set name=<span style="color:#CC0000;">"contextPath"</span>&gt;/epic&lt;/Set&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &lt;Set name=<span style="color:#CC0000;">"war"</span>&gt;&lt;SystemProperty name=<span style="color:#CC0000;">"jetty.home"</span> default=<span style="color:#CC0000;">"."</span>/&gt;/webapps/epic-<span style="color:#800000;color:#800000;">0</span>-<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">1</span>.<span style="">war</span>&lt;/Set&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/Configure&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></li>
<li>restart jetty :
<div class="igBar"><span id="lcode-34"><a href="#" onclick="javascript:showPlainTxt('code-34'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-34">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sudo /etc/init.<span style="">d</span>/jetty restart </div>
</li>
</ol>
</div>
</div>
</div>
<p> (try stop/start as well)</li>
<li>test with :
<div class="igBar"><span id="lcode-35"><a href="#" onclick="javascript:showPlainTxt('code-35'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-35">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">lynx http:<span style="color:#FF9933; font-style:italic;">//localhost:8080/epic/ </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></li>
<li>Nice but I'd like http://localhost/epic/ so enable mod_proxy in apache if you haven't already :
<div class="igBar"><span id="lcode-36"><a href="#" onclick="javascript:showPlainTxt('code-36'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-36">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">a2enmod proxy </div>
</li>
</ol>
</div>
</div>
</div>
<p></li>
<li>edit /etc/apache2/mods-enabled/proxy.load and if not present add at end:
<div class="igBar"><span id="lcode-37"><a href="#" onclick="javascript:showPlainTxt('code-37'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-37">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.<span style="">so</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></li>
<li>edit your virtualhost conf file I am using 000-default and add:
<div class="igBar"><span id="lcode-38"><a href="#" onclick="javascript:showPlainTxt('code-38'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-38">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ProxyRequests Off</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;Proxy *&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; Order deny,allow</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;Allow from all</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/Proxy&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ProxyPass        /epic http:<span style="color:#FF9933; font-style:italic;">//localhost:8080/epic</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ProxyPassReverse /epic http:<span style="color:#FF9933; font-style:italic;">//localhost:8080/epic</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ProxyPreserveHost On </div>
</li>
</ol>
</div>
</div>
</div>
<p></li>
<li>restart apache : 
<div class="igBar"><span id="lcode-39"><a href="#" onclick="javascript:showPlainTxt('code-39'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-39">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sudo /etc/init.<span style="">d</span>/apache2 restart </div>
</li>
</ol>
</div>
</div>
</div>
<p></li>
<li>now you can
<div class="igBar"><span id="lcode-40"><a href="#" onclick="javascript:showPlainTxt('code-40'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-40">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">lynx http:<span style="color:#FF9933; font-style:italic;">//localhost/epic/ </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></li>
</ol>
<p><strong>Update: </strong> I had omitted the <code>ProxyPreserveHost On</code>  from the Apache configuration, which resulted in css, images and external javascripts not loading. It also caused an issue with accessing controllers.</p>
<p>Sources:</p>
<ul>
<li><a href="http://docs.codehaus.org/display/JETTY/Configuring+mod_proxy">Configuring mod_proxy</a></li>
<li><a href="http://www.enavigo.com/2008/08/29/deploying-a-web-application-to-jetty/">Deploying a web application to Jetty</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://gregs.tcias.co.uk/2010/03/20/deploying-grails-app-to-jetty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache/SSL configuration (on debian)</title>
		<link>http://gregs.tcias.co.uk/2010/03/16/apachessl-configuration-on-debian/</link>
		<comments>http://gregs.tcias.co.uk/2010/03/16/apachessl-configuration-on-debian/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 02:50:06 +0000</pubDate>
		<dc:creator>gregs</dc:creator>
				<category><![CDATA[*nix]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://gregs.tcias.co.uk/?p=486</guid>
		<description><![CDATA[More for posterity, this was the last step that was eluding me. I had found numerous resources to get me started on the path to setting up Apache and SSL, but when it came to having a working config and &#8230; <a href="http://gregs.tcias.co.uk/2010/03/16/apachessl-configuration-on-debian/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>More for posterity, this was the last step that was eluding me. I had found numerous resources to get me started on the path to setting up Apache and SSL, but when it came to having a working config and server, when I went to browse my Debian test server, I would get this message:</p>
<div class="igBar"><span id="lcode-42"><a href="#" onclick="javascript:showPlainTxt('code-42'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-42">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#40;</span>Error code: ssl_error_rx_record_too_long<span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>When you google for the solution I found a number of dead ends, but <a href="http://mentaljetsam.wordpress.com/2009/03/11/firefox-https-error-ssl_error_rx_record_too_long/#comment-803">in the comments for one of them there was a helpful pointer</a>.</p>
<p>When you do an 'ls -la' on sites-enabled (inside /etc/apache2), you will see a symbolic link to the sites-available folder and typically just for the default site (000-default -&gt; default). However in sites-available there's also a default-ssl config file. Creating a symbolic link to this file and reloading apache fixed my problem and now I have apache serving up http over SSL .</p>
]]></content:encoded>
			<wfw:commentRss>http://gregs.tcias.co.uk/2010/03/16/apachessl-configuration-on-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading to Lenny</title>
		<link>http://gregs.tcias.co.uk/2010/03/09/upgrading-to-lenny/</link>
		<comments>http://gregs.tcias.co.uk/2010/03/09/upgrading-to-lenny/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 06:52:56 +0000</pubDate>
		<dc:creator>gregs</dc:creator>
				<category><![CDATA[*nix]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linode]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://gregs.tcias.co.uk/?p=481</guid>
		<description><![CDATA[It's been while since I attended to my VPS, I decided to spend some time last night upgrading my distribution from Etch to Lenny. This is normally a moment where your heart sinks as quite a few things do tend &#8230; <a href="http://gregs.tcias.co.uk/2010/03/09/upgrading-to-lenny/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It's been  while since I attended to my VPS, I decided to spend some time last night upgrading my distribution from Etch to Lenny. This is normally a moment where your heart sinks as quite a few things do tend to go belly up, but I am happy to report that I only came across some minor issues and these were resolved in minutes as opposed to hours.</p>
<ol>
<li>MySQL : failed to start, complaining about:
<div class="igBar"><span id="lcode-46"><a href="#" onclick="javascript:showPlainTxt('code-46'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-46">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/etc/init.<span style="">d</span>/mysql: ERROR: Using expire_logs_days without log_bin crashes</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">the server. <span style="">See</span> README.<span style="">Debian</span>.<span style="">gz</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Commenting out the expire_logs_days in the my.cnf file allowed me to restart MySQL.</li>
<li>After the upgrade of Apache, my virtual hosts weren't working. A quick search via Google <a href="http://www.pc-freak.net/blog/solution-to-a-problem-with-virtualhosts-on-debian-lenny-default-virtualhost-opening-by-default-overwritting-the-rest-of-the-configured-virtualhosts/">pointed me to this post</a> - a quick edit of all of my host files and it was all working again.</li>
<li>the php-mysql connector somehow hadn't been upgraded/installed so a quick
<div class="igBar"><span id="lcode-47"><a href="#" onclick="javascript:showPlainTxt('code-47'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-47">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">apt-get install php5-mysql </div>
</li>
</ol>
</div>
</div>
</div>
<p>fixed that problem.</li>
<li>OpenBD : the only thing that remains broken was my tomcat5.5 Open BD install. Tomcat was working fine but Open BD refused to start up complaining about :
<div class="igBar"><span id="lcode-48"><a href="#" onclick="javascript:showPlainTxt('code-48'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-48">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">javax.<span style="">servlet</span>.<span style="">ServletException</span>: Open BlueDragon Engine Failed to initialise tags: java.<span style="">awt</span>.<span style="">Color</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>Since I am not really using it, it's not that important, but at some stage I'd like to get it working again. If you have any suggestions, please leave a comment.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://gregs.tcias.co.uk/2010/03/09/upgrading-to-lenny/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>tail &#124; grep</title>
		<link>http://gregs.tcias.co.uk/2005/06/30/tail-grep/</link>
		<comments>http://gregs.tcias.co.uk/2005/06/30/tail-grep/#comments</comments>
		<pubDate>Thu, 30 Jun 2005 04:00:00 +0000</pubDate>
		<dc:creator>gregs</dc:creator>
				<category><![CDATA[*nix]]></category>
		<category><![CDATA[debian]]></category>

		<guid isPermaLink="false">http://gregs.tcias.co.uk/?p=138</guid>
		<description><![CDATA[After reading a quote on a mailing list last week about the concept behind unix tools and their focus on doing one task well and the OS allowing you to pipe several commands in one go, it dawned on me &#8230; <a href="http://gregs.tcias.co.uk/2005/06/30/tail-grep/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After reading a quote on a mailing list last week about the concept behind unix tools and their focus on doing one task well and the OS allowing you to pipe several commands in one go, it dawned on me that I could do the following on log files:</p>
<p><code>
<div class="igBar"><span id="lcode-51"><a href="#" onclick="javascript:showPlainTxt('code-51'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-51">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">tail -f /var/log/syslog | grep <span style="color:#CC0000;">"named"</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></code></p>
<p>So as the log fills up only items where the pattern "named" is found are displayed. Very neat!</p>
<p><strong>UPDATE</strong></p>
<p>Thanks to some of the comments, here's a way to colour code the output (hopefully this will render better than the comment output)</p>
<p><code>
<div class="igBar"><span id="lcode-52"><a href="#" onclick="javascript:showPlainTxt('code-52'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-52">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">tail -f /var/log/syslog | grep <span style="color:#CC0000;">"named"</span> --color </div>
</li>
</ol>
</div>
</div>
</div>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://gregs.tcias.co.uk/2005/06/30/tail-grep/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

