<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>matt-helps</title>
	
	<link>http://www.matt-helps.com</link>
	<description>insight on all things techie</description>
	<pubDate>Thu, 21 May 2009 07:35:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/matt-helps" type="application/rss+xml" /><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fmatt-helps" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fmatt-helps" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Fmatt-helps" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.bloglines.com/sub/http://feeds.feedburner.com/matt-helps" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fmatt-helps" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fmatt-helps" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fmatt-helps" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Ubuntu: Ctrl-C no longer works in terminal</title>
		<link>http://www.matt-helps.com/ubuntu-ctrl-c-no-longer-works-in-terminal</link>
		<comments>http://www.matt-helps.com/ubuntu-ctrl-c-no-longer-works-in-terminal#comments</comments>
		<pubDate>Thu, 14 May 2009 10:23:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[9.04]]></category>

		<category><![CDATA[abort]]></category>

		<category><![CDATA[broken]]></category>

		<category><![CDATA[cancel]]></category>

		<category><![CDATA[ctrl-c]]></category>

		<category><![CDATA[doesn't work]]></category>

		<category><![CDATA[gnome terminal]]></category>

		<category><![CDATA[jaunty]]></category>

		<category><![CDATA[terminal]]></category>

		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.matt-helps.com/?p=149</guid>
		<description><![CDATA[The programmers behind gnome-terminal seem to have changed something to do with the way ctrl-c works.  Now if you want to cancel a program that has the focus of the terminal and you hit ctrl-c then nothing will happen.  That&#8217;s because the gnome terminal is trying to copy text to the clipboard - [...]]]></description>
			<content:encoded><![CDATA[<p>The programmers behind gnome-terminal seem to have changed something to do with the way ctrl-c works.  Now if you want to cancel a program that has the focus of the terminal and you hit ctrl-c then nothing will happen.  That&#8217;s because the gnome terminal is trying to copy text to the clipboard - perhaps your gnome-terminal&#8217;s &#8220;copy to clipboard&#8221; command is set to ctrl-shift-c in which case you won&#8217;t notice this problem!  </p>
<p>The gnome-terminal used to &#8220;copy to clipboard&#8221; only if you had text selected and would issue a ctrl-c (and abort/cancel) if you had none selected.  Now it always attempts to &#8220;copy to clipboard&#8221; regardless of whether you have text selected or not.  The only way around this right now is to go into your keyboard shortcuts (in the Edit menu) and set Edit | Copy to something other than ctrl-c, I suggest the original gnome-terminal default of shift-ctrl-c.</p>
<p>Shame, since ctrl-c is used everywhere else for copy!</p>
<p>Alternatively, some programs will also abort if you use ctrl-\ (that&#8217;s a backslash) and some with ctrl-d, other than that you&#8217;ll have to learn each program&#8217;s individual quit command (if they have one).  For &#8220;top&#8221; it is q.</p>
<p>Hope that helps! </p>


<p style="padding-left: 12px; font-size: 12px; line-height: 16px; font-family: arial, sans-serif;"><b><u>Related posts</b></u><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/linux_bash_scripting_search_bash_history' rel='bookmark' title='Permanent Link: Linux: Bash Scripting: Search Bash History'>Linux: Bash Scripting: Search Bash History</a></span><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/faster-internet-connection-local-dns-cache' rel='bookmark' title='Permanent Link: Faster internet connection with a local DNS cache'>Faster internet connection with a local DNS cache</a></span><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/temporarily-disable-touchpad-while-typing' rel='bookmark' title='Permanent Link: How to temporarily disable the touchpad while typing'>How to temporarily disable the touchpad while typing</a></span><br/></p>
<p><a href="http://feedads.g.doubleclick.net/~a/n3nrPZlo__7LSCxGuVu3bwemzw0/0/da"><img src="http://feedads.g.doubleclick.net/~a/n3nrPZlo__7LSCxGuVu3bwemzw0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/n3nrPZlo__7LSCxGuVu3bwemzw0/1/da"><img src="http://feedads.g.doubleclick.net/~a/n3nrPZlo__7LSCxGuVu3bwemzw0/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/matt-helps?a=L9U3_vQGRww:Jglxqvs2VMs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/matt-helps?i=L9U3_vQGRww:Jglxqvs2VMs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/matt-helps?a=L9U3_vQGRww:Jglxqvs2VMs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/matt-helps?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/matt-helps?a=L9U3_vQGRww:Jglxqvs2VMs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/matt-helps?i=L9U3_vQGRww:Jglxqvs2VMs:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/matt-helps?a=L9U3_vQGRww:Jglxqvs2VMs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/matt-helps?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.matt-helps.com/ubuntu-ctrl-c-no-longer-works-in-terminal/feed</wfw:commentRss>
		</item>
		<item>
		<title>Facebook Easter Egg</title>
		<link>http://www.matt-helps.com/facebook-easter-egg</link>
		<comments>http://www.matt-helps.com/facebook-easter-egg#comments</comments>
		<pubDate>Wed, 13 May 2009 13:58:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Internet]]></category>

		<category><![CDATA[easter egg]]></category>

		<category><![CDATA[facebook]]></category>

		<category><![CDATA[fun]]></category>

		<category><![CDATA[lens flare]]></category>

		<guid isPermaLink="false">http://www.matt-helps.com/?p=142</guid>
		<description><![CDATA[Well I&#8217;m not sure what facebook are doing with this but if you follow the following commands you get a lens flare (a visual effect) on the screen:
1. Log into facebook
2. Click on the background (the white bit)
3. Press: up, up, down, down, left, right, left, right
4. Press: b, a, enter
5. Click on the screen
Thanks [...]]]></description>
			<content:encoded><![CDATA[<p>Well I&#8217;m not sure what facebook are doing with this but if you follow the following commands you get a lens flare (a visual effect) on the screen:</p>
<p><code>1. Log into facebook<br />
2. Click on the background (the white bit)<br />
3. Press: up, up, down, down, left, right, left, right<br />
4. Press: b, a, enter<br />
5. Click on the screen</code></p>
<p>Thanks facebook - I guess their code monkeys have got time to kill !?</p>


<p style="padding-left: 12px; font-size: 12px; line-height: 16px; font-family: arial, sans-serif;"><b><u>Related posts</b></u><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/firefox_3_easter_eggs_about_mozilla' rel='bookmark' title='Permanent Link: Firefox 3 Easter Eggs'>Firefox 3 Easter Eggs</a></span><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/firefox_3_and_tesco_direct' rel='bookmark' title='Permanent Link: Firefox 3 and Tesco Direct'>Firefox 3 and Tesco Direct</a></span><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/how_to_keep_web_addresses_on_one_line' rel='bookmark' title='Permanent Link: How to keep web addresses on one line of an email'>How to keep web addresses on one line of an email</a></span><br/></p>
<p><a href="http://feedads.g.doubleclick.net/~a/R3Vk3TMfHfLCLzwoTE_VEppl1Js/0/da"><img src="http://feedads.g.doubleclick.net/~a/R3Vk3TMfHfLCLzwoTE_VEppl1Js/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/R3Vk3TMfHfLCLzwoTE_VEppl1Js/1/da"><img src="http://feedads.g.doubleclick.net/~a/R3Vk3TMfHfLCLzwoTE_VEppl1Js/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/matt-helps?a=vZ3hbzeqwwE:_JtWaT2E7ns:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/matt-helps?i=vZ3hbzeqwwE:_JtWaT2E7ns:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/matt-helps?a=vZ3hbzeqwwE:_JtWaT2E7ns:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/matt-helps?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/matt-helps?a=vZ3hbzeqwwE:_JtWaT2E7ns:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/matt-helps?i=vZ3hbzeqwwE:_JtWaT2E7ns:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/matt-helps?a=vZ3hbzeqwwE:_JtWaT2E7ns:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/matt-helps?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.matt-helps.com/facebook-easter-egg/feed</wfw:commentRss>
		</item>
		<item>
		<title>How to spend $4000 from the commandline!</title>
		<link>http://www.matt-helps.com/how-to-spend-4000-dollars-from-the-commandline</link>
		<comments>http://www.matt-helps.com/how-to-spend-4000-dollars-from-the-commandline#comments</comments>
		<pubDate>Tue, 17 Mar 2009 11:48:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Internet]]></category>

		<category><![CDATA[Amazon Web Services]]></category>

		<category><![CDATA[API Tools]]></category>

		<category><![CDATA[AWS]]></category>

		<category><![CDATA[ec2-describe-reserved-instance-offering]]></category>

		<category><![CDATA[ec2-purchase-reserved-instance-offering]]></category>

		<category><![CDATA[Elastic Cloud]]></category>

		<category><![CDATA[hosting]]></category>

		<category><![CDATA[spend money commandline]]></category>

		<guid isPermaLink="false">http://www.matt-helps.com/?p=139</guid>
		<description><![CDATA[I have used Amazon Elastic Cloud (EC2) for my dedicated hosting needs for nearly 6 months now.  They've just released a new "bulk-buy" service that enables you to buy 1 or 3 years' of as many instances as you want in advance and you buy it by issuing a command from terminal or the commandline/dos prompt.]]></description>
			<content:encoded><![CDATA[<p>I have used Amazon Elastic Cloud (EC2) for my dedicated hosting needs for nearly 6 months now.  They&#8217;ve just released a new &#8220;bulk-buy&#8221; service that enables you to buy 1 or 3 years&#8217; of as many instances as you want in advance.  I&#8217;ve just bought 3 years of the smallest instance at $500 plus $0.03 per hour - saving just over half of my server costs over the course of the 3 years: $500 + (24*365.25*3*0.03) = $1288.94 for 3 years, verses the current cost of $0.1 per hour which is 24*365.25*3*0.1 = $2629.80 for 3 years.  Both prices are ex-vat and don&#8217;t include bandwidth costs or storage costs, obviously, though those costs are themselves VERY competitive ($0.17/GB outgoing and $0.10/GB incoming).  But as you can see it is a good deal for me to bulk buy in advance.</p>
<p>So how do you bulk buy?  Amazon&#8217;s new service is called reserved instance and you bulk buy simply by typing in a command in your terminal or dos cmd prompt  (ec2-purchase-reserved-instance-offering) and hey presto you&#8217;ve just bulk bought in advance.  For me that was $500, but it is possible to buy the biggest instance they have for $4000!  All just by issuing a single call from the commandline.  That is such a scary prospect I went into my history and deleted it so that I wouldn&#8217;t accidentally call the command again by accident.  Actually there was no need to delete it from my history as in order to buy a reservation you need to ask Amazon to &#8220;offer&#8221; you one (ec2-describe-reserved-instance-offering) and then use the offering id that they specify for the instance type &#038; region you need.  Once that offering id has been used it can&#8217;t be used again - but I wasn&#8217;t about to test that their code worked&#8230;  </p>
<p>The way it works in terms of billing is that the running instance that fits the profile you&#8217;ve bought are discounted to the new rate (or as many instances that fit the reservation profile that you&#8217;ve bought anyway).  You don&#8217;t need to restart any running instances and you don&#8217;t need to relaunch them in any particular way - it is really just something that is applied at billing time.  Make sure you reserve the right type of instance in the right availability zone though - get that wrong and you&#8217;ve wasted a serious amount of money! </p>
<p>Anyway, yes, top range instance is $4000 for 3 years per instance plus $0.24 per hour per instance - so it is possible to spend $4000, plus VAT (or your country&#8217;s tax) from the commandline in one easy line!  Ouch! </p>


<p style="padding-left: 12px; font-size: 12px; line-height: 16px; font-family: arial, sans-serif;"><b><u>Related posts</b></u><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/firefox_3_and_tesco_direct' rel='bookmark' title='Permanent Link: Firefox 3 and Tesco Direct'>Firefox 3 and Tesco Direct</a></span><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/olpc_open_source_software_and_microsoft' rel='bookmark' title='Permanent Link: OLPC, Open Source and Microsoft'>OLPC, Open Source and Microsoft</a></span><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/moving_your_website_check_your_ttl' rel='bookmark' title='Permanent Link: Moving your website?  Check your TTL!'>Moving your website?  Check your TTL!</a></span><br/></p>
<p><a href="http://feedads.g.doubleclick.net/~a/L4TymPEFsRCw2slZ0QbAnJE2bXw/0/da"><img src="http://feedads.g.doubleclick.net/~a/L4TymPEFsRCw2slZ0QbAnJE2bXw/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/L4TymPEFsRCw2slZ0QbAnJE2bXw/1/da"><img src="http://feedads.g.doubleclick.net/~a/L4TymPEFsRCw2slZ0QbAnJE2bXw/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/matt-helps?a=NsRM7j9ys4w:jpRtnTNPHGo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/matt-helps?i=NsRM7j9ys4w:jpRtnTNPHGo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/matt-helps?a=NsRM7j9ys4w:jpRtnTNPHGo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/matt-helps?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/matt-helps?a=NsRM7j9ys4w:jpRtnTNPHGo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/matt-helps?i=NsRM7j9ys4w:jpRtnTNPHGo:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/matt-helps?a=NsRM7j9ys4w:jpRtnTNPHGo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/matt-helps?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.matt-helps.com/how-to-spend-4000-dollars-from-the-commandline/feed</wfw:commentRss>
		</item>
		<item>
		<title>How to stop Spotify on Linux audio skipping</title>
		<link>http://www.matt-helps.com/how-to-stop-spotify-on-linux-audio-skipping</link>
		<comments>http://www.matt-helps.com/how-to-stop-spotify-on-linux-audio-skipping#comments</comments>
		<pubDate>Mon, 09 Mar 2009 08:54:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[OSS driver]]></category>

		<category><![CDATA[pulse audio]]></category>

		<category><![CDATA[skipping]]></category>

		<category><![CDATA[spotify]]></category>

		<category><![CDATA[wine]]></category>

		<category><![CDATA[winecfg]]></category>

		<guid isPermaLink="false">http://www.matt-helps.com/?p=137</guid>
		<description><![CDATA[Spotify is a great application that lets you listen to any music they have (there&#8217;s an incredible amount on there) with the odd, almost unnoticable, advert thrown in to pay for the service.  It works on windows or mac, but there is no native binaries for linux.  Thankfully spotify for windows works under [...]]]></description>
			<content:encoded><![CDATA[<p>Spotify is a great application that lets you listen to any music they have (there&#8217;s an incredible amount on there) with the odd, almost unnoticable, advert thrown in to pay for the service.  It works on windows or mac, but there is no native binaries for linux.  Thankfully spotify for windows works under wine just fine - hooray.</p>
<p>However I found that the audio wasn&#8217;t great - for me it would skip like a CD skips every few seconds - if it was a CD I would just clean it and throw it in the bin.  The reason for this behaviour is found in wine&#8217;s audio config - I won&#8217;t go into the real reason why, but it is to do with the driver and daemon, etc.  Other people have had problems with distortion or just no audio at all.</p>
<p>The solution if you have this problem is to start all your wine commands with padsp and make sure the OSS audio driver is selected.  First start winecfg like this:</p>
<p><code>padsp winecfg</code></p>
<p>Then go to Audio, find the OSS driver and select that (and unselect anything else selected), hit OK, etc..  Now start your wine apps (inc spotify) like this:</p>
<p><code>padsp wine "C:\Program Files\Spotify\spotify.exe"</code></p>
<p>And now my spotify is working just fine!</p>


<p style="padding-left: 12px; font-size: 12px; line-height: 16px; font-family: arial, sans-serif;"><b><u>Related posts</b></u><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/ubuntu-ctrl-c-no-longer-works-in-terminal' rel='bookmark' title='Permanent Link: Ubuntu: Ctrl-C no longer works in terminal'>Ubuntu: Ctrl-C no longer works in terminal</a></span><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/three-million-hit-by-windows-worm' rel='bookmark' title='Permanent Link: Three million hit by Windows worm'>Three million hit by Windows worm</a></span><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/how_to_strip_itunes_drm_from_your_music_files' rel='bookmark' title='Permanent Link: How to strip iTunes DRM from your music files'>How to strip iTunes DRM from your music files</a></span><br/></p>
<p><a href="http://feedads.g.doubleclick.net/~a/QrsYTUIk096w-snZppUlUqoYGgw/0/da"><img src="http://feedads.g.doubleclick.net/~a/QrsYTUIk096w-snZppUlUqoYGgw/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/QrsYTUIk096w-snZppUlUqoYGgw/1/da"><img src="http://feedads.g.doubleclick.net/~a/QrsYTUIk096w-snZppUlUqoYGgw/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/matt-helps?a=9-z11Urqolk:0nHEVInKozo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/matt-helps?i=9-z11Urqolk:0nHEVInKozo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/matt-helps?a=9-z11Urqolk:0nHEVInKozo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/matt-helps?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/matt-helps?a=9-z11Urqolk:0nHEVInKozo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/matt-helps?i=9-z11Urqolk:0nHEVInKozo:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/matt-helps?a=9-z11Urqolk:0nHEVInKozo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/matt-helps?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.matt-helps.com/how-to-stop-spotify-on-linux-audio-skipping/feed</wfw:commentRss>
		</item>
		<item>
		<title>Recursive Find and Replace in Multiple Files</title>
		<link>http://www.matt-helps.com/find-and-replace-multiple-files</link>
		<comments>http://www.matt-helps.com/find-and-replace-multiple-files#comments</comments>
		<pubDate>Sat, 14 Feb 2009 09:22:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[bash scripting]]></category>

		<category><![CDATA[find]]></category>

		<category><![CDATA[find replace]]></category>

		<category><![CDATA[search replace commandline]]></category>

		<category><![CDATA[sed]]></category>

		<category><![CDATA[terminal]]></category>

		<category><![CDATA[xargs]]></category>

		<guid isPermaLink="false">http://www.matt-helps.com/?p=135</guid>
		<description><![CDATA[Just had to make a few changes to a website I own that means changing the same text in lots of files.  Linux has lots of powerful tools to enable you to make this kind of change over lots of files over many directories very easily.  The command is:
find . -type f &#124; [...]]]></description>
			<content:encoded><![CDATA[<p>Just had to make a few changes to a website I own that means changing the same text in lots of files.  Linux has lots of powerful tools to enable you to make this kind of change over lots of files over many directories very easily.  The command is:</p>
<p><code>find . -type f | xargs sed -i 's/string1/string2/g'</code></p>
<p>This is basically two commands.  Find will find a list of actual files (-type f, rather than symlinks or directories, etc) in this directory (.) - you could specify particular filenames by adding -iname &#8220;filename.ext&#8221; before the pipe (|).</p>
<p>Find outputs a list of relative filenames on each line.  These are then piped (|) into xargs.  xargs is a progam that runs the command that follows it (sed) once for each line of text that it receives, in this case from the pipe, it will run sed once for every filename it receives and place the filename at the end of the sed command.</p>
<p>The sed command is incredibly powerful and well worth learning how to use.  sed stands for &#8220;Stream Editor&#8221; and edits a stream of text as instructed.  xargs passes a filename for sed to operate on, then it makes a change inplace (-i), which means it changes the file rather than just outputting the change wherever you ask it to, and then carries out the actual command (&#8217;s/string1/string2/g&#8217;).</p>
<p>&#8217;s/string1/string2/g&#8217; is in quotes to keep the scope clear, s is a command meaning substitute and the s command takes the form s/oldstring/newstring/ which means it finds the text oldstring (can be a regular expression) and replaces it with the newstring text.  For each line it finds it carries it out as many times as it finds the oldstring because we&#8217;ve set the global option (g), without which it would just change the first instance of oldstring.</p>
<p>Hope someone finds that helpful!</p>


<p style="padding-left: 12px; font-size: 12px; line-height: 16px; font-family: arial, sans-serif;"><b><u>Related posts</b></u><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/linux_bash_scripting_search_bash_history' rel='bookmark' title='Permanent Link: Linux: Bash Scripting: Search Bash History'>Linux: Bash Scripting: Search Bash History</a></span><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/using-alien-to-convert-rpm-packages-to-lpia-deb' rel='bookmark' title='Permanent Link: Using Alien to convert .rpm packages to lpia .deb'>Using Alien to convert .rpm packages to lpia .deb</a></span><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/trash-rather-than-rm' rel='bookmark' title='Permanent Link: Trash rather than rm'>Trash rather than rm</a></span><br/></p>
<p><a href="http://feedads.g.doubleclick.net/~a/gN9AfvWUN-mw2cObhIj0aMx-Arg/0/da"><img src="http://feedads.g.doubleclick.net/~a/gN9AfvWUN-mw2cObhIj0aMx-Arg/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/gN9AfvWUN-mw2cObhIj0aMx-Arg/1/da"><img src="http://feedads.g.doubleclick.net/~a/gN9AfvWUN-mw2cObhIj0aMx-Arg/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/matt-helps?a=uinEps1D"><img src="http://feeds.feedburner.com/~f/matt-helps?i=uinEps1D" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/matt-helps?a=LMLDZidw"><img src="http://feeds.feedburner.com/~f/matt-helps?d=52" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/matt-helps?a=AARtnddk"><img src="http://feeds.feedburner.com/~f/matt-helps?i=AARtnddk" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/matt-helps?a=YXB0bRex"><img src="http://feeds.feedburner.com/~f/matt-helps?d=41" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.matt-helps.com/find-and-replace-multiple-files/feed</wfw:commentRss>
		</item>
		<item>
		<title>How to temporarily disable the touchpad while typing</title>
		<link>http://www.matt-helps.com/temporarily-disable-touchpad-while-typing</link>
		<comments>http://www.matt-helps.com/temporarily-disable-touchpad-while-typing#comments</comments>
		<pubDate>Fri, 13 Feb 2009 08:08:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[disable touchpad]]></category>

		<category><![CDATA[disable trackpad]]></category>

		<category><![CDATA[syndaemon]]></category>

		<category><![CDATA[touchpad]]></category>

		<category><![CDATA[typing moves cursor]]></category>

		<guid isPermaLink="false">http://www.matt-helps.com/?p=130</guid>
		<description><![CDATA[In linux if you have a laptop with a trackpad just below the keyboard sometimes you can be typing away and then suddenly you touch the trackpad/touchpad and find your cursor appears elsewhere so you have to stop typing and put the cursor back in the right place.  Its a bit of a pain [...]]]></description>
			<content:encoded><![CDATA[<p>In linux if you have a laptop with a trackpad just below the keyboard sometimes you can be typing away and then suddenly you touch the trackpad/touchpad and find your cursor appears elsewhere so you have to stop typing and put the cursor back in the right place.  Its a bit of a pain if you&#8217;re doing a fair bit of typing especially considering how sensitive these pads can be.</p>
<p>The easiest solution is to temporarily disable the touchpad automatically whenever you type for 1 second.  This is easily achievable with the following command in terminal:</p>
<p><code>syndaemon -d -t -i 1</code></p>
<p>The number 1 means 1 second and can be adjusted to any integer.  </p>
<p>Of course the best thing to do is to make it a task executed at start up so go into preferences | sessions and then add an entry there.  The name and description can be anything you want and the command is the command above.</p>


<p style="padding-left: 12px; font-size: 12px; line-height: 16px; font-family: arial, sans-serif;"><b><u>Related posts</b></u><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/linux_bash_scripting_search_bash_history' rel='bookmark' title='Permanent Link: Linux: Bash Scripting: Search Bash History'>Linux: Bash Scripting: Search Bash History</a></span><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/ubuntu-ctrl-c-no-longer-works-in-terminal' rel='bookmark' title='Permanent Link: Ubuntu: Ctrl-C no longer works in terminal'>Ubuntu: Ctrl-C no longer works in terminal</a></span><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/find-and-replace-multiple-files' rel='bookmark' title='Permanent Link: Recursive Find and Replace in Multiple Files'>Recursive Find and Replace in Multiple Files</a></span><br/></p>
<p><a href="http://feedads.g.doubleclick.net/~a/0q3EKZlwDfQGDb_Znu8gg9oQ7UQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/0q3EKZlwDfQGDb_Znu8gg9oQ7UQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/0q3EKZlwDfQGDb_Znu8gg9oQ7UQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/0q3EKZlwDfQGDb_Znu8gg9oQ7UQ/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/matt-helps?a=o8mIPzW1"><img src="http://feeds.feedburner.com/~f/matt-helps?i=o8mIPzW1" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/matt-helps?a=QIgIX5XC"><img src="http://feeds.feedburner.com/~f/matt-helps?d=52" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/matt-helps?a=oszowGCa"><img src="http://feeds.feedburner.com/~f/matt-helps?i=oszowGCa" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/matt-helps?a=bX1OzVoW"><img src="http://feeds.feedburner.com/~f/matt-helps?d=41" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.matt-helps.com/temporarily-disable-touchpad-while-typing/feed</wfw:commentRss>
		</item>
		<item>
		<title>Faster internet connection with a local DNS cache</title>
		<link>http://www.matt-helps.com/faster-internet-connection-local-dns-cache</link>
		<comments>http://www.matt-helps.com/faster-internet-connection-local-dns-cache#comments</comments>
		<pubDate>Wed, 28 Jan 2009 14:31:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Internet]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[dhclient.conf]]></category>

		<category><![CDATA[dig]]></category>

		<category><![CDATA[DNS]]></category>

		<category><![CDATA[DNS cache]]></category>

		<category><![CDATA[dnsmasq]]></category>

		<category><![CDATA[Domain Name Server]]></category>

		<category><![CDATA[faster browsing]]></category>

		<category><![CDATA[Firefox]]></category>

		<category><![CDATA[local DNS]]></category>

		<category><![CDATA[local DNS cache]]></category>

		<category><![CDATA[resolv.conf]]></category>

		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.matt-helps.com/?p=125</guid>
		<description><![CDATA[One of the things you can do to speed up browsing and general internet activity is to create a local DNS cache.  A DNS is a Domain Name Server and its purpose is to convert domain names to IP addresses.  Every time you type in a domain name your computer has to ask [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things you can do to speed up browsing and general internet activity is to create a local DNS cache.  A DNS is a Domain Name Server and its purpose is to convert domain names to IP addresses.  Every time you type in a domain name your computer has to ask a DNS to convert it to an IP address.  Occasionally a website&#8217;s IP address will change so you can&#8217;t store an IP address forever, but it is worth cacheing it locally, even just for 24 hours or so considering the number of times we hit some sites during the day.</p>
<p>In Ubuntu (and debian, and other flavours of linux, though this tutorial is written for ubuntu) we can install a little helper application to cache the DNS results for a time and thus speed up our internet experience in general!  It is called dnsmasq and the first step is to install it:</p>
<p><code>sudo apt-get install dnsmasq</code></p>
<p>Then at the terminal we need to edit the config file:</p>
<p><code>gksudo gedit /etc/dnsmasq.conf</code></p>
<p>Then find the line that says &#8220;#listen-address&#8221; and remove the leading # (if there is one) and make it say:</p>
<p><code>listen-address=127.0.0.1</code></p>
<p>Save and exit.  Now edit /etc/dhcp3/dhclient.conf:</p>
<p><code>gksudo gedit /etc/dhcp3/dhclient.conf</code></p>
<p>Edit the line that says &#8220;prepend domain-name-servers&#8221; to say:</p>
<p><code>prepend domain-name-servers 127.0.0.1;</code></p>
<p>or if you want to use OpenDNS.org&#8217;s DNS servers (which I recommend) then change that line to:</p>
<p><code>prepend domain-name-servers 127.0.0.1, 208.67.222.222, 208.67.220.220;</code></p>
<p>Now at this point if you were to get a new IP lease it would all work, but that&#8217;s a bit of hassle so lets make it work now without rebooting the hardware.  Edit /etc/resolv.conf:</p>
<p><code>gksudo gedit /etc/resolv.conf</code></p>
<p>Insert the following line at the top of the nameserver list:</p>
<p><code>nameserver 127.0.0.1</code></p>
<p>Finally we need to restart our little utility to take into account the new settings:</p>
<p><code>sudo /etc/init.d/dnsmasq restart</code></p>
<p>Now it is time to test it!  At the terminal type:</p>
<p><code>dig news.bbc.co.uk</code></p>
<p>&#8230;and take note of the query time.  Then run the same command again and note the improvement.  You should be looking at around 2ms for the 2nd time whereas the first one will be dependant upon your internet connection - for me it was about 50ms - so for me this makes the DNS query portion of browsing about 25 times quicker.  Enjoy.</p>


<p style="padding-left: 12px; font-size: 12px; line-height: 16px; font-family: arial, sans-serif;"><b><u>Related posts</b></u><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/reduce_dns_server_looking_up_time_speed_up_bro' rel='bookmark' title='Permanent Link: Reduce the &#8220;Looking up&#8221; time to speed up your browser'>Reduce the &#8220;Looking up&#8221; time to speed up your browser</a></span><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/ubuntu-ctrl-c-no-longer-works-in-terminal' rel='bookmark' title='Permanent Link: Ubuntu: Ctrl-C no longer works in terminal'>Ubuntu: Ctrl-C no longer works in terminal</a></span><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/using-alien-to-convert-rpm-packages-to-lpia-deb' rel='bookmark' title='Permanent Link: Using Alien to convert .rpm packages to lpia .deb'>Using Alien to convert .rpm packages to lpia .deb</a></span><br/></p>
<p><a href="http://feedads.g.doubleclick.net/~a/ghTf5a_D_bInpaMGjtixQa7GLhA/0/da"><img src="http://feedads.g.doubleclick.net/~a/ghTf5a_D_bInpaMGjtixQa7GLhA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/ghTf5a_D_bInpaMGjtixQa7GLhA/1/da"><img src="http://feedads.g.doubleclick.net/~a/ghTf5a_D_bInpaMGjtixQa7GLhA/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/matt-helps?a=adfV6nC8"><img src="http://feeds.feedburner.com/~f/matt-helps?i=adfV6nC8" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/matt-helps?a=MwcP8qPF"><img src="http://feeds.feedburner.com/~f/matt-helps?d=52" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/matt-helps?a=h4SPtvYm"><img src="http://feeds.feedburner.com/~f/matt-helps?i=h4SPtvYm" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/matt-helps?a=4VSJtkkU"><img src="http://feeds.feedburner.com/~f/matt-helps?d=41" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.matt-helps.com/faster-internet-connection-local-dns-cache/feed</wfw:commentRss>
		</item>
		<item>
		<title>Using Alien to convert .rpm packages to lpia .deb</title>
		<link>http://www.matt-helps.com/using-alien-to-convert-rpm-packages-to-lpia-deb</link>
		<comments>http://www.matt-helps.com/using-alien-to-convert-rpm-packages-to-lpia-deb#comments</comments>
		<pubDate>Wed, 21 Jan 2009 13:16:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[alien]]></category>

		<category><![CDATA[lpia]]></category>

		<category><![CDATA[package]]></category>

		<category><![CDATA[package architecture]]></category>

		<category><![CDATA[rpm to deb]]></category>

		<category><![CDATA[software repository]]></category>

		<guid isPermaLink="false">http://www.matt-helps.com/?p=121</guid>
		<description><![CDATA[Alien is a nice little linux utility that converts .rpm software packages to .deb packages so that you can install software packaged for Red Hat on Debian and Ubuntu, etc.  Clever.  But for those of us on the lpia architecture (like the dell mini 9) we require those .deb files that Alien spits out to [...]]]></description>
			<content:encoded><![CDATA[<p>Alien is a nice little linux utility that converts .rpm software packages to .deb packages so that you can install software packaged for Red Hat on Debian and Ubuntu, etc.  Clever.  But for those of us on the lpia architecture (like the dell mini 9) we require those .deb files that Alien spits out to have their &#8220;architecture&#8221; setting to be lpia, not the i386.  There is no way to change it from the command line so you&#8217;re left with a .deb package that either won&#8217;t install or can be forced to install but then won&#8217;t uninstall.  You could of course unpack, edit the control file and then repack the .deb file, but there is an easier way.</p>
<p>Install alien if you haven&#8217;t already:</p>
<p><code>sudo apt-get install alien</code></p>
<p>Then ask alien to generate the build tree without actually building the package itself:</p>
<p><code>alien -g filename.rpm</code></p>
<p>This creates a build tree that is turned into an lpia .deb package once we&#8217;ve made a change to the control file as before.   Edit debian/control using your favourite text editor and modify the line that specifies the architecture so that it now says:</p>
<p><code>Architecture: lpia</code></p>
<p>And then in the directory that contains the folder &#8220;debian&#8221; run:</p>
<p><code>debian/rules binary</code></p>
<p>That will create a .deb file which you can then install either through the usual GUI methods or by calling:</p>
<p><code>dpkg -i filename.deb</code></p>
<p>And of course because you&#8217;ve installed it using the right architecture you&#8217;re also able to uninstall it should you need to.  Hooray.</p>


<p style="padding-left: 12px; font-size: 12px; line-height: 16px; font-family: arial, sans-serif;"><b><u>Related posts</b></u><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/lpia_x86_debian_packages' rel='bookmark' title='Permanent Link: lpia x86 debian packages'>lpia x86 debian packages</a></span><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/convert-deb-package-architecture-from-i386-to-lpia' rel='bookmark' title='Permanent Link: Convert .deb package from i386 to lpia'>Convert .deb package from i386 to lpia</a></span><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/find-and-replace-multiple-files' rel='bookmark' title='Permanent Link: Recursive Find and Replace in Multiple Files'>Recursive Find and Replace in Multiple Files</a></span><br/></p>
<p><a href="http://feedads.g.doubleclick.net/~a/2ZI-GDAHb_Dy8aGh5_ugsJ7KPOM/0/da"><img src="http://feedads.g.doubleclick.net/~a/2ZI-GDAHb_Dy8aGh5_ugsJ7KPOM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/2ZI-GDAHb_Dy8aGh5_ugsJ7KPOM/1/da"><img src="http://feedads.g.doubleclick.net/~a/2ZI-GDAHb_Dy8aGh5_ugsJ7KPOM/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/matt-helps?a=82a08NFf"><img src="http://feeds.feedburner.com/~f/matt-helps?i=82a08NFf" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/matt-helps?a=7y0KrhsW"><img src="http://feeds.feedburner.com/~f/matt-helps?d=52" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/matt-helps?a=7EWE2UB5"><img src="http://feeds.feedburner.com/~f/matt-helps?i=7EWE2UB5" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/matt-helps?a=sVz5t80j"><img src="http://feeds.feedburner.com/~f/matt-helps?d=41" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.matt-helps.com/using-alien-to-convert-rpm-packages-to-lpia-deb/feed</wfw:commentRss>
		</item>
		<item>
		<title>Three million hit by Windows worm</title>
		<link>http://www.matt-helps.com/three-million-hit-by-windows-worm</link>
		<comments>http://www.matt-helps.com/three-million-hit-by-windows-worm#comments</comments>
		<pubDate>Fri, 16 Jan 2009 20:51:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[News Comment]]></category>

		<category><![CDATA[anti-virus]]></category>

		<category><![CDATA[Conficker]]></category>

		<category><![CDATA[Downadup]]></category>

		<category><![CDATA[Kido]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[services.exe]]></category>

		<category><![CDATA[virus]]></category>

		<category><![CDATA[windows]]></category>

		<category><![CDATA[worm]]></category>

		<guid isPermaLink="false">http://www.matt-helps.com/?p=117</guid>
		<description><![CDATA[A worm that spreads through low security networks, memory sticks, and PCs without the latest security updates is posing a growing threat to users.
The malicious program, known as Conficker, Downadup, or Kido was first discovered in October 2008.
Although Microsoft released a patch, it has gone on to infect 3.5m machines.
via BBC NEWS &#124; Technology &#124; [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>A worm that spreads through low security networks, memory sticks, and PCs without the latest security updates is posing a growing threat to users.</p>
<p>The malicious program, known as Conficker, Downadup, or Kido was first discovered in October 2008.</p>
<p>Although Microsoft released a patch, it has gone on to infect 3.5m machines.</p></blockquote>
<p>via <a href="http://news.bbc.co.uk/1/hi/technology/7832652.stm">BBC NEWS | Technology | Three million hit by Windows worm</a>.</p>
<p>Yet again we see windows requires updates to patch up their software with a million holes in it.  These are the ones we know about too.  According to the article this seems to be a clever bit of code.  First it hijacks services.exe then creates &amp; allows a randomly named .dll to become a service and then sets up a webserver &amp; downloads files to execute from any one of hundreds of sites whose name changes continually according to a preset algorithm.</p>
<p>Quite clever actually.  I guess I find the whole thing quite bemusing.  You buy a nice fast machine and then have to buy a slow operating system with holes in it to run it which you then have to go out and buy antivirus software to do something that the operating system should be doing anyway which makes your computer run like a 3-legged dog.  The only reason to have a windows partition is games &amp; specialist software - most software has linux equivalents and even some games run under wine.</p>
<p>Still, if you&#8217;re going to pay a huge multi-national corporation lots of money to still produce trash after all these years and you still pay and install it then I guess you get what you deserve.</p>


<p style="padding-left: 12px; font-size: 12px; line-height: 16px; font-family: arial, sans-serif;"><b><u>Related posts</b></u><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/usb_cd_customisation_windows' rel='bookmark' title='Permanent Link: USB &#038; CD Custsomisation (Windows)'>USB &#038; CD Custsomisation (Windows)</a></span><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/using-alien-to-convert-rpm-packages-to-lpia-deb' rel='bookmark' title='Permanent Link: Using Alien to convert .rpm packages to lpia .deb'>Using Alien to convert .rpm packages to lpia .deb</a></span><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/how_to_strip_itunes_drm_from_your_music_files' rel='bookmark' title='Permanent Link: How to strip iTunes DRM from your music files'>How to strip iTunes DRM from your music files</a></span><br/></p>
<p><a href="http://feedads.g.doubleclick.net/~a/zuo6att0uZA2iODEPHEE-4Z6gy0/0/da"><img src="http://feedads.g.doubleclick.net/~a/zuo6att0uZA2iODEPHEE-4Z6gy0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/zuo6att0uZA2iODEPHEE-4Z6gy0/1/da"><img src="http://feedads.g.doubleclick.net/~a/zuo6att0uZA2iODEPHEE-4Z6gy0/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/matt-helps?a=ui6gc2Cq"><img src="http://feeds.feedburner.com/~f/matt-helps?i=ui6gc2Cq" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/matt-helps?a=Bm2UUdlm"><img src="http://feeds.feedburner.com/~f/matt-helps?d=52" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/matt-helps?a=RaJnwlak"><img src="http://feeds.feedburner.com/~f/matt-helps?i=RaJnwlak" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/matt-helps?a=NBjQIpoR"><img src="http://feeds.feedburner.com/~f/matt-helps?d=41" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.matt-helps.com/three-million-hit-by-windows-worm/feed</wfw:commentRss>
		</item>
		<item>
		<title>Trash rather than rm</title>
		<link>http://www.matt-helps.com/trash-rather-than-rm</link>
		<comments>http://www.matt-helps.com/trash-rather-than-rm#comments</comments>
		<pubDate>Mon, 12 Jan 2009 16:48:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[commandline send to trash]]></category>

		<category><![CDATA[recover deleted file]]></category>

		<category><![CDATA[rm]]></category>

		<category><![CDATA[undelete linux]]></category>

		<category><![CDATA[undo rm]]></category>

		<guid isPermaLink="false">http://www.matt-helps.com/?p=112</guid>
		<description><![CDATA[One of the most powerful/dangerous commands in linux is the &#8220;rm&#8221; command.  It removes the file from the filesystem and whilst with some media formats it is possible to recover an rm&#8217;d file in ext3 it is almost impossible to get that file back (without a hexdumper and lots of time on your hands to [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most powerful/dangerous commands in linux is the &#8220;rm&#8221; command.  It removes the file from the filesystem and whilst with some media formats it is possible to recover an rm&#8217;d file in ext3 it is almost impossible to get that file back (without a hexdumper and lots of time on your hands to manually re-link the file).</p>
<p>After doing a bit of work the other day but before my nightly backup had run I went into the directory I had been coding in and decided to get rid of the backup files that had been created.  The backup files were like the normal files except they had a tilda attached, ie, filename.txt~, so to delete all the backup files in one go I quickly typed in:</p>
<p><code>rm *~</code></p>
<p>Except that&#8217;s not what I typed.  I missed the tilde off the end and wiped all the files from that directory.  Oops.  Nightly backup not yet run.  Major Oops.  After chuckling that I do make backups a priority and I tell people to make backups a priority I hadn&#8217;t done it myself.  Too late.</p>
<p>I did get the files back because, thankfully,  my data store is an SDHC card formatted to vfat (windows) so only the FAT entry had been deleted - more on that in my next post.</p>
<p>But that left me wondering.  I rarely need all the power of rm - whenever I&#8217;m using it from the commandline I could think of virtually no circumstances where I would prefer to unlink the file altogether rather than just move it to the trash.  As I looked around the net I noticed lots of suggestions from people to replace rm altogether or to create an alias for rm that does something else, but the problem with that is that lots of programs rely on rm being the way it is and taking specific arguments, etc.  To change it just for me would probably break the system or applications that I have installed or could install at any time.</p>
<p>The solution I settled on was to stop using rm from the commandline altogether and learn to use an alias I created called &#8220;trash&#8221; whenever I wanted to delete a file from the commandline.  All you need to do to use it is to open your ~/.bashrc file and put the following line in it somewhere (at the end works just fine):</p>
<p><code>alias trash="mv -t ~/.local/share/Trash/files --backup=t --verbose"</code></p>
<p>Obviously if your trash is in a different location you need to change the location above - what I&#8217;ve written above is correct for Ubuntu.  Now when you &#8220;trash&#8221; a file it will go into your trash bin and is therefore retreivable rather than being deleted forever.</p>
<p>Such a simple script doesn&#8217;t work perfectly of course and if you delete a huge file on a removable local device you&#8217;ll notice that it will move the file to the trash bin on another device and that will take some time.  What I could do with now is to know the name of the trash folder on the device on which the file is located and send it there.</p>


<p style="padding-left: 12px; font-size: 12px; line-height: 16px; font-family: arial, sans-serif;"><b><u>Related posts</b></u><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/find-and-replace-multiple-files' rel='bookmark' title='Permanent Link: Recursive Find and Replace in Multiple Files'>Recursive Find and Replace in Multiple Files</a></span><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/how_to_strip_itunes_drm_from_your_music_files' rel='bookmark' title='Permanent Link: How to strip iTunes DRM from your music files'>How to strip iTunes DRM from your music files</a></span><br/><span style="padding-left: 8px;"><a href='http://www.matt-helps.com/convert-deb-package-architecture-from-i386-to-lpia' rel='bookmark' title='Permanent Link: Convert .deb package from i386 to lpia'>Convert .deb package from i386 to lpia</a></span><br/></p>
<p><a href="http://feedads.g.doubleclick.net/~a/fAeXKHu5Pq5V16A1ilMZJTSWB1M/0/da"><img src="http://feedads.g.doubleclick.net/~a/fAeXKHu5Pq5V16A1ilMZJTSWB1M/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/fAeXKHu5Pq5V16A1ilMZJTSWB1M/1/da"><img src="http://feedads.g.doubleclick.net/~a/fAeXKHu5Pq5V16A1ilMZJTSWB1M/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/matt-helps?a=5weQr3r1"><img src="http://feeds.feedburner.com/~f/matt-helps?i=5weQr3r1" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/matt-helps?a=Oyg56kHE"><img src="http://feeds.feedburner.com/~f/matt-helps?d=52" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/matt-helps?a=rl3BXxCh"><img src="http://feeds.feedburner.com/~f/matt-helps?i=rl3BXxCh" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/matt-helps?a=dZP5hoeS"><img src="http://feeds.feedburner.com/~f/matt-helps?d=41" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.matt-helps.com/trash-rather-than-rm/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
