<?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>The Tech Tutorial &#187; Short</title>
	<atom:link href="http://www.the-tech-tutorial.com/?feed=rss2&#038;cat=171" rel="self" type="application/rss+xml" />
	<link>http://www.the-tech-tutorial.com</link>
	<description>Just a blog of free technology tutorials</description>
	<lastBuildDate>Tue, 04 Dec 2012 15:43:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>How to mass/bulk delete all unapproved comments from wordpress</title>
		<link>http://www.the-tech-tutorial.com/?p=1761</link>
		<comments>http://www.the-tech-tutorial.com/?p=1761#comments</comments>
		<pubDate>Thu, 03 Nov 2011 11:18:21 +0000</pubDate>
		<dc:creator>Tyler Allen</dc:creator>
				<category><![CDATA[Fix It]]></category>
		<category><![CDATA[Main]]></category>
		<category><![CDATA[Short]]></category>
		<category><![CDATA[bulk delete]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[delete all]]></category>
		<category><![CDATA[delete all comments]]></category>
		<category><![CDATA[mass delete]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[unaproved]]></category>
		<category><![CDATA[unaproved comments]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.the-tech-tutorial.com/?p=1761</guid>
		<description><![CDATA[Do you have the problem of hundreds of comments building up on your WordPress site, we&#8217;ll the best solution is to check it regularly and delete the unwanted comments, just leaving the appropriate ones. However what happens if you go on holiday for a week and don’t check your blog, or if your forget to [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.the-tech-tutorial.com/wp-content/uploads/2011/11/slef_destruct.jpg"><img src="http://www.the-tech-tutorial.com/wp-content/uploads/2011/11/slef_destruct.jpg" alt="" title="slef_destruct" width="186" height="122" class="alignleft size-full wp-image-1791" /></a>Do you have the problem of <span>hundreds</span> of <span>comments building up</span> on your <span><span>WordPress</span> site</span>, we&#8217;ll the best solution is to check it regularly and <span>delete</span> the unwanted comments, just leaving the appropriate ones. However what happens if you go on holiday for a week and don’t check your blog, or if your forget to look at your comments for a few day (i.e. lost weekend down the pub) well you&#8217;ll probably find <span>several <span>hundred <span>comments</span></span></span> have built up in this time. Now you can <span>delete</span> these <span>comments manually</span> but this is time consuming. To make your life easier I’m going to go through some simple ways of <span><span><span>deleting</span> <span>all</span></span> <span>unapproved <span><span>comments</span></span></span></span> while <strong><span>not</strong> using phpMyAdmin</span> (as every other tutorial I’ve seen does use phpMyAdmin).<span id="more-1761"></span></p>
<div style="width:350px; height:330px;background-image: url(http://www.the-tech-tutorial.com/wp-content/uploads/2011/03/add_back1.png); display: block; float: right; padding: 20px 25px 0px 30px;">
<script type="text/javascript"><!--
google_ad_client = "pub-2094089617852812";
/* 2011 In Text Box */
google_ad_slot = "1777411765";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
<p>Just a quick warning before we start this method is pretty brutal, <strong>it is not a spam filter</strong> and these methods will <span><span>delete <strong>all</span></strong> your comments</span> weaver they are spam or not, so I only recommend using it when you have let your comments get out of hand and really don’t have time to go through manually, otherwise you might as well just disable <span>comments</span> in your <span>WordPress</span> settings.</p>
<p>I said at the beginning this tutorial is for those who <span>don’t have phpMyAdmin</span>, well as I’m nice I’ve included a quick video for the phpMyAdmin method at the bottom of the page. However <span>if you don’t have phpMyAdmin</span> installed there are a few other way you can <span><span>delete all</span> your <span>unapproved comments</span></span>. The easiest way is to have shell access to your box, if you don’t know just skip to the next step. All you need to do is access the box and run one <span>MySQL statement</span>, this can be done as follows:</p>
<pre>mysql -u [USERNAME] -p -e "DELETE FROM wordpress.wp_comments WHERE comment_approved=0;" wordpress</pre>
<p>And thats it <span><span>all your unappoved comments</span> will be <span>delted</span></span> saving your many hours of manualy <span>deleting comments</span>.</p>
<p><strong>NEXT STEP</strong>: If you don’t have access to your shell and you <span>don’t have phpMyAdmin</span> installed there is another way to do this, you create a simple PHP page that <span><span>delete</span>s all comments</span> and access it form your <span>web browser</span>. This should only really be used as a last resort as it will create a page <strong>that anyone can access</strong> that once opened will <span>delete all your unread comments</span>. This is fine to-do so long as your delete/restrict the page after you&#8217;ve finished. So let’s get started first open Notepad or some other html editor and create a page with the following code while adding your own username, password, and database name:<br />
<center><br />
<script type="text/javascript"><!--
google_ad_client = "ca-pub-2094089617852812";
/* 2011 Bottom */
google_ad_slot = "5825267234";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center></p>
<pre class="brush:php">&lt;?php

//Warning this page will delete all your WordPress comments once opened and can accessed by anyone so you should delete or restrict once used!

//Please replace the following with your details

$usrName="[REPLACE WITH YOUR USERNAME]";
$usrPass="[REPLACE WITH YOUR PASSWORD]";
$usrDB="[REPLACE WITH YOUR DATABASE NAME]";

$con = mysql_connect("localhost",$usrName,$usrPass);
if (!$con)
{
	die('Could not connect: Please check your usrName &amp; usrPass settings');
}

mysql_select_db($usrDB, $con);

$result = mysql_query("DELETE FROM wp_comments WHERE comment_approved=0;");
if (!$result)
{
	die('Could not delete: Please check your usrDB setting');
}
else
{
	echo 'All unapproved comments now deleted';
}

?&gt;</pre>
<p>Now you&#8217;ll need to save this page to something like wp-coment-remove.php then upload it to your site via your normal file transfer method (either ftp or via a http file uploader) once you have done this all you&#8217;ll need to do is access the page, so for this site I would go to the page http://www.the-tech-tutorial.com/wp-coment-remove.php , just substitute the-tech-tutorial for your sites address. Now that you have run this page, <span>all your unapproved comments will be gone</span>, hooray. Just remember that this page is a security risk because anyone can access it so either restrict is access once you’re done or delete the page.</p>
<p>As I promised here is the YouTube video showing <span>how to</span> do this <span>with phpMyAdmin</span>:<br />
<center><iframe width="420" height="315" src="http://www.youtube.com/embed/QCA4loQi7yM" frameborder="0" allowfullscreen></iframe></center></p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="standard" count="" href="http://www.the-tech-tutorial.com/?p=1761"></g:plusone></div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+mass%2Fbulk+delete+all+unapproved+comments+from+wordpress&amp;link=http://www.the-tech-tutorial.com/?p=1761&amp;notes=Do%20you%20have%20the%20problem%20of%20hundreds%20of%20comments%20building%20up%20on%20your%20Wordpress%20site%2C%20we%27ll%20the%20best%20solution%20is%20to%20check%20it%20regularly%20and%20delete%20the%20unwanted%20comments%2C%20just%20leaving%20the%20appropriate%20ones.%20However%20what%20happens%20if%20you%20go%20on%20holiday%20for%20a%20week%20and%20don%E2%80%99t%20check%20your%20blog%2C%20or%20if%20your%20forge&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+mass%2Fbulk+delete+all+unapproved+comments+from+wordpress&amp;link=http://www.the-tech-tutorial.com/?p=1761&amp;notes=Do%20you%20have%20the%20problem%20of%20hundreds%20of%20comments%20building%20up%20on%20your%20Wordpress%20site%2C%20we%27ll%20the%20best%20solution%20is%20to%20check%20it%20regularly%20and%20delete%20the%20unwanted%20comments%2C%20just%20leaving%20the%20appropriate%20ones.%20However%20what%20happens%20if%20you%20go%20on%20holiday%20for%20a%20week%20and%20don%E2%80%99t%20check%20your%20blog%2C%20or%20if%20your%20forge&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+mass%2Fbulk+delete+all+unapproved+comments+from+wordpress&amp;link=http://www.the-tech-tutorial.com/?p=1761&amp;notes=Do%20you%20have%20the%20problem%20of%20hundreds%20of%20comments%20building%20up%20on%20your%20Wordpress%20site%2C%20we%27ll%20the%20best%20solution%20is%20to%20check%20it%20regularly%20and%20delete%20the%20unwanted%20comments%2C%20just%20leaving%20the%20appropriate%20ones.%20However%20what%20happens%20if%20you%20go%20on%20holiday%20for%20a%20week%20and%20don%E2%80%99t%20check%20your%20blog%2C%20or%20if%20your%20forge&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+mass%2Fbulk+delete+all+unapproved+comments+from+wordpress&amp;link=http://www.the-tech-tutorial.com/?p=1761&amp;notes=Do%20you%20have%20the%20problem%20of%20hundreds%20of%20comments%20building%20up%20on%20your%20Wordpress%20site%2C%20we%27ll%20the%20best%20solution%20is%20to%20check%20it%20regularly%20and%20delete%20the%20unwanted%20comments%2C%20just%20leaving%20the%20appropriate%20ones.%20However%20what%20happens%20if%20you%20go%20on%20holiday%20for%20a%20week%20and%20don%E2%80%99t%20check%20your%20blog%2C%20or%20if%20your%20forge&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+mass%2Fbulk+delete+all+unapproved+comments+from+wordpress&amp;link=http://www.the-tech-tutorial.com/?p=1761&amp;notes=Do%20you%20have%20the%20problem%20of%20hundreds%20of%20comments%20building%20up%20on%20your%20Wordpress%20site%2C%20we%27ll%20the%20best%20solution%20is%20to%20check%20it%20regularly%20and%20delete%20the%20unwanted%20comments%2C%20just%20leaving%20the%20appropriate%20ones.%20However%20what%20happens%20if%20you%20go%20on%20holiday%20for%20a%20week%20and%20don%E2%80%99t%20check%20your%20blog%2C%20or%20if%20your%20forge&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+mass%2Fbulk+delete+all+unapproved+comments+from+wordpress&amp;link=http://www.the-tech-tutorial.com/?p=1761&amp;notes=Do%20you%20have%20the%20problem%20of%20hundreds%20of%20comments%20building%20up%20on%20your%20Wordpress%20site%2C%20we%27ll%20the%20best%20solution%20is%20to%20check%20it%20regularly%20and%20delete%20the%20unwanted%20comments%2C%20just%20leaving%20the%20appropriate%20ones.%20However%20what%20happens%20if%20you%20go%20on%20holiday%20for%20a%20week%20and%20don%E2%80%99t%20check%20your%20blog%2C%20or%20if%20your%20forge&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+mass%2Fbulk+delete+all+unapproved+comments+from+wordpress&amp;link=http://www.the-tech-tutorial.com/?p=1761&amp;notes=Do%20you%20have%20the%20problem%20of%20hundreds%20of%20comments%20building%20up%20on%20your%20Wordpress%20site%2C%20we%27ll%20the%20best%20solution%20is%20to%20check%20it%20regularly%20and%20delete%20the%20unwanted%20comments%2C%20just%20leaving%20the%20appropriate%20ones.%20However%20what%20happens%20if%20you%20go%20on%20holiday%20for%20a%20week%20and%20don%E2%80%99t%20check%20your%20blog%2C%20or%20if%20your%20forge&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="https://shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.the-tech-tutorial.com/?feed=rss2&#038;p=1761</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable potentially unsafe attachments in outlook</title>
		<link>http://www.the-tech-tutorial.com/?p=1739</link>
		<comments>http://www.the-tech-tutorial.com/?p=1739#comments</comments>
		<pubDate>Wed, 31 Aug 2011 09:51:10 +0000</pubDate>
		<dc:creator>Tyler Allen</dc:creator>
				<category><![CDATA[Fix It]]></category>
		<category><![CDATA[Short]]></category>

		<guid isPermaLink="false">http://www.the-tech-tutorial.com/?p=1739</guid>
		<description><![CDATA[Ahh the &#8220;Outlook blocked access to the following potentially unsafe attachments&#8221; message, one of the most annoying things you can see when you in a hurry to get an attachment. However there is a good reason that attachments are disabled in outlook, some attachments can potentially be unsafe, as the warning says. But so long [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.the-tech-tutorial.com/wp-content/uploads/2011/08/outlook_exe_top.jpg"><img class="aligncenter size-full wp-image-1743" title="outlook_exe_top" src="http://www.the-tech-tutorial.com/wp-content/uploads/2011/08/outlook_exe_top.jpg" alt="" width="407" height="36" /></a>Ahh the &#8220;<span><span><span>Outlook</span> <span>blocked access</span></span> to the following <span>potentially unsafe <span>attachments</span></span></span>&#8221; message, one of the most annoying things you can see when you in a hurry to get an <span>attachment</span>. However there is a good reason that <span><span>attachments</span> are disabled</span> in <span>outlook</span>, some <span><span>attachment</span>s</span> can <span><span>potentially</span> be <span>unsafe</span></span>, as the <span>warning</span> says. But so long as you know were an <span>attachment</span> is from and you know the risks why <span><span>can&#8217;t <span>you enable</span><span> these</span>, after all you did pay for your computer and Office so you should be able to do what you want, right? Well in outlooks default setting there is no way to <span>enable unsafe attachments</span>, however there is a setting in the registry to <span><span>enable</span> them</span>:<span id="more-1739"></span></p>
<p>Just before I begin I want to remind you that there is a <strong>GOOD RESON</strong> why <span>outlook</span> blocks certain types of files and that for <span>security</span>. However when there is a file I <span>need to <span>open</span></span> and I know it <strong>IS SAFE</strong> I go through these steps to <span>enable</span> it then <span>disable</span> the after I’ve <span>download the file</span>. So let’s start:<br />
<strong><br />
Windows 95 &#8211; XP:</strong></p>
<pre>Start &gt; Run &gt; Type <em>regedi</em>t &gt; Click Ok

Navigate through the tree on the left panel to:

+HKEY_CURRENT_USER
++Software
+++Microsoft
++++Office
+++++14.0(or your version of office (14.0 for Office 2010))
++++++Outlook
+++++++Security

Once found Right Click on the Right Hand panel and select
New&gt;String Value &gt; Name it <em>Level1Remove</em>

Now double click on the new string, add <em>exe</em> in the Value Data field to enable .exe files.

Once this is complete restart outlook to save the changes.</pre>
<p><center><br />
<script type="text/javascript">// <![CDATA[
 google_ad_client = "ca-pub-2094089617852812"; /* 2011 Bottom */ google_ad_slot = "5825267234"; google_ad_width = 468; google_ad_height = 60;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></center><br />
<strong>Windows Vistsa &#8211; 7</strong></p>
<pre>Start &gt; Type <em>regedit</em> in the search bar &gt; click Registry Editor in the programs window

Navigate through the tree on the left panel to:

+HKEY_CURRENT_USER
++Software
+++Microsoft
++++Office
+++++Outlook
++++++Security

Once found Right Click on the Right Hand panel and select
New&gt;String Value &gt; Name it <em>Level1Remove</em>

Now double click on the new string, add <em>exe</em> in the Value Data field to enable .exe files.

Once this is complete restart outlook to save the changes.</pre>
<div style="width: 350px; height: 330px; background-image: url('http://www.the-tech-tutorial.com/wp-content/uploads/2011/03/add_back1.png'); display: block; float: right; padding: 20px 25px 0px 30px;"><script type="text/javascript">// <![CDATA[
 google_ad_client = "pub-2094089617852812"; /* 2011 In Text Box */ google_ad_slot = "1777411765"; google_ad_width = 336; google_ad_height = 280;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></div>
<p>You can add multiple allowed types by editing this new Registry Entry like so:<br />
exe;mdb;vbs</p>
<p>Please remember you should only allow dangerous file types <strong>temporarily</strong>. Once you have the file you need you disable the file type by removing the value of the new Registry Value.</p>
<p>Please feel free to add any comments or questions, thanks.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="standard" count="" href="http://www.the-tech-tutorial.com/?p=1739"></g:plusone></div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=Enable+potentially+unsafe+attachments+in+outlook&amp;link=http://www.the-tech-tutorial.com/?p=1739&amp;notes=Ahh%20the%20%22Outlook%20blocked%20access%20to%20the%20following%20potentially%20unsafe%20attachments%22%20message%2C%20one%20of%20the%20most%20annoying%20things%20you%20can%20see%20when%20you%20in%20a%20hurry%20to%20get%20an%20attachment.%20However%20there%20is%20a%20good%20reason%20that%20attachments%20are%20disabled%20in%20outlook%2C%20some%20attachments%20can%20potentially%20be%20unsafe%2C%20as%20the%20&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=Enable+potentially+unsafe+attachments+in+outlook&amp;link=http://www.the-tech-tutorial.com/?p=1739&amp;notes=Ahh%20the%20%22Outlook%20blocked%20access%20to%20the%20following%20potentially%20unsafe%20attachments%22%20message%2C%20one%20of%20the%20most%20annoying%20things%20you%20can%20see%20when%20you%20in%20a%20hurry%20to%20get%20an%20attachment.%20However%20there%20is%20a%20good%20reason%20that%20attachments%20are%20disabled%20in%20outlook%2C%20some%20attachments%20can%20potentially%20be%20unsafe%2C%20as%20the%20&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=Enable+potentially+unsafe+attachments+in+outlook&amp;link=http://www.the-tech-tutorial.com/?p=1739&amp;notes=Ahh%20the%20%22Outlook%20blocked%20access%20to%20the%20following%20potentially%20unsafe%20attachments%22%20message%2C%20one%20of%20the%20most%20annoying%20things%20you%20can%20see%20when%20you%20in%20a%20hurry%20to%20get%20an%20attachment.%20However%20there%20is%20a%20good%20reason%20that%20attachments%20are%20disabled%20in%20outlook%2C%20some%20attachments%20can%20potentially%20be%20unsafe%2C%20as%20the%20&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=Enable+potentially+unsafe+attachments+in+outlook&amp;link=http://www.the-tech-tutorial.com/?p=1739&amp;notes=Ahh%20the%20%22Outlook%20blocked%20access%20to%20the%20following%20potentially%20unsafe%20attachments%22%20message%2C%20one%20of%20the%20most%20annoying%20things%20you%20can%20see%20when%20you%20in%20a%20hurry%20to%20get%20an%20attachment.%20However%20there%20is%20a%20good%20reason%20that%20attachments%20are%20disabled%20in%20outlook%2C%20some%20attachments%20can%20potentially%20be%20unsafe%2C%20as%20the%20&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=Enable+potentially+unsafe+attachments+in+outlook&amp;link=http://www.the-tech-tutorial.com/?p=1739&amp;notes=Ahh%20the%20%22Outlook%20blocked%20access%20to%20the%20following%20potentially%20unsafe%20attachments%22%20message%2C%20one%20of%20the%20most%20annoying%20things%20you%20can%20see%20when%20you%20in%20a%20hurry%20to%20get%20an%20attachment.%20However%20there%20is%20a%20good%20reason%20that%20attachments%20are%20disabled%20in%20outlook%2C%20some%20attachments%20can%20potentially%20be%20unsafe%2C%20as%20the%20&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Enable+potentially+unsafe+attachments+in+outlook&amp;link=http://www.the-tech-tutorial.com/?p=1739&amp;notes=Ahh%20the%20%22Outlook%20blocked%20access%20to%20the%20following%20potentially%20unsafe%20attachments%22%20message%2C%20one%20of%20the%20most%20annoying%20things%20you%20can%20see%20when%20you%20in%20a%20hurry%20to%20get%20an%20attachment.%20However%20there%20is%20a%20good%20reason%20that%20attachments%20are%20disabled%20in%20outlook%2C%20some%20attachments%20can%20potentially%20be%20unsafe%2C%20as%20the%20&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=Enable+potentially+unsafe+attachments+in+outlook&amp;link=http://www.the-tech-tutorial.com/?p=1739&amp;notes=Ahh%20the%20%22Outlook%20blocked%20access%20to%20the%20following%20potentially%20unsafe%20attachments%22%20message%2C%20one%20of%20the%20most%20annoying%20things%20you%20can%20see%20when%20you%20in%20a%20hurry%20to%20get%20an%20attachment.%20However%20there%20is%20a%20good%20reason%20that%20attachments%20are%20disabled%20in%20outlook%2C%20some%20attachments%20can%20potentially%20be%20unsafe%2C%20as%20the%20&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="https://shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.the-tech-tutorial.com/?feed=rss2&#038;p=1739</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C++ Simple Stream Socket Client Class</title>
		<link>http://www.the-tech-tutorial.com/?p=1555</link>
		<comments>http://www.the-tech-tutorial.com/?p=1555#comments</comments>
		<pubDate>Thu, 21 Jul 2011 21:16:14 +0000</pubDate>
		<dc:creator>Tyler Allen</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Short]]></category>
		<category><![CDATA[c plus plus]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[Internet sockets]]></category>
		<category><![CDATA[parent]]></category>
		<category><![CDATA[Simple]]></category>
		<category><![CDATA[socket]]></category>
		<category><![CDATA[sockets programming]]></category>
		<category><![CDATA[sock_stream]]></category>

		<guid isPermaLink="false">http://www.the-tech-tutorial.com/?p=1555</guid>
		<description><![CDATA[So I&#8217;ve been working on this project that heavily uses Sockets in C++, for the base of this project I&#8217;ve created a TCP Socket class so I concentrate on the protocol I&#8217;m using rather than worrying about the socket itself and I thought I would share this class with your. so here it is: Download [...]]]></description>
				<content:encoded><![CDATA[<p>So I&#8217;ve been working on this project that heavily uses <span><span>Sockets</span> in <span>C++</span></span>, for the base of this project I&#8217;ve created a <span><span>TCP <span>Socket</span></span> class</span> so I concentrate on the protocol I&#8217;m using rather than worrying about the <span>socket</span> itself and I thought I would share this class with your.<span id="more-1555"></span><br />
so here it is:<br />
<center><br />
<script type="text/javascript">// <![CDATA[
 google_ad_client = "ca-pub-2094089617852812"; /* 2011 Bottom */ google_ad_slot = "5825267234"; google_ad_width = 468; google_ad_height = 60;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[
// ]]&gt;</script></center><br />
<a href="http://www.the-tech-tutorial.com/wp-content/cpp/tcpCase.tar">Download Class</a><br />
<strong>Header</strong></p>
<pre class="brush:cpp">//tcpCase.h
#include &lt;iostream&gt;
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;unistd.h&gt;
#include &lt;errno.h&gt;
#include &lt;string.h&gt;
#include &lt;sys/types.h&gt;
#include &lt;sys/socket.h&gt;
#include &lt;netinet/in.h&gt;
#include &lt;netdb.h&gt;
#include &lt;arpa/inet.h&gt;
#include &lt;sys/wait.h&gt;
#include &lt;signal.h&gt;
#include &lt;time.h&gt;

#ifndef TCPCASE_H_
#define TCPCASE_H_

class tcpCase
{
public:
	tcpCase(char * _port, char * _addr);
	virtual ~tcpCase();

	void startConnection();
	bool charSearch(char *toSearch, char *searchFor);

private:
	addrinfo hints, *servinfo;
	char *addr;
	char *port;
	int s; //the socket descriptor

	bool sendData(char *msg);

	void manageRecv(int numbytes, char * buf);
};

#endif /* TCPCASE_H_ */</pre>
<p><strong>Class</strong></p>
<p>&nbsp;</p>
<pre class="brush:cpp">//tcpCase.cpp
#include "tcpCase.h"

using namespace std;

#define MAXDATASIZE 100

tcpCase::tcpCase(char * _port, char * _addr)
{
	port = _port;
	addr = _addr;

	//Ensure that servinfo is clear
	memset(&amp;hints, 0, sizeof hints); // make sure the struct is empty

	//setup hints
	hints.ai_family = AF_UNSPEC; // don't care IPv4 or IPv6
	hints.ai_socktype = SOCK_STREAM; // TCP stream sockets

	//Setup the structs if error print why
	int res;
	if ((res = getaddrinfo(addr,port,&amp;hints,&amp;servinfo)) != 0)
	{
		fprintf(stderr,"getaddrinfo: %s\n", gai_strerror(res));
	}

	//setup the socket
	if ((s = socket(servinfo-&gt;ai_family,servinfo-&gt;ai_socktype,servinfo-&gt;ai_protocol)) == -1)
	{
		perror("client: socket");
	}

}

tcpCase::~tcpCase()
{
	// TODO Auto-generated destructor stub
}

void tcpCase::startConnection()
{//This goes into the send/rcv loop
	//Connect
	if (connect(s,servinfo-&gt;ai_addr, servinfo-&gt;ai_addrlen) == -1)
	{
		close (s);
		perror("Client Connect");
	}

	//We dont need this anymore
	freeaddrinfo(servinfo);

	int numbytes;
	char buf[MAXDATASIZE];
	while (1)
	{
		//Recv &amp; print Data
		numbytes = recv(s,buf,MAXDATASIZE-1,0);
		buf[numbytes]='\0';
		cout &lt;&lt; buf;

		//What do I do with the recived data
		manageRecv(numbytes,buf);

		//break if connection closed
		if (numbytes==0)
		{
			cout &lt;&lt; "----------------------CONNECTION CLOSED---------------------------"&lt;&lt; endl;

			break;
		}
	}

}

bool tcpCase::charSearch(char *toSearch, char *searchFor)
{
	int len = strlen(toSearch);
	int forLen = strlen(searchFor); // The length of the searchfor field

	//Search through each char in toSearch
	for (int i = 0; i &lt; len;i++)
	{
		//If the active char is equil to the first search item then search toSearch
		if (searchFor[0] == toSearch[i])
		{
			bool found = true;
			//search the char array for search field
			for (int x = 1; x &lt; forLen; x++)
			{
				if (toSearch[i+x]!=searchFor[x])
				{
					found = false;
				}
			}

			//if found return true;
			if (found == true)
				return true;
		}
	}

	return 0;
}

bool tcpCase::sendData(char *msg)
{//Send some data
	//Send some data
	int len = strlen(msg);
	int bytes_sent = send(s,msg,len,0);

	if (bytes_sent == 0)
		return false;
	else
		return true;
}

void tcpCase::manageRecv(int numbytes, char * buf)
{
	/*
	*	TODO: Add your code here!
	*	int numbytes: this is the number of bytes in the recived msg
	*	char * buf: this is the message recieved
	*/
}</pre>
<p><center><br />
<script type="text/javascript">// <![CDATA[
 google_ad_client = "ca-pub-2094089617852812"; /* 2011 Bottom */ google_ad_slot = "5825267234"; google_ad_width = 468; google_ad_height = 60;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[
// ]]&gt;</script></center><br />
<a href="http://www.the-tech-tutorial.com/wp-content/cpp/tcpCase.tar">Download Class</a><br />
To use this class edit the manageRecv() to fit to the protocol you wish to use, this function is called every time a new message is received. You get the variables:</p>
<ul>
<li>int numbytes : the number of bytes in the recived message</li>
<li>char * buf : the message recived</li>
</ul>
<p>from this you should be able to program your protocol.</p>
<p>Calling this class is also pretty simple, all you need to do is give the parameters:</p>
<ul>
<li>port: the port you want to connect to</li>
<li>addr: the server you want to connect to</li>
</ul>
<p>then call the startConnection() function to get the client to connect, here is a quick example:</p>
<pre>  tcpCase test = tcpCase("6667","irc.ubuntu.com");
  test.startConnection();</pre>
<p>If you want more information on c++ socket programming I recommend you read <a href="http://beej.us/guide/bgnet/">Beej&#8217;s Guide to Network Programming</a>. As socket programming is a complicated thing i recommend you read the whole of this great guide, rather then just skipping to the the examples (learn from my mistake there)</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="standard" count="" href="http://www.the-tech-tutorial.com/?p=1555"></g:plusone></div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=C%2B%2B+Simple+Stream+Socket+Client+Class&amp;link=http://www.the-tech-tutorial.com/?p=1555&amp;notes=So%20I%27ve%20been%20working%20on%20this%20project%20that%20heavily%20uses%20Sockets%20in%20C%2B%2B%2C%20for%20the%20base%20of%20this%20project%20I%27ve%20created%20a%20TCP%20Socket%20class%20so%20I%20concentrate%20on%20the%20protocol%20I%27m%20using%20rather%20than%20worrying%20about%20the%20socket%20itself%20and%20I%20thought%20I%20would%20share%20this%20class%20with%20your.%0D%0Aso%20here%20it%20is%3A%0D%0A%0D%0A%2F%2F%20%0D%0A%2F%2F%20%0D%0AD&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=C%2B%2B+Simple+Stream+Socket+Client+Class&amp;link=http://www.the-tech-tutorial.com/?p=1555&amp;notes=So%20I%27ve%20been%20working%20on%20this%20project%20that%20heavily%20uses%20Sockets%20in%20C%2B%2B%2C%20for%20the%20base%20of%20this%20project%20I%27ve%20created%20a%20TCP%20Socket%20class%20so%20I%20concentrate%20on%20the%20protocol%20I%27m%20using%20rather%20than%20worrying%20about%20the%20socket%20itself%20and%20I%20thought%20I%20would%20share%20this%20class%20with%20your.%0D%0Aso%20here%20it%20is%3A%0D%0A%0D%0A%2F%2F%20%0D%0A%2F%2F%20%0D%0AD&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=C%2B%2B+Simple+Stream+Socket+Client+Class&amp;link=http://www.the-tech-tutorial.com/?p=1555&amp;notes=So%20I%27ve%20been%20working%20on%20this%20project%20that%20heavily%20uses%20Sockets%20in%20C%2B%2B%2C%20for%20the%20base%20of%20this%20project%20I%27ve%20created%20a%20TCP%20Socket%20class%20so%20I%20concentrate%20on%20the%20protocol%20I%27m%20using%20rather%20than%20worrying%20about%20the%20socket%20itself%20and%20I%20thought%20I%20would%20share%20this%20class%20with%20your.%0D%0Aso%20here%20it%20is%3A%0D%0A%0D%0A%2F%2F%20%0D%0A%2F%2F%20%0D%0AD&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=C%2B%2B+Simple+Stream+Socket+Client+Class&amp;link=http://www.the-tech-tutorial.com/?p=1555&amp;notes=So%20I%27ve%20been%20working%20on%20this%20project%20that%20heavily%20uses%20Sockets%20in%20C%2B%2B%2C%20for%20the%20base%20of%20this%20project%20I%27ve%20created%20a%20TCP%20Socket%20class%20so%20I%20concentrate%20on%20the%20protocol%20I%27m%20using%20rather%20than%20worrying%20about%20the%20socket%20itself%20and%20I%20thought%20I%20would%20share%20this%20class%20with%20your.%0D%0Aso%20here%20it%20is%3A%0D%0A%0D%0A%2F%2F%20%0D%0A%2F%2F%20%0D%0AD&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=C%2B%2B+Simple+Stream+Socket+Client+Class&amp;link=http://www.the-tech-tutorial.com/?p=1555&amp;notes=So%20I%27ve%20been%20working%20on%20this%20project%20that%20heavily%20uses%20Sockets%20in%20C%2B%2B%2C%20for%20the%20base%20of%20this%20project%20I%27ve%20created%20a%20TCP%20Socket%20class%20so%20I%20concentrate%20on%20the%20protocol%20I%27m%20using%20rather%20than%20worrying%20about%20the%20socket%20itself%20and%20I%20thought%20I%20would%20share%20this%20class%20with%20your.%0D%0Aso%20here%20it%20is%3A%0D%0A%0D%0A%2F%2F%20%0D%0A%2F%2F%20%0D%0AD&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=C%2B%2B+Simple+Stream+Socket+Client+Class&amp;link=http://www.the-tech-tutorial.com/?p=1555&amp;notes=So%20I%27ve%20been%20working%20on%20this%20project%20that%20heavily%20uses%20Sockets%20in%20C%2B%2B%2C%20for%20the%20base%20of%20this%20project%20I%27ve%20created%20a%20TCP%20Socket%20class%20so%20I%20concentrate%20on%20the%20protocol%20I%27m%20using%20rather%20than%20worrying%20about%20the%20socket%20itself%20and%20I%20thought%20I%20would%20share%20this%20class%20with%20your.%0D%0Aso%20here%20it%20is%3A%0D%0A%0D%0A%2F%2F%20%0D%0A%2F%2F%20%0D%0AD&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=C%2B%2B+Simple+Stream+Socket+Client+Class&amp;link=http://www.the-tech-tutorial.com/?p=1555&amp;notes=So%20I%27ve%20been%20working%20on%20this%20project%20that%20heavily%20uses%20Sockets%20in%20C%2B%2B%2C%20for%20the%20base%20of%20this%20project%20I%27ve%20created%20a%20TCP%20Socket%20class%20so%20I%20concentrate%20on%20the%20protocol%20I%27m%20using%20rather%20than%20worrying%20about%20the%20socket%20itself%20and%20I%20thought%20I%20would%20share%20this%20class%20with%20your.%0D%0Aso%20here%20it%20is%3A%0D%0A%0D%0A%2F%2F%20%0D%0A%2F%2F%20%0D%0AD&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="https://shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.the-tech-tutorial.com/?feed=rss2&#038;p=1555</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CPU Limit Ubuntu Server 11.04 Command Line</title>
		<link>http://www.the-tech-tutorial.com/?p=1488</link>
		<comments>http://www.the-tech-tutorial.com/?p=1488#comments</comments>
		<pubDate>Mon, 11 Jul 2011 14:33:33 +0000</pubDate>
		<dc:creator>Tyler Allen</dc:creator>
				<category><![CDATA[Short]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[11.04]]></category>
		<category><![CDATA[cpu]]></category>
		<category><![CDATA[limit]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.the-tech-tutorial.com/?p=1488</guid>
		<description><![CDATA[I’ve was encrypting some files the other day with GPG and found that while the encryption was taking place my computer ground to a halt because GPG was taking up all of my CPU. Normally I wouldn’t mind this as I would just setup a few jobs and go make a cup of tea. Then [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.the-tech-tutorial.com/wp-content/uploads/2011/07/CPU-Limit.jpg"><img class="alignleft size-full wp-image-1492" title="CPU-Limit" src="http://www.the-tech-tutorial.com/wp-content/uploads/2011/07/CPU-Limit.jpg" alt="" width="100" height="100" /></a>I’ve was encrypting some files the other day with GPG and found that while the encryption was taking place my computer ground to a halt because GPG was taking up all of my <span>CPU</span>. Normally I wouldn’t mind this as I would just setup a few jobs and go make a cup of tea. Then I though what would happen if I run my encryption jobs on a <span>webserver</span>, well it grinds to a halt. So how do we run encryption jobs on our servers without affecting users,<span id="more-1488"></span>well first off we could just by a <span>multi core processor</span> and put it in your, server that&#8217;s the fastest way of fixing the problems. However if you’re like me, <span> lazy</span>, then you can use a tool called <span><span>CPU</span> limit</span>, to <span>limit</span> the amount of a single <span>CPU</span> a <span>process</span> can run, to get started just type:</p>
<p><center><br />
<script type="text/javascript">// <![CDATA[
 google_ad_client = "ca-pub-2094089617852812"; /* 2011 Bottom */ google_ad_slot = "5825267234"; google_ad_width = 468; google_ad_height = 60;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></center></p>
<pre>Sudo apt-get install cpulimit</pre>
<p>Once <span>cpulimit</span> is installed all you need to do is run the program you want to <span>limit</span> then type the following substituting [program] to the program you want to run, <em>i.e gpg</em>:</p>
<pre>sudo cpulimit -e "[program]" -l 30</pre>
<p><center><br />
<script type="text/javascript">// <![CDATA[
 google_ad_client = "ca-pub-2094089617852812"; /* 2011 Bottom */ google_ad_slot = "5825267234"; google_ad_width = 468; google_ad_height = 60;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></center><br />
And that’s about it, cpulimit will throttle your chosen program to 30% CPU usage.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="standard" count="" href="http://www.the-tech-tutorial.com/?p=1488"></g:plusone></div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=CPU+Limit+Ubuntu+Server+11.04+Command+Line&amp;link=http://www.the-tech-tutorial.com/?p=1488&amp;notes=I%E2%80%99ve%20was%20encrypting%20some%20files%20the%20other%20day%20with%20GPG%20and%20found%20that%20while%20the%20encryption%20was%20taking%20place%20my%20computer%20ground%20to%20a%20halt%20because%20GPG%20was%20taking%20up%20all%20of%20my%20CPU.%20Normally%20I%20wouldn%E2%80%99t%20mind%20this%20as%20I%20would%20just%20setup%20a%20few%20jobs%20and%20go%20make%20a%20cup%20of%20tea.%20Then%20I%20though%20what%20would%20happe&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=CPU+Limit+Ubuntu+Server+11.04+Command+Line&amp;link=http://www.the-tech-tutorial.com/?p=1488&amp;notes=I%E2%80%99ve%20was%20encrypting%20some%20files%20the%20other%20day%20with%20GPG%20and%20found%20that%20while%20the%20encryption%20was%20taking%20place%20my%20computer%20ground%20to%20a%20halt%20because%20GPG%20was%20taking%20up%20all%20of%20my%20CPU.%20Normally%20I%20wouldn%E2%80%99t%20mind%20this%20as%20I%20would%20just%20setup%20a%20few%20jobs%20and%20go%20make%20a%20cup%20of%20tea.%20Then%20I%20though%20what%20would%20happe&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=CPU+Limit+Ubuntu+Server+11.04+Command+Line&amp;link=http://www.the-tech-tutorial.com/?p=1488&amp;notes=I%E2%80%99ve%20was%20encrypting%20some%20files%20the%20other%20day%20with%20GPG%20and%20found%20that%20while%20the%20encryption%20was%20taking%20place%20my%20computer%20ground%20to%20a%20halt%20because%20GPG%20was%20taking%20up%20all%20of%20my%20CPU.%20Normally%20I%20wouldn%E2%80%99t%20mind%20this%20as%20I%20would%20just%20setup%20a%20few%20jobs%20and%20go%20make%20a%20cup%20of%20tea.%20Then%20I%20though%20what%20would%20happe&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=CPU+Limit+Ubuntu+Server+11.04+Command+Line&amp;link=http://www.the-tech-tutorial.com/?p=1488&amp;notes=I%E2%80%99ve%20was%20encrypting%20some%20files%20the%20other%20day%20with%20GPG%20and%20found%20that%20while%20the%20encryption%20was%20taking%20place%20my%20computer%20ground%20to%20a%20halt%20because%20GPG%20was%20taking%20up%20all%20of%20my%20CPU.%20Normally%20I%20wouldn%E2%80%99t%20mind%20this%20as%20I%20would%20just%20setup%20a%20few%20jobs%20and%20go%20make%20a%20cup%20of%20tea.%20Then%20I%20though%20what%20would%20happe&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=CPU+Limit+Ubuntu+Server+11.04+Command+Line&amp;link=http://www.the-tech-tutorial.com/?p=1488&amp;notes=I%E2%80%99ve%20was%20encrypting%20some%20files%20the%20other%20day%20with%20GPG%20and%20found%20that%20while%20the%20encryption%20was%20taking%20place%20my%20computer%20ground%20to%20a%20halt%20because%20GPG%20was%20taking%20up%20all%20of%20my%20CPU.%20Normally%20I%20wouldn%E2%80%99t%20mind%20this%20as%20I%20would%20just%20setup%20a%20few%20jobs%20and%20go%20make%20a%20cup%20of%20tea.%20Then%20I%20though%20what%20would%20happe&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=CPU+Limit+Ubuntu+Server+11.04+Command+Line&amp;link=http://www.the-tech-tutorial.com/?p=1488&amp;notes=I%E2%80%99ve%20was%20encrypting%20some%20files%20the%20other%20day%20with%20GPG%20and%20found%20that%20while%20the%20encryption%20was%20taking%20place%20my%20computer%20ground%20to%20a%20halt%20because%20GPG%20was%20taking%20up%20all%20of%20my%20CPU.%20Normally%20I%20wouldn%E2%80%99t%20mind%20this%20as%20I%20would%20just%20setup%20a%20few%20jobs%20and%20go%20make%20a%20cup%20of%20tea.%20Then%20I%20though%20what%20would%20happe&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=CPU+Limit+Ubuntu+Server+11.04+Command+Line&amp;link=http://www.the-tech-tutorial.com/?p=1488&amp;notes=I%E2%80%99ve%20was%20encrypting%20some%20files%20the%20other%20day%20with%20GPG%20and%20found%20that%20while%20the%20encryption%20was%20taking%20place%20my%20computer%20ground%20to%20a%20halt%20because%20GPG%20was%20taking%20up%20all%20of%20my%20CPU.%20Normally%20I%20wouldn%E2%80%99t%20mind%20this%20as%20I%20would%20just%20setup%20a%20few%20jobs%20and%20go%20make%20a%20cup%20of%20tea.%20Then%20I%20though%20what%20would%20happe&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="https://shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.the-tech-tutorial.com/?feed=rss2&#038;p=1488</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu grub wont find Windows 7</title>
		<link>http://www.the-tech-tutorial.com/?p=1393</link>
		<comments>http://www.the-tech-tutorial.com/?p=1393#comments</comments>
		<pubDate>Tue, 17 May 2011 09:28:49 +0000</pubDate>
		<dc:creator>Tyler Allen</dc:creator>
				<category><![CDATA[Fix It]]></category>
		<category><![CDATA[Short]]></category>
		<category><![CDATA[11.04]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Dual Boot]]></category>
		<category><![CDATA[Grub]]></category>
		<category><![CDATA[grup-update]]></category>
		<category><![CDATA[home]]></category>
		<category><![CDATA[os-prober]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.the-tech-tutorial.com/?p=1393</guid>
		<description><![CDATA[So I recently upgraded my Ubuntu instillation to 11.04 and I will admit that at first I didn’t like it, however I’m always upset when people don’t like something just because it changes so I stuck with it for a few hours and I have to say i have grown fond of the unity interface. [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.the-tech-tutorial.com/wp-content/uploads/2011/05/ubuntu_11.04_collage.jpg"><img class="alignleft size-full wp-image-1394" title="ubuntu_11.04_collage" src="http://www.the-tech-tutorial.com/wp-content/uploads/2011/05/ubuntu_11.04_collage.jpg" alt="Ubuntu 11.04" width="300" height="100" /></a>So I recently <span>upgraded</span> my <span><span>Ubuntu</span> <span>instillation</span></span> to <span>11.04</span> and I will admit that at first I didn’t like it, however I’m always upset when people don’t like something just because it changes so I stuck with it for a few hours and I have to say i have grown fond of the unity interface. However after a while I wanted to boot into <span><span>windows</span> 7</span> and play some games, the problem was that <span><span>grub</span> hadn’t</span> <span>found</span> the <span><span>windows</span> <span>partition</span></span>. So I had a browse around the internet and found several solutions to <span>fix</span> this <span>problem</span>. <span id="more-1393"></span></p>
<div style="width:350px; height:330px;background-image: url(http://www.the-tech-tutorial.com/wp-content/uploads/2011/03/add_back1.png); display: block; float: right; padding: 20px 25px 0px 30px;">
<script type="text/javascript"><!--
google_ad_client = "pub-2094089617852812";
/* 2011 In Text Box */
google_ad_slot = "1777411765";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
<p>When I first <span>installed</span> <span>11.04</span> my <span><span>installer</span> crashed</span> (due to a faulty cd) so I decided to <span>boot</span> into <span>windows</span> to finish the work I needed to get done, sadly the installer had crashed before installing <span>grub</span> so I couldn’t boot into <span>windows</span>. To fix this I quickly loaded a live CD and <span>installed</span> <span>grub</span> on my <span>windows</span> <span>partition</span>, this worked fine for the time being. After I finished my work I burned another cd (at a slower speed) and <span>re-installed</span> <span><span>Ubuntu</span> <span>11.04</span></span> successfully. Now when I rebooted <span>grub</span> <span>didn’t see</span> the <span><span>windows</span> partitions</span>. So first it tried:</p>
<pre>sudo <span>update-grub</span></pre>
<p>this still <span>Couldn’t <span>find</span> the <span>windows partition</span></span>, so I then tried</p>
<pre>sudo os-prober</pre>
<p>this also <span>would not <span>find windows</span></span>. I had a look at my <span>windows partition</span> and realised that the <span><span>grub</span> files</span> were still installed, I deleted these (<span>c:\boot</span> (lowercase only)) and re-run <span>update-grub<.span> witch finaly <span>found windows</span>.</p>
<p>Now if you dont want to read my story here are the most common ways of <span>getting <span><span>grub</span> to <span>find your <span><span>windows</span> partition</span></span></span></span>:</p>
<pre>sudo <span>update-grub</span></pre>
<pre>sudo <span>os-prober</span></pre>
<pre>Remove any <span>grub</span> files from your <span><span>windows</span> drive</span></pre>
<p><center><br />
<script type="text/javascript"><!--
google_ad_client = "ca-pub-2094089617852812";
/* 2011 Bottom */
google_ad_slot = "5825267234";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center></p>
<pre># disable the <span>raid</span> setup
dmraid -an
dmraid -si

# remove the <span>metadata</span>
dmraid -E -r</pre>
<pre>Install <span><span>StartUP</span> – Manager</span> 
Open it and go to <span>display</span> and set the  <span>Resolution</span> as <span>640 X 480</span> and colour depth as 8 bits</pre>
<p>I hope this helped <span>fix</span> your problems, if not please feel free to leave a comment and I’ll try to answer your questions.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="standard" count="" href="http://www.the-tech-tutorial.com/?p=1393"></g:plusone></div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=Ubuntu+grub+wont+find+Windows+7&amp;link=http://www.the-tech-tutorial.com/?p=1393&amp;notes=So%20I%20recently%20upgraded%20my%20Ubuntu%20instillation%20to%2011.04%20and%20I%20will%20admit%20that%20at%20first%20I%20didn%E2%80%99t%20like%20it%2C%20however%20I%E2%80%99m%20always%20upset%20when%20people%20don%E2%80%99t%20like%20something%20just%20because%20it%20changes%20so%20I%20stuck%20with%20it%20for%20a%20few%20hours%20and%20I%20have%20to%20say%20i%20have%20grown%20fond%20of%20the%20unity%20interface.%20However%20after&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=Ubuntu+grub+wont+find+Windows+7&amp;link=http://www.the-tech-tutorial.com/?p=1393&amp;notes=So%20I%20recently%20upgraded%20my%20Ubuntu%20instillation%20to%2011.04%20and%20I%20will%20admit%20that%20at%20first%20I%20didn%E2%80%99t%20like%20it%2C%20however%20I%E2%80%99m%20always%20upset%20when%20people%20don%E2%80%99t%20like%20something%20just%20because%20it%20changes%20so%20I%20stuck%20with%20it%20for%20a%20few%20hours%20and%20I%20have%20to%20say%20i%20have%20grown%20fond%20of%20the%20unity%20interface.%20However%20after&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=Ubuntu+grub+wont+find+Windows+7&amp;link=http://www.the-tech-tutorial.com/?p=1393&amp;notes=So%20I%20recently%20upgraded%20my%20Ubuntu%20instillation%20to%2011.04%20and%20I%20will%20admit%20that%20at%20first%20I%20didn%E2%80%99t%20like%20it%2C%20however%20I%E2%80%99m%20always%20upset%20when%20people%20don%E2%80%99t%20like%20something%20just%20because%20it%20changes%20so%20I%20stuck%20with%20it%20for%20a%20few%20hours%20and%20I%20have%20to%20say%20i%20have%20grown%20fond%20of%20the%20unity%20interface.%20However%20after&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=Ubuntu+grub+wont+find+Windows+7&amp;link=http://www.the-tech-tutorial.com/?p=1393&amp;notes=So%20I%20recently%20upgraded%20my%20Ubuntu%20instillation%20to%2011.04%20and%20I%20will%20admit%20that%20at%20first%20I%20didn%E2%80%99t%20like%20it%2C%20however%20I%E2%80%99m%20always%20upset%20when%20people%20don%E2%80%99t%20like%20something%20just%20because%20it%20changes%20so%20I%20stuck%20with%20it%20for%20a%20few%20hours%20and%20I%20have%20to%20say%20i%20have%20grown%20fond%20of%20the%20unity%20interface.%20However%20after&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=Ubuntu+grub+wont+find+Windows+7&amp;link=http://www.the-tech-tutorial.com/?p=1393&amp;notes=So%20I%20recently%20upgraded%20my%20Ubuntu%20instillation%20to%2011.04%20and%20I%20will%20admit%20that%20at%20first%20I%20didn%E2%80%99t%20like%20it%2C%20however%20I%E2%80%99m%20always%20upset%20when%20people%20don%E2%80%99t%20like%20something%20just%20because%20it%20changes%20so%20I%20stuck%20with%20it%20for%20a%20few%20hours%20and%20I%20have%20to%20say%20i%20have%20grown%20fond%20of%20the%20unity%20interface.%20However%20after&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Ubuntu+grub+wont+find+Windows+7&amp;link=http://www.the-tech-tutorial.com/?p=1393&amp;notes=So%20I%20recently%20upgraded%20my%20Ubuntu%20instillation%20to%2011.04%20and%20I%20will%20admit%20that%20at%20first%20I%20didn%E2%80%99t%20like%20it%2C%20however%20I%E2%80%99m%20always%20upset%20when%20people%20don%E2%80%99t%20like%20something%20just%20because%20it%20changes%20so%20I%20stuck%20with%20it%20for%20a%20few%20hours%20and%20I%20have%20to%20say%20i%20have%20grown%20fond%20of%20the%20unity%20interface.%20However%20after&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=Ubuntu+grub+wont+find+Windows+7&amp;link=http://www.the-tech-tutorial.com/?p=1393&amp;notes=So%20I%20recently%20upgraded%20my%20Ubuntu%20instillation%20to%2011.04%20and%20I%20will%20admit%20that%20at%20first%20I%20didn%E2%80%99t%20like%20it%2C%20however%20I%E2%80%99m%20always%20upset%20when%20people%20don%E2%80%99t%20like%20something%20just%20because%20it%20changes%20so%20I%20stuck%20with%20it%20for%20a%20few%20hours%20and%20I%20have%20to%20say%20i%20have%20grown%20fond%20of%20the%20unity%20interface.%20However%20after&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="https://shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.the-tech-tutorial.com/?feed=rss2&#038;p=1393</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple MySQL CSV import from Console</title>
		<link>http://www.the-tech-tutorial.com/?p=1376</link>
		<comments>http://www.the-tech-tutorial.com/?p=1376#comments</comments>
		<pubDate>Wed, 06 Apr 2011 14:40:35 +0000</pubDate>
		<dc:creator>Tyler Allen</dc:creator>
				<category><![CDATA[Short]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Easy]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Import]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Simple]]></category>
		<category><![CDATA[SQL Command]]></category>

		<guid isPermaLink="false">http://www.the-tech-tutorial.com/?p=1376</guid>
		<description><![CDATA[Everyone has the need to import and export data from a CSV into their MySQL database at some point or another. A quick search of Google reviles there are many different ways of doing this, and in my expectance some are far better than others. In this tutorial I’m going to show you my favourite [...]]]></description>
				<content:encoded><![CDATA[<p>Everyone has the need to <span>import</span> and <span>export</span> data from a <span>CSV</span> into their <span><span>MySQL</span> <span>database</span></span> at some point or another. A quick search of Google reviles there are many different ways of doing this, and in my expectance some are far better than others. In this tutorial I’m going to show you my favourite way to <span>import</span> <span>CSV</span> <span><span>data</span> into <span>MySQL</span></span></span> using the &#8220;<span>LOAD LOCAL DATA FILE</span>&#8221; <span>command</span>.<span id="more-1376"></span></p>
<div style="width:350px; height:330px;background-image: url(http://www.the-tech-tutorial.com/wp-content/uploads/2011/03/add_back1.png); display: block; float: right; padding: 20px 25px 0px 30px;">
<script type="text/javascript"><!--
google_ad_client = "pub-2094089617852812";
/* 2011 In Text Box */
google_ad_slot = "1777411765";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
<p>To do this first you must understand what a <span><span>CSV</span> file</span> is, it stands for <span>Comma Separated File</span>, as the name suggests it consists of <span><span>data</span> separated</span> by a comma. When you create a new <span><span>CSV</span> file</span> you enter each <span>Column</span> followed by a <span>comma</span>, then you’re ready to move to the next row you enter a line terminator (usually \n). This simple way of formatting data is vary us full because nearly all <span>database</span> and <span>spreadsheet</span> programs are compatible with it. This enables you to layout the data you want in <span>excel</span> then <span>export</span> it to a <span>CSV</span> then <span>import</span> this <span>CSV</span> into your <span><span>MySQL</span> database</span>.</p>
<p>To do this all you need to do is issue a <span><span>SQL</span> command</span> in the same way you would any <span><span>SQL</span> command</span>, either by <span>PHP</span>, the <span>MySQL</span> console or using some tool such as <span><span>MySQL</span> <span>Workbench</span></span>. The command you should execute is:</p>
<pre>LOAD DATA LOCAL INFILE '[<em>File Name</em>]'
INTO  [<em>Table</em>]
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
([<em>field</em>], [<em>field</em>], [<em>field</em>]);
</pre>
<p>Now you may need to change this command depending on your database, the filds you&#8217;ll need to change are:</p>
<ul>
<li><strong>[File Name]</strong> Substitute [File Name] for location of your CSV file</li>
<li><strong>INTO TABLE [Table]:</strong> Substitute [Table] for the table name your are trying to populate</li>
<li><strong>([field], [field], [field]);</strong> Here substitute the field names you want to populate, remember that the order of these fields represent the order of columns in your CSV file.</li>
<li><strong> TERMINATED BY &#038; ENCLOSED BY </strong> This is the general convention used by excel when you export as CSV, however if you know different you may need to change these</li>
</ul>
<p><center><br />
<script type="text/javascript"><!--
google_ad_client = "ca-pub-2094089617852812";
/* 2011 Bottom */
google_ad_slot = "5825267234";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center><br />
And that’s it; once you execute this command the data stored in the CSV file will be imported into the database. There are a few things to watch out for,</p>
<ul>
<li><strong>Don’t Include Column Names In The CSV, </strong>This will always end as tears as I bet you don’t want the field names stored in your database, and they are often the wrong data type.</li>
<li><strong>Be Careful of Empty Rows,</strong> Its very easy to insert blank rows, either before your data or after your data when working in excel, its worth checking your CSV in notepad to ensure there are no empty rows, they will look like a line of comer’s and will nearly always cause the import to error.</li>
</ul>
<p>Please leave any Comments or feedback, Thanks.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="standard" count="" href="http://www.the-tech-tutorial.com/?p=1376"></g:plusone></div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=Simple+MySQL+CSV+import+from+Console&amp;link=http://www.the-tech-tutorial.com/?p=1376&amp;notes=Everyone%20has%20the%20need%20to%20import%20and%20export%20data%20from%20a%20CSV%20into%20their%20MySQL%20database%20at%20some%20point%20or%20another.%20A%20quick%20search%20of%20Google%20reviles%20there%20are%20many%20different%20ways%20of%20doing%20this%2C%20and%20in%20my%20expectance%20some%20are%20far%20better%20than%20others.%20In%20this%20tutorial%20I%E2%80%99m%20going%20to%20show%20you%20my%20favourite%20way&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=Simple+MySQL+CSV+import+from+Console&amp;link=http://www.the-tech-tutorial.com/?p=1376&amp;notes=Everyone%20has%20the%20need%20to%20import%20and%20export%20data%20from%20a%20CSV%20into%20their%20MySQL%20database%20at%20some%20point%20or%20another.%20A%20quick%20search%20of%20Google%20reviles%20there%20are%20many%20different%20ways%20of%20doing%20this%2C%20and%20in%20my%20expectance%20some%20are%20far%20better%20than%20others.%20In%20this%20tutorial%20I%E2%80%99m%20going%20to%20show%20you%20my%20favourite%20way&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=Simple+MySQL+CSV+import+from+Console&amp;link=http://www.the-tech-tutorial.com/?p=1376&amp;notes=Everyone%20has%20the%20need%20to%20import%20and%20export%20data%20from%20a%20CSV%20into%20their%20MySQL%20database%20at%20some%20point%20or%20another.%20A%20quick%20search%20of%20Google%20reviles%20there%20are%20many%20different%20ways%20of%20doing%20this%2C%20and%20in%20my%20expectance%20some%20are%20far%20better%20than%20others.%20In%20this%20tutorial%20I%E2%80%99m%20going%20to%20show%20you%20my%20favourite%20way&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=Simple+MySQL+CSV+import+from+Console&amp;link=http://www.the-tech-tutorial.com/?p=1376&amp;notes=Everyone%20has%20the%20need%20to%20import%20and%20export%20data%20from%20a%20CSV%20into%20their%20MySQL%20database%20at%20some%20point%20or%20another.%20A%20quick%20search%20of%20Google%20reviles%20there%20are%20many%20different%20ways%20of%20doing%20this%2C%20and%20in%20my%20expectance%20some%20are%20far%20better%20than%20others.%20In%20this%20tutorial%20I%E2%80%99m%20going%20to%20show%20you%20my%20favourite%20way&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=Simple+MySQL+CSV+import+from+Console&amp;link=http://www.the-tech-tutorial.com/?p=1376&amp;notes=Everyone%20has%20the%20need%20to%20import%20and%20export%20data%20from%20a%20CSV%20into%20their%20MySQL%20database%20at%20some%20point%20or%20another.%20A%20quick%20search%20of%20Google%20reviles%20there%20are%20many%20different%20ways%20of%20doing%20this%2C%20and%20in%20my%20expectance%20some%20are%20far%20better%20than%20others.%20In%20this%20tutorial%20I%E2%80%99m%20going%20to%20show%20you%20my%20favourite%20way&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Simple+MySQL+CSV+import+from+Console&amp;link=http://www.the-tech-tutorial.com/?p=1376&amp;notes=Everyone%20has%20the%20need%20to%20import%20and%20export%20data%20from%20a%20CSV%20into%20their%20MySQL%20database%20at%20some%20point%20or%20another.%20A%20quick%20search%20of%20Google%20reviles%20there%20are%20many%20different%20ways%20of%20doing%20this%2C%20and%20in%20my%20expectance%20some%20are%20far%20better%20than%20others.%20In%20this%20tutorial%20I%E2%80%99m%20going%20to%20show%20you%20my%20favourite%20way&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=Simple+MySQL+CSV+import+from+Console&amp;link=http://www.the-tech-tutorial.com/?p=1376&amp;notes=Everyone%20has%20the%20need%20to%20import%20and%20export%20data%20from%20a%20CSV%20into%20their%20MySQL%20database%20at%20some%20point%20or%20another.%20A%20quick%20search%20of%20Google%20reviles%20there%20are%20many%20different%20ways%20of%20doing%20this%2C%20and%20in%20my%20expectance%20some%20are%20far%20better%20than%20others.%20In%20this%20tutorial%20I%E2%80%99m%20going%20to%20show%20you%20my%20favourite%20way&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="https://shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.the-tech-tutorial.com/?feed=rss2&#038;p=1376</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install or upgrade Nagios to version 3.2.2</title>
		<link>http://www.the-tech-tutorial.com/?p=1364</link>
		<comments>http://www.the-tech-tutorial.com/?p=1364#comments</comments>
		<pubDate>Sat, 26 Mar 2011 14:14:16 +0000</pubDate>
		<dc:creator>Tyler Allen</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Short]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[3.2.2]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[Upgrade]]></category>

		<guid isPermaLink="false">http://www.the-tech-tutorial.com/?p=1364</guid>
		<description><![CDATA[Nagios Core have been updated to 3.2.2 The update/installation process is not different as the one described in the main article To update type into your terminal: cd /usr/local/src sudo wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.2.tar.gz sudo tar xvzf nagios-3.2.2.tar.gz cd nagios-3.2.2 sudo ./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-command-group=nagcmd --enable-nanosleep --enable-event-broker sudo make all sudo make install sudo make install-init [...]]]></description>
				<content:encoded><![CDATA[<p>Nagios Core have been updated to 3.2.2<br />
The update/installation process is not different as the one described in the <a href="http://www.the-tech-tutorial.com/?p=373">main article</a><span id="more-1364"></span><br />
<center><br />
<script type="text/javascript"><!--
google_ad_client = "ca-pub-2094089617852812";
/* 2011 Bottom */
google_ad_slot = "5825267234";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center><br />
To update type into your terminal:</p>
<pre>
cd /usr/local/src
sudo wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.2.tar.gz
sudo tar xvzf nagios-3.2.2.tar.gz
cd nagios-3.2.2
sudo ./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-command-group=nagcmd --enable-nanosleep --enable-event-broker
sudo make all
sudo make install
sudo make install-init
sudo make install-commandmode
sudo make install-config
sudo update-rc.d -f nagios defaults
cd ..
</pre>
<p><center><br />
<script type="text/javascript"><!--
google_ad_client = "ca-pub-2094089617852812";
/* 2011 Bottom */
google_ad_slot = "5825267234";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center><br />
Here are the changes:</p>
<p>ENHANCEMENTS</p>
<p>* Patch to new_mini_epn to allow any command line length without breaking on extra trailing or leading whitespace (Ray Bengen)<br />
* Patch to mini_epn to allow any command line length (Thomas Guyot-Sionnest)<br />
* Patch to speed up loading of state retention data (Matthieu Kermagoret)<br />
* Custom notifications are now suppressed during scheduled downtime (Sven Nierlein)<br />
* Added code to warn user about exit code of 126 meaning plugin is not executable (bug #153)<br />
* Scheduled downtime can now start on SOFT error states (bug #47)<br />
* Main window frame URL can now be specify with a “corewindow=” parameter<br />
* Improved config CGI shows commands, command args in an easier to use manner (Jochen Bern)<br />
* Added ability for NEB modules to override execution of event handlers (Sven Nierlein)<br />
* Custom macros are no longer cleaned/stripped as they are user-defined and should be trusted (Peter Morch)</p>
<p>FIXES</p>
<p>* Fix for choosing next valid time on day of DST change when clocks go one hour backwards<br />
* Fix for nagios now erroring when “Error: Could not find any contactgroup matching…” displayed<br />
* Fix tap tests for Solaris 10 and newer versions of Test::Harness<br />
* Fix for notifications not being sent out when scheduled downtime is cancelled (Daniel Pouzzner)<br />
* Fix for first notification delay being calculated incorrectly, and notifications potentially going out early (Pawel Malachowski)<br />
* Fix for text of scheduling downtime of all services on a host (Holger Weiss)<br />
* Fix for services inheriting notification period from hosts if not defined (Gordon Messmer)<br />
* Fix for incorrect service states on host failures (bug #130 Petya Kohts)<br />
* Fix for incorrect service state attributes being set on host failures (bug #128 Petya Kohts)<br />
* Fix for non-scheduled hosts and services not being updated in NDOUtils<br />
* Fix for typos in TAC, CMD CGIs (bugs #150, #144, #148)<br />
* Fix for types in documentation (bugs #145, #105, #106)<br />
* Fix for incorrect host state counts in status CGI when viewing servicegroups (bug #72)<br />
* Fix for new Splunk integration query parameters (bug #136)<br />
* Fix for extra field header in availability CSV export (bug #113)<br />
* Fix for macro processing code modifying input string (Jochen Bern)<br />
* Fix for update check API<br />
* Fix for CGI speedup when persistent=0 for comments<br />
* Fix for event execution loop re-scheduling host checks instead of executing them if service checks are disabled (bug #152)<br />
* Fix for segfaults on Solaris (Torsten Huebler)<br />
* Fix for incorrect comment expiration times being passed to event broker (Mattieu Kermagot)<br />
* Doc updates related to cleaning of custom macros (Peter Valdemar Morch)<br />
* Fix to sample notify-service-by-email command (bug #62)<br />
* Fix for retaining host display name and alias, as well as service display name (Folkert van Heusden) </p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="standard" count="" href="http://www.the-tech-tutorial.com/?p=1364"></g:plusone></div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=Install+or+upgrade+Nagios+to+version+3.2.2&amp;link=http://www.the-tech-tutorial.com/?p=1364&amp;notes=Nagios%20Core%20have%20been%20updated%20to%203.2.2%0D%0AThe%20update%2Finstallation%20process%20is%20not%20different%20as%20the%20one%20described%20in%20the%20main%20article%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0ATo%20update%20type%20into%20your%20terminal%3A%0D%0A%0D%0Acd%20%2Fusr%2Flocal%2Fsrc%0D%0Asudo%20wget%20http%3A%2F%2Fprdownloads.sourceforge.net%2Fsourceforge%2Fnagios%2Fnagios-3.2.2.tar.gz%0D%0Asudo%20tar%20xvzf%20nag&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=Install+or+upgrade+Nagios+to+version+3.2.2&amp;link=http://www.the-tech-tutorial.com/?p=1364&amp;notes=Nagios%20Core%20have%20been%20updated%20to%203.2.2%0D%0AThe%20update%2Finstallation%20process%20is%20not%20different%20as%20the%20one%20described%20in%20the%20main%20article%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0ATo%20update%20type%20into%20your%20terminal%3A%0D%0A%0D%0Acd%20%2Fusr%2Flocal%2Fsrc%0D%0Asudo%20wget%20http%3A%2F%2Fprdownloads.sourceforge.net%2Fsourceforge%2Fnagios%2Fnagios-3.2.2.tar.gz%0D%0Asudo%20tar%20xvzf%20nag&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=Install+or+upgrade+Nagios+to+version+3.2.2&amp;link=http://www.the-tech-tutorial.com/?p=1364&amp;notes=Nagios%20Core%20have%20been%20updated%20to%203.2.2%0D%0AThe%20update%2Finstallation%20process%20is%20not%20different%20as%20the%20one%20described%20in%20the%20main%20article%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0ATo%20update%20type%20into%20your%20terminal%3A%0D%0A%0D%0Acd%20%2Fusr%2Flocal%2Fsrc%0D%0Asudo%20wget%20http%3A%2F%2Fprdownloads.sourceforge.net%2Fsourceforge%2Fnagios%2Fnagios-3.2.2.tar.gz%0D%0Asudo%20tar%20xvzf%20nag&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=Install+or+upgrade+Nagios+to+version+3.2.2&amp;link=http://www.the-tech-tutorial.com/?p=1364&amp;notes=Nagios%20Core%20have%20been%20updated%20to%203.2.2%0D%0AThe%20update%2Finstallation%20process%20is%20not%20different%20as%20the%20one%20described%20in%20the%20main%20article%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0ATo%20update%20type%20into%20your%20terminal%3A%0D%0A%0D%0Acd%20%2Fusr%2Flocal%2Fsrc%0D%0Asudo%20wget%20http%3A%2F%2Fprdownloads.sourceforge.net%2Fsourceforge%2Fnagios%2Fnagios-3.2.2.tar.gz%0D%0Asudo%20tar%20xvzf%20nag&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=Install+or+upgrade+Nagios+to+version+3.2.2&amp;link=http://www.the-tech-tutorial.com/?p=1364&amp;notes=Nagios%20Core%20have%20been%20updated%20to%203.2.2%0D%0AThe%20update%2Finstallation%20process%20is%20not%20different%20as%20the%20one%20described%20in%20the%20main%20article%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0ATo%20update%20type%20into%20your%20terminal%3A%0D%0A%0D%0Acd%20%2Fusr%2Flocal%2Fsrc%0D%0Asudo%20wget%20http%3A%2F%2Fprdownloads.sourceforge.net%2Fsourceforge%2Fnagios%2Fnagios-3.2.2.tar.gz%0D%0Asudo%20tar%20xvzf%20nag&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Install+or+upgrade+Nagios+to+version+3.2.2&amp;link=http://www.the-tech-tutorial.com/?p=1364&amp;notes=Nagios%20Core%20have%20been%20updated%20to%203.2.2%0D%0AThe%20update%2Finstallation%20process%20is%20not%20different%20as%20the%20one%20described%20in%20the%20main%20article%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0ATo%20update%20type%20into%20your%20terminal%3A%0D%0A%0D%0Acd%20%2Fusr%2Flocal%2Fsrc%0D%0Asudo%20wget%20http%3A%2F%2Fprdownloads.sourceforge.net%2Fsourceforge%2Fnagios%2Fnagios-3.2.2.tar.gz%0D%0Asudo%20tar%20xvzf%20nag&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=Install+or+upgrade+Nagios+to+version+3.2.2&amp;link=http://www.the-tech-tutorial.com/?p=1364&amp;notes=Nagios%20Core%20have%20been%20updated%20to%203.2.2%0D%0AThe%20update%2Finstallation%20process%20is%20not%20different%20as%20the%20one%20described%20in%20the%20main%20article%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0ATo%20update%20type%20into%20your%20terminal%3A%0D%0A%0D%0Acd%20%2Fusr%2Flocal%2Fsrc%0D%0Asudo%20wget%20http%3A%2F%2Fprdownloads.sourceforge.net%2Fsourceforge%2Fnagios%2Fnagios-3.2.2.tar.gz%0D%0Asudo%20tar%20xvzf%20nag&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="https://shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.the-tech-tutorial.com/?feed=rss2&#038;p=1364</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Backup (mysqldump)</title>
		<link>http://www.the-tech-tutorial.com/?p=1097</link>
		<comments>http://www.the-tech-tutorial.com/?p=1097#comments</comments>
		<pubDate>Thu, 03 Mar 2011 14:09:14 +0000</pubDate>
		<dc:creator>Tyler Allen</dc:creator>
				<category><![CDATA[Short]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[dump]]></category>
		<category><![CDATA[Easy]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqldump]]></category>
		<category><![CDATA[Tutoiral]]></category>

		<guid isPermaLink="false">http://www.the-tech-tutorial.com/?p=1097</guid>
		<description><![CDATA[There are plenty of ways of backing up MySQL, however my personal preference is to use MySQL dump, here’s how you do it: To backup: mysqldump -u [USERNAME] -p [DATABASE] > backup.sql [USERNAME]: Replace this with your MySQL Username [DATABASE]: Replace this with the name of the database you wish to backup To Restore: mysql [...]]]></description>
				<content:encoded><![CDATA[<p>There are plenty of ways of backing up <span>MySQL</span>, however my personal preference is to use <span><span>MySQL</span> <span>dump</span></span>, here’s how you do it:<span id="more-1097"></span></p>
<p><strong>To <span>backup</span>:</strong></p>
<pre><span>mysqldump</span> -u [USERNAME] -p  [DATABASE] > backup.sql</pre>
<p>[USERNAME]: Replace this with your <span>MySQL</span> Username<br />
[DATABASE]: Replace this with the name of the <span>database</span> you wish to <span>backup</span><br />
<center><br />
<script type="text/javascript"><!--
google_ad_client = "ca-pub-2094089617852812";
/* 2011 Bottom */
google_ad_slot = "5825267234";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center><br />
<strong>To <span>Restore</span>:</strong></p>
<pre><span>mysql</span> -u [USERNAME] -p [DATABASE] < backup.sql </pre>
<p>[USERNAME]: Replace this with your <span>MySQL</span> Username<br />
[DATABASE]: Replace this with the name of the <span>database</span> you wish to backup</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="standard" count="" href="http://www.the-tech-tutorial.com/?p=1097"></g:plusone></div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=MySQL+Backup+%28mysqldump%29&amp;link=http://www.the-tech-tutorial.com/?p=1097&amp;notes=There%20are%20plenty%20of%20ways%20of%20backing%20up%20MySQL%2C%20however%20my%20personal%20preference%20is%20to%20use%20MySQL%20dump%2C%20here%E2%80%99s%20how%20you%20do%20it%3A%0D%0A%0D%0ATo%20backup%3A%0D%0Amysqldump%20-u%20%5BUSERNAME%5D%20-p%20%20%5BDATABASE%5D%20%3E%20backup.sql%0D%0A%0D%0A%5BUSERNAME%5D%3A%20Replace%20this%20with%20your%20MySQL%20Username%0D%0A%5BDATABASE%5D%3A%20Replace%20this%20with%20the%20name%20of%20the%20database%20y&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=MySQL+Backup+%28mysqldump%29&amp;link=http://www.the-tech-tutorial.com/?p=1097&amp;notes=There%20are%20plenty%20of%20ways%20of%20backing%20up%20MySQL%2C%20however%20my%20personal%20preference%20is%20to%20use%20MySQL%20dump%2C%20here%E2%80%99s%20how%20you%20do%20it%3A%0D%0A%0D%0ATo%20backup%3A%0D%0Amysqldump%20-u%20%5BUSERNAME%5D%20-p%20%20%5BDATABASE%5D%20%3E%20backup.sql%0D%0A%0D%0A%5BUSERNAME%5D%3A%20Replace%20this%20with%20your%20MySQL%20Username%0D%0A%5BDATABASE%5D%3A%20Replace%20this%20with%20the%20name%20of%20the%20database%20y&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=MySQL+Backup+%28mysqldump%29&amp;link=http://www.the-tech-tutorial.com/?p=1097&amp;notes=There%20are%20plenty%20of%20ways%20of%20backing%20up%20MySQL%2C%20however%20my%20personal%20preference%20is%20to%20use%20MySQL%20dump%2C%20here%E2%80%99s%20how%20you%20do%20it%3A%0D%0A%0D%0ATo%20backup%3A%0D%0Amysqldump%20-u%20%5BUSERNAME%5D%20-p%20%20%5BDATABASE%5D%20%3E%20backup.sql%0D%0A%0D%0A%5BUSERNAME%5D%3A%20Replace%20this%20with%20your%20MySQL%20Username%0D%0A%5BDATABASE%5D%3A%20Replace%20this%20with%20the%20name%20of%20the%20database%20y&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=MySQL+Backup+%28mysqldump%29&amp;link=http://www.the-tech-tutorial.com/?p=1097&amp;notes=There%20are%20plenty%20of%20ways%20of%20backing%20up%20MySQL%2C%20however%20my%20personal%20preference%20is%20to%20use%20MySQL%20dump%2C%20here%E2%80%99s%20how%20you%20do%20it%3A%0D%0A%0D%0ATo%20backup%3A%0D%0Amysqldump%20-u%20%5BUSERNAME%5D%20-p%20%20%5BDATABASE%5D%20%3E%20backup.sql%0D%0A%0D%0A%5BUSERNAME%5D%3A%20Replace%20this%20with%20your%20MySQL%20Username%0D%0A%5BDATABASE%5D%3A%20Replace%20this%20with%20the%20name%20of%20the%20database%20y&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=MySQL+Backup+%28mysqldump%29&amp;link=http://www.the-tech-tutorial.com/?p=1097&amp;notes=There%20are%20plenty%20of%20ways%20of%20backing%20up%20MySQL%2C%20however%20my%20personal%20preference%20is%20to%20use%20MySQL%20dump%2C%20here%E2%80%99s%20how%20you%20do%20it%3A%0D%0A%0D%0ATo%20backup%3A%0D%0Amysqldump%20-u%20%5BUSERNAME%5D%20-p%20%20%5BDATABASE%5D%20%3E%20backup.sql%0D%0A%0D%0A%5BUSERNAME%5D%3A%20Replace%20this%20with%20your%20MySQL%20Username%0D%0A%5BDATABASE%5D%3A%20Replace%20this%20with%20the%20name%20of%20the%20database%20y&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=MySQL+Backup+%28mysqldump%29&amp;link=http://www.the-tech-tutorial.com/?p=1097&amp;notes=There%20are%20plenty%20of%20ways%20of%20backing%20up%20MySQL%2C%20however%20my%20personal%20preference%20is%20to%20use%20MySQL%20dump%2C%20here%E2%80%99s%20how%20you%20do%20it%3A%0D%0A%0D%0ATo%20backup%3A%0D%0Amysqldump%20-u%20%5BUSERNAME%5D%20-p%20%20%5BDATABASE%5D%20%3E%20backup.sql%0D%0A%0D%0A%5BUSERNAME%5D%3A%20Replace%20this%20with%20your%20MySQL%20Username%0D%0A%5BDATABASE%5D%3A%20Replace%20this%20with%20the%20name%20of%20the%20database%20y&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=MySQL+Backup+%28mysqldump%29&amp;link=http://www.the-tech-tutorial.com/?p=1097&amp;notes=There%20are%20plenty%20of%20ways%20of%20backing%20up%20MySQL%2C%20however%20my%20personal%20preference%20is%20to%20use%20MySQL%20dump%2C%20here%E2%80%99s%20how%20you%20do%20it%3A%0D%0A%0D%0ATo%20backup%3A%0D%0Amysqldump%20-u%20%5BUSERNAME%5D%20-p%20%20%5BDATABASE%5D%20%3E%20backup.sql%0D%0A%0D%0A%5BUSERNAME%5D%3A%20Replace%20this%20with%20your%20MySQL%20Username%0D%0A%5BDATABASE%5D%3A%20Replace%20this%20with%20the%20name%20of%20the%20database%20y&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="https://shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.the-tech-tutorial.com/?feed=rss2&#038;p=1097</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL MD5 User Password</title>
		<link>http://www.the-tech-tutorial.com/?p=1105</link>
		<comments>http://www.the-tech-tutorial.com/?p=1105#comments</comments>
		<pubDate>Tue, 25 Jan 2011 10:16:36 +0000</pubDate>
		<dc:creator>Tyler Allen</dc:creator>
				<category><![CDATA[Short]]></category>
		<category><![CDATA[Easy]]></category>
		<category><![CDATA[MD5]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Password]]></category>
		<category><![CDATA[Simple]]></category>
		<category><![CDATA[store]]></category>
		<category><![CDATA[table]]></category>
		<category><![CDATA[Tutoiral]]></category>
		<category><![CDATA[User]]></category>
		<category><![CDATA[user table]]></category>

		<guid isPermaLink="false">http://www.the-tech-tutorial.com/?p=1105</guid>
		<description><![CDATA[When you have a user’s table in your database it is bad practice to store user passwords within this table in plain text, the problem with this if anyone managed to hack your database or a mischievous employ looks at the table then they will be able to see everyone’s password. However if we store [...]]]></description>
				<content:encoded><![CDATA[<p>When you have a <span>user’s <span>table</span></span> in your <span>database</span> it is bad practice to store user <span>passwords</span> within this table in <span>plain text</span>, the problem with this if anyone managed to hack your database or a mischievous employ looks at the table then they will be able to see everyone’s <span>password</span>. </p>
<p>However if we store the <span>passwords</span> using the <span><a href="http://en.wikipedia.org/wiki/MD5">MD5</a></span> <span>Hash Function</span> then it’s impossible to see the <span>password</span>, however all we can do is <span><span>encrypt</span> the <span><span>users</span> password</span></span> and see if it matched the stored <span><span><a href="http://en.wikipedia.org/wiki/MD5">MD5</a></span> Function</span>, so how do we do this:<span id="more-1105"></span></p>
<p>Well we enter these commands when adding <span>new users</span>, and <span>checking to see if a user’s <span>password</span> is <span>correct</span></span>:</p>
<p><strong><span>Insert new <span>User</span></span></strong></p>
<pre>INSERT INTO `user` (`Username`, `Pass`) VALUES ('bob.jhonny', MD5('<span>mypassword</span>'));</pre>
<p><center><br />
<script type="text/javascript"><!--
google_ad_client = "pub-2094089617852812";
/* 2011 Bottom */
google_ad_slot = "5825267234";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center><br />
<strong><span>Check <span>Password</span></span></strong></p>
<pre>SELECT * FROM `user` WHERE username='bob.jhonny' AND pass=MD5('mypassword');</pre>
<p><em>If returns null then the user <span>password</span> is incorrect</em></p>
<p><strong>Reset Password</strong></p>
<pre>UPDATE `dlp_contatcs`.`user` SET `Pass`=MD5('NewPassword') WHERE `Username`='bob.jhonny';</pre>
<p><center><strong>Please remember all passwords stored in this way are case sensitive.</strong></center></p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="standard" count="" href="http://www.the-tech-tutorial.com/?p=1105"></g:plusone></div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=MySQL+MD5+User+Password&amp;link=http://www.the-tech-tutorial.com/?p=1105&amp;notes=When%20you%20have%20a%20user%E2%80%99s%20table%20in%20your%20database%20it%20is%20bad%20practice%20to%20store%20user%20passwords%20within%20this%20table%20in%20plain%20text%2C%20the%20problem%20with%20this%20if%20anyone%20managed%20to%20hack%20your%20database%20or%20a%20mischievous%20employ%20looks%20at%20the%20table%20then%20they%20will%20be%20able%20to%20see%20everyone%E2%80%99s%20password.%20%0D%0A%0D%0AHowever%20if%20we%20&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=MySQL+MD5+User+Password&amp;link=http://www.the-tech-tutorial.com/?p=1105&amp;notes=When%20you%20have%20a%20user%E2%80%99s%20table%20in%20your%20database%20it%20is%20bad%20practice%20to%20store%20user%20passwords%20within%20this%20table%20in%20plain%20text%2C%20the%20problem%20with%20this%20if%20anyone%20managed%20to%20hack%20your%20database%20or%20a%20mischievous%20employ%20looks%20at%20the%20table%20then%20they%20will%20be%20able%20to%20see%20everyone%E2%80%99s%20password.%20%0D%0A%0D%0AHowever%20if%20we%20&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=MySQL+MD5+User+Password&amp;link=http://www.the-tech-tutorial.com/?p=1105&amp;notes=When%20you%20have%20a%20user%E2%80%99s%20table%20in%20your%20database%20it%20is%20bad%20practice%20to%20store%20user%20passwords%20within%20this%20table%20in%20plain%20text%2C%20the%20problem%20with%20this%20if%20anyone%20managed%20to%20hack%20your%20database%20or%20a%20mischievous%20employ%20looks%20at%20the%20table%20then%20they%20will%20be%20able%20to%20see%20everyone%E2%80%99s%20password.%20%0D%0A%0D%0AHowever%20if%20we%20&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=MySQL+MD5+User+Password&amp;link=http://www.the-tech-tutorial.com/?p=1105&amp;notes=When%20you%20have%20a%20user%E2%80%99s%20table%20in%20your%20database%20it%20is%20bad%20practice%20to%20store%20user%20passwords%20within%20this%20table%20in%20plain%20text%2C%20the%20problem%20with%20this%20if%20anyone%20managed%20to%20hack%20your%20database%20or%20a%20mischievous%20employ%20looks%20at%20the%20table%20then%20they%20will%20be%20able%20to%20see%20everyone%E2%80%99s%20password.%20%0D%0A%0D%0AHowever%20if%20we%20&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=MySQL+MD5+User+Password&amp;link=http://www.the-tech-tutorial.com/?p=1105&amp;notes=When%20you%20have%20a%20user%E2%80%99s%20table%20in%20your%20database%20it%20is%20bad%20practice%20to%20store%20user%20passwords%20within%20this%20table%20in%20plain%20text%2C%20the%20problem%20with%20this%20if%20anyone%20managed%20to%20hack%20your%20database%20or%20a%20mischievous%20employ%20looks%20at%20the%20table%20then%20they%20will%20be%20able%20to%20see%20everyone%E2%80%99s%20password.%20%0D%0A%0D%0AHowever%20if%20we%20&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=MySQL+MD5+User+Password&amp;link=http://www.the-tech-tutorial.com/?p=1105&amp;notes=When%20you%20have%20a%20user%E2%80%99s%20table%20in%20your%20database%20it%20is%20bad%20practice%20to%20store%20user%20passwords%20within%20this%20table%20in%20plain%20text%2C%20the%20problem%20with%20this%20if%20anyone%20managed%20to%20hack%20your%20database%20or%20a%20mischievous%20employ%20looks%20at%20the%20table%20then%20they%20will%20be%20able%20to%20see%20everyone%E2%80%99s%20password.%20%0D%0A%0D%0AHowever%20if%20we%20&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=MySQL+MD5+User+Password&amp;link=http://www.the-tech-tutorial.com/?p=1105&amp;notes=When%20you%20have%20a%20user%E2%80%99s%20table%20in%20your%20database%20it%20is%20bad%20practice%20to%20store%20user%20passwords%20within%20this%20table%20in%20plain%20text%2C%20the%20problem%20with%20this%20if%20anyone%20managed%20to%20hack%20your%20database%20or%20a%20mischievous%20employ%20looks%20at%20the%20table%20then%20they%20will%20be%20able%20to%20see%20everyone%E2%80%99s%20password.%20%0D%0A%0D%0AHowever%20if%20we%20&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="https://shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.the-tech-tutorial.com/?feed=rss2&#038;p=1105</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Parchive Quick Tutoiral</title>
		<link>http://www.the-tech-tutorial.com/?p=1109</link>
		<comments>http://www.the-tech-tutorial.com/?p=1109#comments</comments>
		<pubDate>Fri, 01 Oct 2010 18:29:36 +0000</pubDate>
		<dc:creator>Tyler Allen</dc:creator>
				<category><![CDATA[Short]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[Easy]]></category>
		<category><![CDATA[par]]></category>
		<category><![CDATA[rar]]></category>
		<category><![CDATA[recover]]></category>
		<category><![CDATA[split]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.the-tech-tutorial.com/?p=1109</guid>
		<description><![CDATA[Parchive (or PAR2) is an open source software project started to develop a parity file format, these parity files use a error correction system that can be used to perform data verification, and allow recovery when data is lost or corrupted. They are commonly used to fix corrupt data when downloading from newsgroups, however they [...]]]></description>
				<content:encoded><![CDATA[<p><span>Parchive</span> (or <span>PAR2</span>) is an <span>open source software project</span> started to develop a <span><a href="http://en.wikipedia.org/wiki/Parchive">parity file format</a></span>, these parity <span>files</span> use <span>a <span>error correction</span> system</span> that can be used to perform <span>data verification</span>, and allow <span><span>recovery</span> when <span>data</span> is <span>lost</span> or <span>corrupted</span></span>.</p>
<p>They are commonly used to fix <span>corrupt <span>data</span></span> when downloading from newsgroups, however they can be used to make <span>recovery files</span> for pretty much <span>any file</span>. These <span>recovery files</span> are often much <span><span>smaller</span> than the original</span> so they can easily be transmitted with the original <span>file</span>.  However they normally only repair 5% of the original file, you can make <span>parity files</span> that <span>repair more</span> by scarifying the size of the <span>parity file</span>, so how do we do this:<span id="more-1109"></span><br />
<strong><span>Create Par2 File</span> with <span>5% <span>redundancy</span></span></strong></p>
<pre>par2 create -r5 test.mpg</pre>
<p><strong><span>Create Par2 File</span> with <span>10% <span>redundancy</span></span></strong></p>
<pre>par2 create -r10 test.mpg</pre>
<p><strong><span><span>Create Par2 File</span> with <span>25% <span>redundancy</span></span></span></strong></p>
<pre>par2 create -r25 test.mpg</pre>
<p><center><br />
<script type="text/javascript"><!--
google_ad_client = "pub-2094089617852812";
/* 2011 Bottom */
google_ad_slot = "5825267234";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center><br />
<strong><span>Create <span>Par2</span> File to <span>include <span>multiple <span>files</span></span></span></span></strong></p>
<pre>par2 create -r5 test.mpg.part*.<span>rar</span></pre>
<p><strong><span><span>Verify</span> the <span>original file</span></span> with the <span>Par2</span> File</strong></p>
<pre>par2 <span>verify</span> test.mpg.par2</pre>
<p><em>If this <span>fails</span> then you will need to <span>repair the file</span></em></p>
<p><strong><span>To <span>Repair the <span>File</span></span></span></strong></p>
<pre>par2 repair test.mpg.par2</pre>
<p>For more info goto the <a href="http://manpages.ubuntu.com/manpages/hardy/man1/par2.1.html"><span>Par2 Man Page<span></a></p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="standard" count="" href="http://www.the-tech-tutorial.com/?p=1109"></g:plusone></div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=Parchive+Quick+Tutoiral&amp;link=http://www.the-tech-tutorial.com/?p=1109&amp;notes=Parchive%20%28or%20PAR2%29%20is%20an%20open%20source%20software%20project%20started%20to%20develop%20a%20parity%20file%20format%2C%20these%20parity%20files%20use%20a%20error%20correction%20system%20that%20can%20be%20used%20to%20perform%20data%20verification%2C%20and%20allow%20recovery%20when%20data%20is%20lost%20or%20corrupted.%0D%0A%0D%0AThey%20are%20commonly%20used%20to%20fix%20corrupt%20data%20when%20downloa&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=Parchive+Quick+Tutoiral&amp;link=http://www.the-tech-tutorial.com/?p=1109&amp;notes=Parchive%20%28or%20PAR2%29%20is%20an%20open%20source%20software%20project%20started%20to%20develop%20a%20parity%20file%20format%2C%20these%20parity%20files%20use%20a%20error%20correction%20system%20that%20can%20be%20used%20to%20perform%20data%20verification%2C%20and%20allow%20recovery%20when%20data%20is%20lost%20or%20corrupted.%0D%0A%0D%0AThey%20are%20commonly%20used%20to%20fix%20corrupt%20data%20when%20downloa&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=Parchive+Quick+Tutoiral&amp;link=http://www.the-tech-tutorial.com/?p=1109&amp;notes=Parchive%20%28or%20PAR2%29%20is%20an%20open%20source%20software%20project%20started%20to%20develop%20a%20parity%20file%20format%2C%20these%20parity%20files%20use%20a%20error%20correction%20system%20that%20can%20be%20used%20to%20perform%20data%20verification%2C%20and%20allow%20recovery%20when%20data%20is%20lost%20or%20corrupted.%0D%0A%0D%0AThey%20are%20commonly%20used%20to%20fix%20corrupt%20data%20when%20downloa&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=Parchive+Quick+Tutoiral&amp;link=http://www.the-tech-tutorial.com/?p=1109&amp;notes=Parchive%20%28or%20PAR2%29%20is%20an%20open%20source%20software%20project%20started%20to%20develop%20a%20parity%20file%20format%2C%20these%20parity%20files%20use%20a%20error%20correction%20system%20that%20can%20be%20used%20to%20perform%20data%20verification%2C%20and%20allow%20recovery%20when%20data%20is%20lost%20or%20corrupted.%0D%0A%0D%0AThey%20are%20commonly%20used%20to%20fix%20corrupt%20data%20when%20downloa&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=Parchive+Quick+Tutoiral&amp;link=http://www.the-tech-tutorial.com/?p=1109&amp;notes=Parchive%20%28or%20PAR2%29%20is%20an%20open%20source%20software%20project%20started%20to%20develop%20a%20parity%20file%20format%2C%20these%20parity%20files%20use%20a%20error%20correction%20system%20that%20can%20be%20used%20to%20perform%20data%20verification%2C%20and%20allow%20recovery%20when%20data%20is%20lost%20or%20corrupted.%0D%0A%0D%0AThey%20are%20commonly%20used%20to%20fix%20corrupt%20data%20when%20downloa&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Parchive+Quick+Tutoiral&amp;link=http://www.the-tech-tutorial.com/?p=1109&amp;notes=Parchive%20%28or%20PAR2%29%20is%20an%20open%20source%20software%20project%20started%20to%20develop%20a%20parity%20file%20format%2C%20these%20parity%20files%20use%20a%20error%20correction%20system%20that%20can%20be%20used%20to%20perform%20data%20verification%2C%20and%20allow%20recovery%20when%20data%20is%20lost%20or%20corrupted.%0D%0A%0D%0AThey%20are%20commonly%20used%20to%20fix%20corrupt%20data%20when%20downloa&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=Parchive+Quick+Tutoiral&amp;link=http://www.the-tech-tutorial.com/?p=1109&amp;notes=Parchive%20%28or%20PAR2%29%20is%20an%20open%20source%20software%20project%20started%20to%20develop%20a%20parity%20file%20format%2C%20these%20parity%20files%20use%20a%20error%20correction%20system%20that%20can%20be%20used%20to%20perform%20data%20verification%2C%20and%20allow%20recovery%20when%20data%20is%20lost%20or%20corrupted.%0D%0A%0D%0AThey%20are%20commonly%20used%20to%20fix%20corrupt%20data%20when%20downloa&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="https://shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.the-tech-tutorial.com/?feed=rss2&#038;p=1109</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
