<?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/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>Brock Angelo &#187; Ubuntu</title>
	<atom:link href="http://brockangelo.com/category/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://brockangelo.com</link>
	<description>@gmail.com</description>
	<lastBuildDate>Fri, 22 Jul 2011 14:00:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>This Kernal Requires the Following Features Not Present on the CPU: 0:6</title>
		<link>http://brockangelo.com/2009/12/15/this-kernal-requires-the-following-features-not-present-on-the-cpu-06/</link>
		<comments>http://brockangelo.com/2009/12/15/this-kernal-requires-the-following-features-not-present-on-the-cpu-06/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 16:33:15 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[pae/nx]]></category>
		<category><![CDATA[processor]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=1304</guid>
		<description><![CDATA[Solution to Virtualbox error: "This kernel requires the following features not present on the CPU: 0:6"]]></description>
			<content:encoded><![CDATA[<p>If you get the following error when installing Ubuntu on VirtualBox:</p>
<blockquote><p>This kernel requires the following features not present on the CPU: 0:6</p></blockquote>
<p>&#8230;don&#8217;t fret. You simply need to check the &#8220;Enable PAE/NX&#8221; found under Settings &#8211;> System &#8211;> Processor.</p>
]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2009/12/15/this-kernal-requires-the-following-features-not-present-on-the-cpu-06/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Display Your &#8220;Uptime&#8221; using Bash</title>
		<link>http://brockangelo.com/2009/06/05/how-to-display-your-uptime-using-bash/</link>
		<comments>http://brockangelo.com/2009/06/05/how-to-display-your-uptime-using-bash/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 11:30:39 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[uptime]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=879</guid>
		<description><![CDATA[Bash is a powerful scripting tool and comes in handy on more than one occasion. Here is a fun one: Write your server uptime to a text file so that you can display it on a webpage.]]></description>
			<content:encoded><![CDATA[<p>Bash is a powerful scripting tool and comes in handy on more than one occasion. Here is a fun one: Write your server uptime to a text file so that you can display it on a webpage.</p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/sh

# get the uptime data
days=$(uptime | awk '{print $3}' | sed 's/,//g')
hours=$(uptime | awk '{print $5}' | sed 's/,//g')
label=$(uptime | awk '{print $4}')

if [ &quot;$days&quot; = 1 ]; then
day_label='day'
else
day_label='days'
fi

#format labels
if [ $hours = 1 ]; then
hour_label='hour'
else
hour_label='hours'
fi

#format output
if [ &quot;$label&quot; = 'mins,' ]; then
echo 'This server has been on for '$days minutes'' &gt; /var/www/uptime.txt
elif [[ &quot;$label&quot; = 'day,' || &quot;$label&quot; = 'days,' ]]; then
echo 'This server has been on for '$days $day_label, $hours $hour_label'' &gt; /var/www/uptime.txt
elif [ &quot;$label&quot; = '2' ]; then
echo 'This server has been on for '$days hours'' &gt; /var/www/uptime.txt
fi
</pre>
]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2009/06/05/how-to-display-your-uptime-using-bash/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My Top 10 Ubuntu Aliases</title>
		<link>http://brockangelo.com/2009/05/30/my-top-10-ubuntu-aliases/</link>
		<comments>http://brockangelo.com/2009/05/30/my-top-10-ubuntu-aliases/#comments</comments>
		<pubDate>Sat, 30 May 2009 09:25:50 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[alias]]></category>
		<category><![CDATA[aliases]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[command prompt]]></category>
		<category><![CDATA[command shell]]></category>
		<category><![CDATA[shell script]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=773</guid>
		<description><![CDATA[10 Ubunutu Aliases You Can't Live Without]]></description>
			<content:encoded><![CDATA[<h2>aka: The Ultimate List of Ubuntu Aliases</h2>
<p>Okay, maybe this isn&#8217;t the <em>ultimate</em> list, and maybe it&#8217;s more than 10, but this is my list of essential, must-have aliases for <a href="http://www.ubuntu.com/">Ubuntu</a> (or any version of Linux). Aliases are &#8220;shortcuts&#8221;. For example, if you&#8217;re at the command prompt and want to exit,  you normally type <code>exit</code>. But I have an alias for the letter <code>e</code> to exit. I cut my typing by 75%!! Do this all throughout your workflow and you&#8217;ll seriously wonder how you ever lived without it. Backup your aliases. </p>
<p>By adding these aliases, I have turned 277 characters of typing down to just 35. That&#8217;s a reduction of over 87%!!! Finally, I can leave work at 10am.  <img src='http://brockangelo.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   </p>
<p>If you want to use an alias in <a href="http://www.ubuntu.com/">Ubuntu Linux</a>, insert these commands (or any other commands that speed up your workflow) at the bottom of your <code>.profile</code> or <code>.bashrc</code> files:</p>
<blockquote><ul>
alias sp=&#8217;sudo pico&#8217;<br />
alias la=&#8217;ls -alh&#8217;<br />
alias m=&#8217;mutt&#8217;<br />
alias e=&#8217;exit&#8217;<br />
alias cdw=&#8217;cd /var/www/&#8217;</p>
<ul>alias cdb=&#8217;cd /var/www/brockangelo/&#8217;<br />
alias cda=&#8217;cd /var/www/angeloarchive/&#8217; <em style="color:blue">(if you host multiple websites, replace the &#8220;a&#8221; with a website identifier. aka, photoshopsamurai = ps)</em><br />
alias cdps=&#8217;cd /var/www/photoshopsamurai/&#8217;</ul>
<p>alias cdn=&#8217;cd /usr/local/nagios/etc/&#8217;<br />
alias nr=&#8217;sudo /etc/init.d/nagios restart&#8217;<br />
alias ar=&#8217;sudo /etc/init.d/apache2 restart&#8217;<br />
alias coffee=&#8217;cat > /var/www/brockangelo/coffees.txt&#8217; <em style="color:blue">(I used to have a coffee-counter on my website and I would update the number of coffees my espresso machine had made &#8211; you can use this to <strong>replace</strong> the contents of a text file quickly)</em><br />
alias s=&#8217;sudo&#8217;<br />
alias aa=&#8217;/home/brock/scripts/add_alias.sh&#8217; <em style="color:blue">(I created a shell script to add new aliases by just typing aa &#8211; leave a comment if you&#8217;d like to download the script)</em>
</ul>
</blockquote>
<p>And here is the code for the shell script:</p>
<blockquote><ul>
#!/bin/bash<br />
echo Enter the shortcut, or alias, you want to use:<br />
read SHORTTEXT<br />
echo Now enter what text you want it to replace:<br />
read LONGTEXT<br />
echo &#8220;alias $SHORTTEXT=&#8217;$LONGTEXT&#8217;&#8221; >> ~/.profile<br />
echo &#8220;alias $SHORTTEXT=&#8217;$LONGTEXT&#8217; was added to your profile. Changes effective after logout/in.&#8221;</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2009/05/30/my-top-10-ubuntu-aliases/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Delete Comment Spam using a Cron Job</title>
		<link>http://brockangelo.com/2009/05/23/delete-comment-spam-using-a-cron-job/</link>
		<comments>http://brockangelo.com/2009/05/23/delete-comment-spam-using-a-cron-job/#comments</comments>
		<pubDate>Sat, 23 May 2009 17:46:12 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[akismet]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[delete-spam-daily]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=751</guid>
		<description><![CDATA[Delete all the comments marked as spam automatically using cron.]]></description>
			<content:encoded><![CDATA[<p><strong>Delete Comment Spam using a Cron Job</strong></p>
<p>WordPress catches all of the comment spam, but it doesn&#8217;t seem to delete it often enough. If you have a high traffic site, this can become megabytes in your database. Bleh. I don&#8217;t have a high traffic site, but I sync my databases off-site everyday and spam wastes my bandwidth. So I delete all the comments marked as spam automatically each day using a scheduled cron job so that I never even have to see it. Could I possibly delete a real comment? Yes. Does the convenience of never even knowing about comment spam outweigh the risk? You bet.</p>
<p>Create a bash script in your scripts folder by typing this at the command prompt:</p>
<blockquote><p><code>sudo pico /home/brockangelo/scripts/del_spam.sh</code></p></blockquote>
<blockquote><p><strong>sudo:</strong>  elevate privileges<br />
<strong>pico:</strong>   use your editor of choice<br />
<strong>/home&#8230;/scripts/:</strong>   wherever you keep all your bash scripts<br />
<strong>del_spam.sh:  </strong>name it something obvious</p></blockquote>
<p>By the way, bash scripts are as easily made as windows batch files. You just put in the code and put a .sh at the end. Inside &#8220;del_spam.sh&#8221; add the following:</p>
<blockquote><p><code>mysql -u username -ppassword -e "delete from wp_comments where comment_approved='spam';" brockangelo</code></p></blockquote>
<p>Where &#8220;brockangelo&#8221; is the name of the database. Repeat this line for each WordPress site you host. Then you need to set this up as a cron job and schedule it for once a night. Or, you can download my plugin that deletes spam daily. <a href="http://brockangelo.com/wordpress/plugins/delete-spam-daily/">Delete Spam Daily</a> plugin.</p>
<p>By the way, the username and password format in that command you see above looks wrong, but it is typed correctly. You put &#8220;-u (space) username&#8221; then you squish the &#8220;-p&#8221; and &#8220;password&#8221; together like this &#8220;-u username -ppassword&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2009/05/23/delete-comment-spam-using-a-cron-job/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Add Uploaded Media to WP-DownloadManager</title>
		<link>http://brockangelo.com/2009/05/12/how-to-add-uploaded-media-to-wp-downloadmanager/</link>
		<comments>http://brockangelo.com/2009/05/12/how-to-add-uploaded-media-to-wp-downloadmanager/#comments</comments>
		<pubDate>Tue, 12 May 2009 19:22:11 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[custom field]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[wp-downloadcounter]]></category>
		<category><![CDATA[wp-downloadmanager]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=740</guid>
		<description><![CDATA[<p>WARNING: All of the recommendations in this post work off of a test database. The following commands could damage your live site if not tested first. Always work off a test site, then perform a database backup before doing any of these things.</p> <p>I was faced with a challenge at work this week: I wanted [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p><strong>WARNING: All of the recommendations in this post work off of a test database. The following commands could damage your live site if not tested first. Always work off a test site, then perform a database backup before doing any of these things.</strong></p></blockquote>
<p>I was faced with a challenge at work this week: I wanted to track how many downloads our forms were getting on the company intranet (built on WordPress). I had already uploaded over one thousand forms to the site. I needed an upload tool that would be able to look at all of the forms and other media that we have accumulated. Unfortunately, none of the download counter plugins for WordPress will look add existing media, and they all want you to upload your forms (or media) through their &#8220;Add download&#8221; button.</p>
<p>Well, if I&#8217;d uploaded only a couple of forms, this wouldn&#8217;t be a problem. But since I was dealing with one thousand, I needed a way to import <em>existing</em> uploads into the new download counter. This would have to be done in MySQL. </p>
<p>I looked at download counters on wordpress.org and found one that I liked: <a href="http://wordpress.org/extend/plugins/wp-downloadmanager/" target="_blank">WP-DownloadManager</a>. There seem to be quite a few of them, including <a href="http://wordpress.org/extend/plugins/wp-downloadcounter/">WP-DownloadCounter</a> (which I also liked) but I chose this one simply because it had been around longer and had a very high rating.</p>
<p>WP-DownloadManager has a way to import existing forms from the management page, but they have to be done one at a time, and you have to manually type all of your titles over again. This would take way too long. So I came up with a way to migrate all of my uploaded form titles and filenames to the WP-DownloadManager&#8217;s database. </p>
]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2009/05/12/how-to-add-uploaded-media-to-wp-downloadmanager/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to Bulk Import into a MySQL Database</title>
		<link>http://brockangelo.com/2009/04/27/how-to-bulk-import-into-a-mysql-database/</link>
		<comments>http://brockangelo.com/2009/04/27/how-to-bulk-import-into-a-mysql-database/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 15:21:24 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[webmin]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=726</guid>
		<description><![CDATA[Importing data into a MySQL table from a text file or pasting the new data into the SQL Editor.]]></description>
			<content:encoded><![CDATA[<p>This tutorial shows you how to take a large number of values and import them as cells in your MySQL database.</p>
<p>Here is a typical scenario: we have a list of account numbers at work that tell us when a patient is in network. If a patient is out-of-network when they come to our clinic, they&#8217;ll have a hefty bill to pay out of pocket; so the staff searches against a MySQL database that I setup to determine if they are in-network or not.</p>
<p>This database has over 8,000 account numbers in it. From time to time, new account numbers need to be added to the database. I will get an e-mail with anywhere from three to fifty new account numbers to add. If it is a small number, I simply go into PhpMyAdmin and manually add the rows. But if there are more than ten new account numbers, it would take a long time to enter them all by hand. So here are two ways to do it.</p>
<p><strong>Method #1</strong></p>
<p>Create a text file with the new account numbers in it, each on it&#8217;s own line. It should look like this:</p>
<blockquote><p>
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7
</p></blockquote>
<p>Save this text file and upload it to your server where the SQL database resides. If you are on a unix server, the full path would look like this:</p>
<blockquote><p><code>/home/username/accounts.txt</code></p></blockquote>
<p>With it saved to the server, we need to execute SQL code in a database editor like PHPMyAdmin or using the Webmin MySQL Database Server software. Inside this software, you&#8217;ll want to browse into the database (in this case, let&#8217;s call it &#8220;intranet&#8221;). Inside the database, you&#8217;ll have a table for all of your account numbers (let&#8217;s call this table &#8220;accounts&#8221;).</p>
<p>You&#8217;ll want to execute SQL code. Most software packages have an option to &#8220;Execute SQL&#8221; which works a lot like a command line. In this box, you&#8217;ll execute the following:</p>
<blockquote><p><code>LOAD DATA LOCAL INFILE '/home/username/accounts.txt' INTO TABLE accounts FIELDS TERMINATED BY 'r' (numbers, id)</code></p></blockquote>
<p>Here is what all of that means:</p>
<p><strong>LOAD DATA LOCAL INFILE:</strong> This simply means to pull the data from the text file that we uploaded from the server and to use the data for our import.</p>
<p><strong>&#8216;/home/username/accounts.txt&#8217; :</strong> This would be the full path and filename of the text file that has all of your new account numbers. The username value refers to the username on the unix server where the file was uploaded. If you are on a Windows server, it would look more like <code>'C:Documents and SettingsusernameMy Documentsaccounts.txt'</code> or something similar.</p>
<p><strong>INTO TABLE accounts :</strong> This simply means that we want to insert the data into our &#8220;accounts&#8221; table in our database.</p>
<p><strong>FIELDS TERMINATED BY &#8216;r&#8217; :</strong> If you are familiar with Excel, this is like your delimiter. Since I have all of the values on their own line, I use &#8216;r&#8217; (which refers to a carriage return, or a new line). If you separate them all by commas, you would just use &#8216;,&#8217; instead.</p>
<p><strong>(numbers, id) :</strong> These are the column names inside the table where the data will be stored. If you were to open my table, you would see &#8220;id&#8221; first, then &#8220;numbers&#8221;. The &#8220;id&#8221; field is the primary key assigned to the row, and the &#8220;numbers&#8221; field is where my account numbers are. The &#8220;numbers&#8221; field is listed first because SQL will put the data in the first field. ID will then auto increment.</p>
<p><strong>Method #2</strong></p>
<p>The second method is to paste the new data into your MySQL editor (instead of uploading a text file). </p>
]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2009/04/27/how-to-bulk-import-into-a-mysql-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Search and Replace a Custom Field in WordPress using PHPMyAdmin</title>
		<link>http://brockangelo.com/2009/03/18/search-and-replace-a-custom-field-in-wordpress-using-phpmyadmin/</link>
		<comments>http://brockangelo.com/2009/03/18/search-and-replace-a-custom-field-in-wordpress-using-phpmyadmin/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 11:32:07 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[custom fields]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=706</guid>
		<description><![CDATA[Here is how to do a search and replace for a specific Custom Field value in WordPress. Works for all posts that have that value in a specific Custom Field.]]></description>
			<content:encoded><![CDATA[<p><strong>Search and Replace a Custom Field in WordPress using PHPMyAdmin</strong></p>
<p>If you&#8217;ve ever used Microsoft Excel, you probably have an idea of just how easy changing hundreds of cells can be. Gone are the days of manually typing line by line any corrections that you need to make. The same is true when you are working with a database like we are in WordPress. </p>
<p>This example performs a search and replace of all custom fields that meet a specified criteria. In this case, I&#8217;m looking for all staff member pages that have a custom field for a department phone number that was incorrect. We want to replace that with a new number. Using PHPMyAdmin and running a SQL query, I can select all of them to see the results before I do anything to my databse:</p>
<blockquote><p><code>SELECT * FROM `wp_postmeta` WHERE `meta_key` LIKE 'DeptPhone' AND `meta_value` LIKE '212-555-1212'</code></p></blockquote>
<p>It is worth mentioning, that you can also use wildcards if you want to include more results. The &#8216;%&#8217; is your wildcard:</p>
<blockquote><p><code>SELECT * FROM `wp_postmeta` WHERE `meta_key` LIKE '%eptPhone' AND `meta_value` LIKE '212-555-%'</code></p></blockquote>
<p>This yields the same results. It is also worth pointing out that the quotation mark around our text values and the tick mark around our table column names are different.</p>
<blockquote><ul>
<li><code>`meta_key`</code> 	uses tick marks	(this is usally the top left key on your keyboard, next to the 1)</li>
<li><code>'%DeptPhone'</code> 	uses a single quotation mark (this is next to the enter key)</li>
</ul>
</blockquote>
<p>So, to perform the changes, we need to use the UPDATE command instead of select, and actually replace text. Here goes:</p>
<blockquote><p><code>UPDATE `wp_postmeta` SET `meta_value` = replace(meta_value, '212-555-1212', '212-444-1212') WHERE `meta_key` LIKE 'DeptPhone'<br />
</code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2009/03/18/search-and-replace-a-custom-field-in-wordpress-using-phpmyadmin/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Change Ownership of All Files and Folders in a Directory</title>
		<link>http://brockangelo.com/2008/11/12/change-ownership-of-all-files-and-folders-in-a-directory/</link>
		<comments>http://brockangelo.com/2008/11/12/change-ownership-of-all-files-and-folders-in-a-directory/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 00:01:26 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[change ownership]]></category>
		<category><![CDATA[chown]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=699</guid>
		<description><![CDATA[<p>How to Change Ownership of All Files and Folders in a Directory</p> <p>I use dynamic DNS for all of my domain names. This means that from time to time, I&#8217;ll move a website from one server to another for testing. In these cases, it is helpful to be able to log in as the administrator [...]]]></description>
			<content:encoded><![CDATA[<p><strong>How to Change Ownership of All Files and Folders in a Directory</strong></p>
<p>I use dynamic DNS for all of my domain names. This means that from time to time, I&#8217;ll move a website from one server to another for testing. In these cases, it is helpful to be able to log in as the administrator on the parent account and ftp files through the parent account. It&#8217;s confusing, I know.</p>
<p>But if you need to log in to FTP as an admin or some other user than the typical owner, you&#8217;ll find that you can&#8217;t FTP anything in since the directory is owned by that website. So I go in and quickly change the ownership of all files and folders to the admin user so that I can upload files again. Here&#8217;s how you do it:</p>
<blockquote><p><code>sudo chown -R adminUserName folderToChown</code></p></blockquote>
<p>Sudo:  elevate privileges of the user.<br />
chown: change the ownership of the files<br />
-R: do it recursively (meaning, do it to all files and folders underneath this point)<br />
adminUserName: this is the account that you want to own all the files<br />
folderToChown: this is the top-level folder where ownership changes will be made</p>
]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2008/11/12/change-ownership-of-all-files-and-folders-in-a-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Search and Replace MySQL using PHPMyAdmin</title>
		<link>http://brockangelo.com/2008/11/09/search-and-replace-mysql-using-phpmyadmin/</link>
		<comments>http://brockangelo.com/2008/11/09/search-and-replace-mysql-using-phpmyadmin/#comments</comments>
		<pubDate>Sun, 09 Nov 2008 19:51:17 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[search and replace]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=689</guid>
		<description><![CDATA[<p>Search and Replace MySQL using PHPMyAdmin</p> <p>This is a life-saver: an easy way to search any table inside your database and replace one string of text with another. It works like a charm. But be careful, search first to see the results of your query before you commit the changes, and always backup prior to [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Search and Replace MySQL using PHPMyAdmin</strong></p>
<p>This is a life-saver: an easy way to search any table inside your database and replace one string of text with another. It works like a charm. But be careful, search first to see the results of your query before you commit the changes, and always backup prior to any database work.</p>
<p>Here is how you test the waters safely:</p>
<blockquote><p><code>SELECT * FROM `wp_posts` WHERE `post_content` LIKE '%oops%'</code></p></blockquote>
<p>Translation:</p>
<blockquote><p><code>SELECT * FROM `table_name` WHERE `field_name` LIKE '%unwanted_text%'</code></p></blockquote>
<p>And here is how you do some damage:</p>
<blockquote><p><code>UPDATE `wp_posts` SET `post_content` = replace(post_content, 'oops', 'much better')</code></p></blockquote>
<p>And translated:</p>
<blockquote><p><code>UPDATE `table_name` SET `field_name` = replace(same_field_name, 'unwanted_text', 'wanted_text')</code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2008/11/09/search-and-replace-mysql-using-phpmyadmin/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to Change Attributes for all Files and Folders</title>
		<link>http://brockangelo.com/2008/11/02/how-to-change-attributes-for-all-files-and-folders/</link>
		<comments>http://brockangelo.com/2008/11/02/how-to-change-attributes-for-all-files-and-folders/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 19:56:44 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=671</guid>
		<description><![CDATA[<p>How to Change Attributes for all Files and Folders in Linux</p> <p>I am regularly working with WordPress and need to change the attributes of my files and folders so that it is locked down and secure. This is a two step process. I first change the attributes of all files to 644. Then I change [...]]]></description>
			<content:encoded><![CDATA[<p><strong>How to Change Attributes for all Files and Folders in Linux</strong></p>
<p>I am regularly working with WordPress and need to change the attributes of my files and folders so that it is locked down and secure. This is a two step process. I first change the attributes of all files to 644. Then I change the attributes of all folders to 755. However, you should decide what is best for you by reading the article on the Codex called <a href="http://codex.wordpress.org/Changing_File_Permissions">Changing File Permissions</a> if you are new to this topic.</p>
<p>This can be done from anywhere, since I always type out the full path to the location so I know I&#8217;m not making any mistakes. I enter the following to change all files:</p>
<blockquote><p><code>sudo find [enter path here. ex: /var/www/wordpress] -type f -exec chmod 644 {} \;</code></p></blockquote>
<p>And I follow that up by entering the following for folders:</p>
<blockquote><p><code>sudo find [enter path here. ex: /var/www/wordpress] -type d -exec chmod 755 {} \;</code></p></blockquote>
<p>And you&#8217;re done. </p>
]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2008/11/02/how-to-change-attributes-for-all-files-and-folders/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

