<?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>Andrew Beaton :: FAQ</title>
	<atom:link href="http://andrewbeaton.net/faq/feed/" rel="self" type="application/rss+xml" />
	<link>http://andrewbeaton.net/faq</link>
	<description>Tips from the world of a software developer</description>
	<lastBuildDate>Wed, 10 Mar 2010 21:03:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Postfix Mail Queue Commands</title>
		<link>http://andrewbeaton.net/faq/2010/03/10/postfix-mail-queue-commands/</link>
		<comments>http://andrewbeaton.net/faq/2010/03/10/postfix-mail-queue-commands/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 21:03:58 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Email]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[flush]]></category>
		<category><![CDATA[mail queue]]></category>

		<guid isPermaLink="false">http://andrewbeaton.net/faq/?p=105</guid>
		<description><![CDATA[To resend the mails in the mail queue, type either of the following two commands]]></description>
			<content:encoded><![CDATA[<p>To resend the mails in the mail queue, type either of the following two commands:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># postfix flush</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># postfix -f</span></pre></div></div>

<p>To see the mail queue, type:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># mailq</span></pre></div></div>

<p>To remove all mail from the mail queue, type:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># postsuper -d ALL</span></pre></div></div>

<p>To remove all mails in the deferred mail queue, type:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># postsuper -d ALL deferred</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://andrewbeaton.net/faq/2010/03/10/postfix-mail-queue-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert VMware Server 2.0.x VMs into VMware Server 1.0.x</title>
		<link>http://andrewbeaton.net/faq/2010/03/04/convert-vmware-server-2-0-x-vms-into-vmware-server-1-0-x/</link>
		<comments>http://andrewbeaton.net/faq/2010/03/04/convert-vmware-server-2-0-x-vms-into-vmware-server-1-0-x/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 18:16:37 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[VMware]]></category>
		<category><![CDATA[2.0 to 1.0]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[virtual machine]]></category>
		<category><![CDATA[vm]]></category>

		<guid isPermaLink="false">http://andrewbeaton.net/faq/?p=101</guid>
		<description><![CDATA[If you have ever created a virtual machine using VMware server 2.0 and tried to use them on the previous VMware server 1.0.x you would find the virtual machine would not run and you would be confronted with an error.]]></description>
			<content:encoded><![CDATA[<p>If you have ever created a virtual machine using VMware server 2.0 and tried to use them on the previous VMware server 1.0.x you would find the virtual machine would not run and you would be confronted with an error.</p>
<p>The following two steps can be used to fix this and let you run the later virtual machine in the old server.</p>
<p>Open the [VirtualMachine]<strong>.vmx</strong> and change <strong>VirtualHw.version</strong> to <strong>&#8220;4&#8243;</strong>.<br />
Open the [VirtualMachine]<strong>.vmdk</strong> and change <strong>ddb.virtualHWVersion</strong> to <strong>&#8220;4&#8243;</strong>.</p>
<p>Now you will be able to start up the virtual machine as if it were created using the 1.0.x version.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbeaton.net/faq/2010/03/04/convert-vmware-server-2-0-x-vms-into-vmware-server-1-0-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Run a cron job every x seconds</title>
		<link>http://andrewbeaton.net/faq/2010/01/26/run-a-cron-job-every-x-seconds/</link>
		<comments>http://andrewbeaton.net/faq/2010/01/26/run-a-cron-job-every-x-seconds/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 19:38:57 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[cron job]]></category>
		<category><![CDATA[schedule]]></category>

		<guid isPermaLink="false">http://andrewbeaton.net/faq/?p=96</guid>
		<description><![CDATA[As most of you know, the smallest time a cron job can be configured to run is every minute.
To run a script every 15 seconds for example, you could use the following:
main cron job:

* * * * * /path/to/wrapper.sh

wrapper.sh:

/path/to/script &#38;
sleep 15
/path/to/script &#38;
sleep 15
/path/to/script &#38;
sleep 15
/path/to/script &#38;

If you can suggest any nicer alternatives to this example, [...]]]></description>
			<content:encoded><![CDATA[<p>As most of you know, the smallest time a cron job can be configured to run is every minute.<br />
To run a script every 15 seconds for example, you could use the following:</p>
<p><strong>main cron job:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>wrapper.sh</pre></div></div>

<p><strong>wrapper.sh:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>script <span style="color: #000000; font-weight: bold;">&amp;</span>
<span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">15</span>
<span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>script <span style="color: #000000; font-weight: bold;">&amp;</span>
<span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">15</span>
<span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>script <span style="color: #000000; font-weight: bold;">&amp;</span>
<span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">15</span>
<span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>script <span style="color: #000000; font-weight: bold;">&amp;</span></pre></div></div>

<p>If you can suggest any nicer alternatives to this example, please let me know. <img src='http://andrewbeaton.net/faq/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbeaton.net/faq/2010/01/26/run-a-cron-job-every-x-seconds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Can&#8217;t create table &#8211; errno: 13</title>
		<link>http://andrewbeaton.net/faq/2009/12/30/cant-create-table-errno-13/</link>
		<comments>http://andrewbeaton.net/faq/2009/12/30/cant-create-table-errno-13/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 16:19:22 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[create temporary table]]></category>
		<category><![CDATA[errno: 13]]></category>

		<guid isPermaLink="false">http://andrewbeaton.net/faq/?p=89</guid>
		<description><![CDATA[I came across a problem today when trying to create a temporary table in MySQL.

ERROR 1005 &#40;HY000&#41;: Can't create table 'temptable' (errno: 13)

The first thing I checked was that the user in question had the Create_tmp_table_priv privilege in the users table, which it did.
The next step was to find out where MySQL was writing the [...]]]></description>
			<content:encoded><![CDATA[<p>I came across a problem today when trying to create a temporary table in MySQL.</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;">ERROR <span style="color: #008080;">1005</span> <span style="color: #FF00FF;">&#40;</span>HY000<span style="color: #FF00FF;">&#41;</span>: Can<span style="color: #008000;">'t create table '</span><span style="color: #990099; font-weight: bold;">temptable</span><span style="color: #008000;">' (errno: 13)</span></pre></div></div>

<p>The first thing I checked was that the user in question had the <strong>Create_tmp_table_priv</strong> privilege in the users table, which it did.</p>
<p>The next step was to find out where MySQL was writing the temporary tables. </p>
<p>The following command tells us this:</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">show</span> variables <span style="color: #CC0099; font-weight: bold;">like</span> <span style="color: #008000;">'<span style="color: #008080; font-weight: bold;">%</span>dir'</span><span style="color: #000033;">;</span>
<span style="color: #CC0099;">+---------------------------+----------------------------+</span>
<span style="color: #CC0099;">|</span> Variable_name             <span style="color: #CC0099;">|</span> <span style="color: #990099; font-weight: bold;">Value</span>                      <span style="color: #CC0099;">|</span>
<span style="color: #CC0099;">+---------------------------+----------------------------+</span>
<span style="color: #CC0099;">|</span> basedir                   <span style="color: #CC0099;">|</span> <span style="color: #CC0099;">/</span>usr<span style="color: #CC0099;">/</span>                      <span style="color: #CC0099;">|</span>
<span style="color: #CC0099;">|</span> bdb_logdir                <span style="color: #CC0099;">|</span>                            <span style="color: #CC0099;">|</span>
<span style="color: #CC0099;">|</span> bdb_tmpdir                <span style="color: #CC0099;">|</span> <span style="color: #CC0099;">/</span>tmp<span style="color: #CC0099;">/</span>                      <span style="color: #CC0099;">|</span>
<span style="color: #CC0099;">|</span> character_sets_dir        <span style="color: #CC0099;">|</span> <span style="color: #CC0099;">/</span>usr<span style="color: #CC0099;">/</span>share<span style="color: #CC0099;">/</span>mysql<span style="color: #CC0099;">/</span>charsets<span style="color: #CC0099;">/</span> <span style="color: #CC0099;">|</span>
<span style="color: #CC0099;">|</span> datadir                   <span style="color: #CC0099;">|</span> <span style="color: #CC0099;">/</span>var<span style="color: #CC0099;">/</span>lib<span style="color: #CC0099;">/</span>mysql<span style="color: #CC0099;">/</span>            <span style="color: #CC0099;">|</span>
<span style="color: #CC0099;">|</span> innodb_data_home_dir      <span style="color: #CC0099;">|</span>                            <span style="color: #CC0099;">|</span>
<span style="color: #CC0099;">|</span> innodb_log_arch_dir       <span style="color: #CC0099;">|</span>                            <span style="color: #CC0099;">|</span>
<span style="color: #CC0099;">|</span> innodb_log_group_home_dir <span style="color: #CC0099;">|</span> .<span style="color: #CC0099;">/</span>                         <span style="color: #CC0099;">|</span>
<span style="color: #CC0099;">|</span> slave_load_tmpdir         <span style="color: #CC0099;">|</span> <span style="color: #CC0099;">/</span>tmp<span style="color: #CC0099;">/</span>                      <span style="color: #CC0099;">|</span>
<span style="color: #CC0099;">|</span> tmpdir                    <span style="color: #CC0099;">|</span> <span style="color: #CC0099;">/</span>tmp<span style="color: #CC0099;">/</span>                      <span style="color: #CC0099;">|</span>
<span style="color: #CC0099;">+---------------------------+----------------------------+</span></pre></div></div>

<p>And from that we see the tmpdir is located in /tmp/.</p>
<p>A quick checked revealed that MySQL could not create files in this directory, no write access, so a simple permissions change and all was well again.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbeaton.net/faq/2009/12/30/cant-create-table-errno-13/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>RPM scriptlet failed</title>
		<link>http://andrewbeaton.net/faq/2009/12/17/rpm-scriptlet-failed/</link>
		<comments>http://andrewbeaton.net/faq/2009/12/17/rpm-scriptlet-failed/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 17:16:48 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[package removal]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[scriptlet failed]]></category>

		<guid isPermaLink="false">http://andrewbeaton.net/faq/?p=83</guid>
		<description><![CDATA[I came across a problem when trying to remove an RPM using `rpm -e` which caused this following error to come up.

# rpm -e PACKAGE 
find: ....... No such file or directory
error: %preun&#40;PACKAGE&#41; scriptlet failed, exit status 1

To fix this, I added `&#8212;noscripts` to the end of the line and it removed without a problem.
]]></description>
			<content:encoded><![CDATA[<p>I came across a problem when trying to remove an RPM using `<strong>rpm -e</strong>` which caused this following error to come up.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># rpm -e PACKAGE </span>
<span style="color: #c20cb9; font-weight: bold;">find</span>: ....... No such <span style="color: #c20cb9; font-weight: bold;">file</span> or directory
error: <span style="color: #000000; font-weight: bold;">%</span>preun<span style="color: #7a0874; font-weight: bold;">&#40;</span>PACKAGE<span style="color: #7a0874; font-weight: bold;">&#41;</span> scriptlet failed, <span style="color: #7a0874; font-weight: bold;">exit</span> status <span style="color: #000000;">1</span></pre></div></div>

<p>To fix this, I added `<strong>&#8212;noscripts</strong>` to the end of the line and it removed without a problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbeaton.net/faq/2009/12/17/rpm-scriptlet-failed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Read MP3 ID3 Tags in Perl</title>
		<link>http://andrewbeaton.net/faq/2009/12/03/read-mp3-id3-tags-in-perl/</link>
		<comments>http://andrewbeaton.net/faq/2009/12/03/read-mp3-id3-tags-in-perl/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 20:59:12 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[id3]]></category>
		<category><![CDATA[id3 tags]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[tags]]></category>

		<guid isPermaLink="false">http://andrewbeaton.net/faq/?p=76</guid>
		<description><![CDATA[The package I use for simple tag reading is MP3::Tag, available on CPAN with more information here.
The following example shows how easy it is to retrieve tags from an MP3 file.

use MP3::Tag;
&#160;
my $file = MP3::Tag-&#62;new&#40;$filename&#41;;
&#160;
my &#40;$title, $track, $artist, $album, $comment, $year, $genre&#41; = $file-&#62;autoinfo&#40;&#41;;
&#160;
print &#34;Title: [$title]\n&#34;;
print &#34;Artist: [$artist]\n&#34;;
print &#34;Album: [$album]\n&#34;;
print &#34;Track: [$track]\n&#34;;
print &#34;Year: [$year]\n&#34;;
print &#34;Genre: [...]]]></description>
			<content:encoded><![CDATA[<p>The package I use for simple tag reading is MP3::Tag, available on CPAN with more information <a href="http://search.cpan.org/~ilyaz/MP3-Tag-1.12/lib/MP3/Tag.pm">here</a>.</p>
<p>The following example shows how easy it is to retrieve tags from an MP3 file.</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">use</span> MP3<span style="color: #339933;">::</span><span style="color: #006600;">Tag</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$file</span> <span style="color: #339933;">=</span> MP3<span style="color: #339933;">::</span><span style="color: #006600;">Tag</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">new</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$filename</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$title</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$track</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$artist</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$album</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$comment</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$year</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$genre</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$file</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">autoinfo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Title: [$title]<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Artist: [$artist]<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Album: [$album]<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Track: [$track]<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Year: [$year]<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Genre: [$genre]<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Comment: [$comment]<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://andrewbeaton.net/faq/2009/12/03/read-mp3-id3-tags-in-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SCP files with spaces in them</title>
		<link>http://andrewbeaton.net/faq/2009/11/27/scp-files-with-spaces-in-them/</link>
		<comments>http://andrewbeaton.net/faq/2009/11/27/scp-files-with-spaces-in-them/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 20:17:15 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[files with spaces]]></category>
		<category><![CDATA[SCP]]></category>
		<category><![CDATA[secure copy]]></category>
		<category><![CDATA[spaces in filename]]></category>

		<guid isPermaLink="false">http://andrewbeaton.net/faq/?p=72</guid>
		<description><![CDATA[Right, I&#8217;m sure we&#8217;ve all come across this probem before. You try use SCP to copy a file but it has spaces in the filename or directory name. Well obviously one solution is not to use spaces in filenames or directory names! But some of you lot do, so, try the following:

scp user@host:&#34;'filename with spaces'&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>Right, I&#8217;m sure we&#8217;ve all come across this probem before. You try use SCP to copy a file but it has spaces in the filename or directory name. Well obviously one solution is not to use spaces in filenames or directory names! But some of you lot do, so, try the following:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">scp</span> user<span style="color: #000000; font-weight: bold;">@</span>host:<span style="color: #ff0000;">&quot;'filename with spaces'&quot;</span> destination</pre></div></div>

<p>Yes, that&#8217;s with more quotes!</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #ff0000;">&quot; + ' + filename with spaces + ' + &quot;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://andrewbeaton.net/faq/2009/11/27/scp-files-with-spaces-in-them/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recursively remove all .svn directories</title>
		<link>http://andrewbeaton.net/faq/2009/11/27/recursively-remove-all-svn-directories/</link>
		<comments>http://andrewbeaton.net/faq/2009/11/27/recursively-remove-all-svn-directories/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 20:13:42 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[.svn]]></category>
		<category><![CDATA[recursively delete]]></category>
		<category><![CDATA[recursively remove]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://andrewbeaton.net/faq/?p=69</guid>
		<description><![CDATA[Sometimes you need to clear out all of the .svn files and directories. 
The following command will recursively remove each one of them for you:

rm -rf `find . -name .svn`

]]></description>
			<content:encoded><![CDATA[<p>Sometimes you need to clear out all of the .svn files and directories. </p>
<p>The following command will recursively remove each one of them for you:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-name</span> .svn<span style="color: #000000; font-weight: bold;">`</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://andrewbeaton.net/faq/2009/11/27/recursively-remove-all-svn-directories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backup a MySQL database</title>
		<link>http://andrewbeaton.net/faq/2009/11/27/backup-mysql-database/</link>
		<comments>http://andrewbeaton.net/faq/2009/11/27/backup-mysql-database/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 20:10:24 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[mysqldump]]></category>

		<guid isPermaLink="false">http://andrewbeaton.net/faq/?p=65</guid>
		<description><![CDATA[I&#8217;ll just quickly cover some options here to backup a MySQL database. 
The first will output all the data and all the databases along with the schema:

mysqldump -u &#60;user&#62; -p -h &#60;hostname&#62; --all-databases &#62; all_databases.sql

The next option will output just the schema for all of the databases:

mysqldump -d -u &#60;user&#62; -p -h &#60;hostname&#62; --all-databases &#62; [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll just quickly cover some options here to backup a MySQL database. </p>
<p>The first will output all the data and all the databases along with the schema:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysqldump <span style="color: #660033;">-u</span> <span style="color: #000000; font-weight: bold;">&lt;</span>user<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #660033;">-p</span> <span style="color: #660033;">-h</span> <span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #c20cb9; font-weight: bold;">hostname</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #660033;">--all-databases</span> <span style="color: #000000; font-weight: bold;">&gt;</span> all_databases.sql</pre></div></div>

<p>The next option will output just the schema for all of the databases:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysqldump <span style="color: #660033;">-d</span> <span style="color: #660033;">-u</span> <span style="color: #000000; font-weight: bold;">&lt;</span>user<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #660033;">-p</span> <span style="color: #660033;">-h</span> <span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #c20cb9; font-weight: bold;">hostname</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #660033;">--all-databases</span> <span style="color: #000000; font-weight: bold;">&gt;</span> all_databases.sql</pre></div></div>

<p>Now we can use the same two methods above but replace &#8211;all-databases with the name of a database to output just one.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbeaton.net/faq/2009/11/27/backup-mysql-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Redirect root mail to an external e-mail address</title>
		<link>http://andrewbeaton.net/faq/2009/11/27/redirect-root-mail-to-an-external-e-mail-address/</link>
		<comments>http://andrewbeaton.net/faq/2009/11/27/redirect-root-mail-to-an-external-e-mail-address/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 20:04:57 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[forward address]]></category>
		<category><![CDATA[redirect]]></category>

		<guid isPermaLink="false">http://andrewbeaton.net/faq/?p=62</guid>
		<description><![CDATA[Add this line to the bottom of /etc/aliases:

root: your_email@domain.com

Run this command:

newaliases

Restart your mail server and run the following command to test:

echo Test &#124; mail -s &#34;Test Message&#34; root

]]></description>
			<content:encoded><![CDATA[<p>Add this line to the bottom of /etc/aliases:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root: your_email<span style="color: #000000; font-weight: bold;">@</span>domain.com</pre></div></div>

<p>Run this command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">newaliases</pre></div></div>

<p>Restart your mail server and run the following command to test:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> Test <span style="color: #000000; font-weight: bold;">|</span> mail <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;Test Message&quot;</span> root</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://andrewbeaton.net/faq/2009/11/27/redirect-root-mail-to-an-external-e-mail-address/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
