<?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>Linux How To &#187; How To</title>
	<atom:link href="http://linux.golod.com/articles/category/how-to/feed" rel="self" type="application/rss+xml" />
	<link>http://linux.golod.com</link>
	<description>Linux Tips, Tutorials and How To's</description>
	<lastBuildDate>Thu, 11 Feb 2010 20:02:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to Delete WordPress Comments From the Command Line (CLI)</title>
		<link>http://linux.golod.com/articles/6.html</link>
		<comments>http://linux.golod.com/articles/6.html#comments</comments>
		<pubDate>Thu, 11 Feb 2010 20:02:20 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[delete]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://linux.golod.com/?p=6</guid>
		<description><![CDATA[Haven&#8217;t logged into your wordpress blog for a while? Find a few thousand spam comments that you need to delete? I had 34,020 comments in my spam queue. Here is how you can delete them without doing it 20 at a time =P 1. Log into mysql (mysql -u root -p) 2. Select the appropriate [...]]]></description>
			<content:encoded><![CDATA[<p>Haven&#8217;t logged into your wordpress blog for a while? Find a few thousand spam comments that you need to delete? I had 34,020 comments in my spam queue. Here is how you can delete them without doing it 20 at a time =P</p>
<p>1. Log into mysql (mysql -u root -p)<br />
2. Select the appropriate database (probably starts with wp-). Look in your wp-config.php file to find the name of your database if you don&#8217;t remember what it is.<br />
3. Enter the following command (WARNING: This will delete any comment that has not been marked &#8216;approved&#8217;):<br />
DELETE FROM wp_comments WHERE comment_approved = 0;</p>
<p>Enjoy</p>
]]></content:encoded>
			<wfw:commentRss>http://linux.golod.com/articles/6.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grep How To &#8211; Part 1</title>
		<link>http://linux.golod.com/articles/5.html</link>
		<comments>http://linux.golod.com/articles/5.html#comments</comments>
		<pubDate>Wed, 07 Feb 2007 05:42:56 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://linux.golod.com/articles/5.html</guid>
		<description><![CDATA[Here are a few little tid bits that I use on a daily basis with the awesome Grep command line tool. Grep allows you to search files for symbols or strings (groups of characters like words) and will return the files that the search sting is found in. For example you want to search a [...]]]></description>
			<content:encoded><![CDATA[<p>Here are a few little tid bits that I use on a daily basis with the awesome Grep command line tool.</p>
<p>Grep allows you to search files for symbols or strings (groups of characters like words) and will return the files that the search sting is found in. For example you want to search a website&#8217;s access log file for a recent traffic that came from a search engine. Most search engine referral urls have a question mark in them.  The Grep command would look something like this:</p>
<p>grep [search string] [file name]</p>
<p>grep &#8220;?&#8221; /www/logs/golod.com-access.log</p>
<p>I use the double quotes around the question mark so that grep doesn&#8217;t get confused by a symbol, the third part is the location of the file on my server that I want to search. </p>
<p>Now let&#8217;s say you get a slew of information and you really only want to see searches that came in on a specific date. Since apache is configured to format my log files with a date like 07/Feb as the date I would &#8220;pipe&#8221; the results or pass them to another grep command. This looks like:</p>
<p>grep [search string] [file name] | grep [2nd search string]</p>
<p>grep &#8220;?&#8221; /www/logs/golod.com-access.log | grep &#8220;07/Feb&#8221;</p>
<p>This essentially passes the results of the first grep search to the 2nd grep search for further refinement.</p>
<p>One last thing that I use all of the time with Grep is the -v operator.  Adding -v to your grep statement allows you to eliminate results that match a certain search string. Using our example:</p>
<p>grep [search string] [file name] | grep [2nd search string] | grep -v [search string]</p>
<p>grep &#8220;?&#8221; /www/logs/golod.com-access.log | grep &#8220;07/Feb&#8221; | grep -v &#8220;yahoo&#8221;</p>
<p>This would give us the same results as before, but it would remove any of the results that had the string yahoo anywhere in them.</p>
<p>Hopefully, this helps.</p>
<p>[tags]Linux, Grep, How To, Tutorial[/tags]</p>
]]></content:encoded>
			<wfw:commentRss>http://linux.golod.com/articles/5.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

