<?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>jon zobrist (dot) com &#187; Linux</title>
	<atom:link href="http://www.jonzobrist.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jonzobrist.com</link>
	<description>Unix, Linux, IT, Cloud, Meat</description>
	<lastBuildDate>Fri, 06 Jan 2012 18:59:34 +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>MCOD &#8211; 9.28.2011 &#8211; Simple OS X Bash Changes</title>
		<link>http://www.jonzobrist.com/2011/09/28/mcod-9-28-2011-simple-os-x-bash-changes/</link>
		<comments>http://www.jonzobrist.com/2011/09/28/mcod-9-28-2011-simple-os-x-bash-changes/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 05:57:48 +0000</pubDate>
		<dc:creator>Jon Zobrist</dc:creator>
				<category><![CDATA[Mac Command of the Day]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[bashrc]]></category>
		<category><![CDATA[bash_profile]]></category>
		<category><![CDATA[BSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.jonzobrist.com/?p=418</guid>
		<description><![CDATA[
Related posts:<ol>
<li><a href='http://www.jonzobrist.com/2011/08/31/mcod-8-31-2011-lock-your-screen-in-os-x-from-the-menubar/' rel='bookmark' title='MCOD &#8211; 8.31.2011 &#8211; Lock your screen in OS X from the menubar'>MCOD &#8211; 8.31.2011 &#8211; Lock your screen in OS X from the menubar</a> <small>...</small></li>
<li><a href='http://www.jonzobrist.com/2011/05/29/lcod-5-29-2011-2-quick-tcp-port-check-scripts-in-python/' rel='bookmark' title='LCOD 5.29.2011 &#8211; 2 quick TCP port check scripts in Python'>LCOD 5.29.2011 &#8211; 2 quick TCP port check scripts in Python</a> <small>...</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F09%2F28%2Fmcod-9-28-2011-simple-os-x-bash-changes%2F' data-shr_title='MCOD+-+9.28.2011+-+Simple+OS+X+Bash+Changes'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F09%2F28%2Fmcod-9-28-2011-simple-os-x-bash-changes%2F' data-shr_title='MCOD+-+9.28.2011+-+Simple+OS+X+Bash+Changes'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Macintosh Command of the Day Sept 28, 2011</p>
<p>I have no idea why I did not do this sooner!</p>
<p>On my Macs I always had that md5sum the command doesn&#8217;t exist, and I hate that the output of the md5 command that does exist is not the same as the GNU tools. Sure it&#8217;s BSD (And I&#8217;ll always love my BSD), but I think compatibility to the GNU tools buys more for BSD and OS X than incompatibility.</p>
<p>Add this to your ~/.bashrc (and source it or restart your terminal)</p>
<pre>alias md5sum='md5 -r '</pre>
<p>Now your md5sum &lt;filename&gt; works the same as on the 1,000,000,000 Linux boxes out there.</p>
<p>Also in my .bashrc on my Macbook Air is</p>
<pre>alias ll='ls -Falh'
alias lg='ls -Falh|grep -i '
declare -x EDITOR="/usr/bin/vim"
declare -x JAVA_HOME="/usr/"</pre>
<pre><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px; white-space: normal;">-Jon</span></pre>
<p>&nbsp;</p>
<div class="shr-publisher-418"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F09%2F28%2Fmcod-9-28-2011-simple-os-x-bash-changes%2F' data-shr_title='MCOD+-+9.28.2011+-+Simple+OS+X+Bash+Changes'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F09%2F28%2Fmcod-9-28-2011-simple-os-x-bash-changes%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F09%2F28%2Fmcod-9-28-2011-simple-os-x-bash-changes%2F' data-shr_title='MCOD+-+9.28.2011+-+Simple+OS+X+Bash+Changes'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><p>Related posts:<ol>
<li><a href='http://www.jonzobrist.com/2011/08/31/mcod-8-31-2011-lock-your-screen-in-os-x-from-the-menubar/' rel='bookmark' title='MCOD &#8211; 8.31.2011 &#8211; Lock your screen in OS X from the menubar'>MCOD &#8211; 8.31.2011 &#8211; Lock your screen in OS X from the menubar</a> <small>&nbsp; &nbsp; 1. Launch the “Keychain Access” application located in...</small></li>
<li><a href='http://www.jonzobrist.com/2011/05/29/lcod-5-29-2011-2-quick-tcp-port-check-scripts-in-python/' rel='bookmark' title='LCOD 5.29.2011 &#8211; 2 quick TCP port check scripts in Python'>LCOD 5.29.2011 &#8211; 2 quick TCP port check scripts in Python</a> <small>Disclaimer : These scripts could be considered malicious and should...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jonzobrist.com/2011/09/28/mcod-9-28-2011-simple-os-x-bash-changes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu codenames, my own cheat sheet, rant, and link</title>
		<link>http://www.jonzobrist.com/2011/06/01/ubuntu-codenames-my-own-cheat-sheet-rant-and-link/</link>
		<comments>http://www.jonzobrist.com/2011/06/01/ubuntu-codenames-my-own-cheat-sheet-rant-and-link/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 16:32:07 +0000</pubDate>
		<dc:creator>Jon Zobrist</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[cheatsheet]]></category>
		<category><![CDATA[codenames]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://jonzobrist.com/?p=288</guid>
		<description><![CDATA[I love Ubuntu. I use it everywhere. I love the Debian based dpkg, the default installs, the Amazon AWS compatible EUC cloud. I&#8217;m also a big fan of cool names, I like having printers and domains and whatever on some big, geeky, internal naming schema, like everything relates to Norse mythology or Star Trek. But, [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F06%2F01%2Fubuntu-codenames-my-own-cheat-sheet-rant-and-link%2F' data-shr_title='Ubuntu+codenames%2C+my+own+cheat+sheet%2C+rant%2C+and+link'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F06%2F01%2Fubuntu-codenames-my-own-cheat-sheet-rant-and-link%2F' data-shr_title='Ubuntu+codenames%2C+my+own+cheat+sheet%2C+rant%2C+and+link'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I love <a title="Ubuntu home page" href="http://www.ubuntu.org" target="_blank">Ubuntu</a>.</p>
<p>I use it everywhere. I love the <a title="Debian" href="http://www.debian.org/" target="_blank">Debian</a> based dpkg, the default installs, the Amazon AWS compatible <a title="Ubuntu UEC Cloud" href="http://www.ubuntu.com/business/cloud/overview" target="_blank">EUC cloud</a>.</p>
<p>I&#8217;m also a big fan of cool names, I like having printers and domains and whatever on some big, geeky, internal naming schema, like everything relates to Norse mythology or Star Trek.</p>
<p>But, I CANNOT STAND the code names for Ubuntu projects being used to refer to the version. I&#8217;m running Ubuntu 9.04, or 8.04 LTS, or 10.04 LTS, etc. I am not running Ubuntu Honey Badger, or whatever code name they developed under.</p>
<p>This is only annoying when I&#8217;m trying to find instructions about how to do something and people say things like  &#8217;Well, I tried this and it worked on Hoary&#8217;. WTF is a Hoary? Please, don&#8217;t tell me, I don&#8217;t care.</p>
<p>So, for my own sanity I am posting this rant, and linking to the page with a list of Development Codes for Ubuntu, as I&#8217;m sure, going forward, I&#8217;m going to need it.</p>
<p><a href="https://wiki.ubuntu.com/DevelopmentCodeNames">https://wiki.ubuntu.com/DevelopmentCodeNames</a></p>
<p>And for my quick use, the versions I use most:</p>
<p>8.04 Hardy Heron</p>
<p>9.04 Jaunty Jackalope</p>
<p>10.04 Lucid lynx</p>
<p>11.04 Natty Narwhal</p>
<p>&nbsp;</p>
<div class="shr-publisher-288"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F06%2F01%2Fubuntu-codenames-my-own-cheat-sheet-rant-and-link%2F' data-shr_title='Ubuntu+codenames%2C+my+own+cheat+sheet%2C+rant%2C+and+link'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F06%2F01%2Fubuntu-codenames-my-own-cheat-sheet-rant-and-link%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F06%2F01%2Fubuntu-codenames-my-own-cheat-sheet-rant-and-link%2F' data-shr_title='Ubuntu+codenames%2C+my+own+cheat+sheet%2C+rant%2C+and+link'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jonzobrist.com/2011/06/01/ubuntu-codenames-my-own-cheat-sheet-rant-and-link/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LCOD 5.29.2011 &#8211; 2 quick TCP port check scripts in Python</title>
		<link>http://www.jonzobrist.com/2011/05/29/lcod-5-29-2011-2-quick-tcp-port-check-scripts-in-python/</link>
		<comments>http://www.jonzobrist.com/2011/05/29/lcod-5-29-2011-2-quick-tcp-port-check-scripts-in-python/#comments</comments>
		<pubDate>Sun, 29 May 2011 17:46:58 +0000</pubDate>
		<dc:creator>Jon Zobrist</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[BSD]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[shell scripts]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://jonzobrist.com/?p=277</guid>
		<description><![CDATA[Disclaimer : These scripts could be considered malicious and should only be used to test servers with permission from the server administrator. I accept no responsibility for your use of these scripts, and make no warranty about their usefulness either express or implied. &#160; I often find myself troubleshooting someone&#8217;s network connectivity, or one of [...]
Related posts:<ol>
<li><a href='http://www.jonzobrist.com/2011/05/04/my-ec2-ebs-raid-0-creation-script/' rel='bookmark' title='My EC2 EBS RAID-0 creation script'>My EC2 EBS RAID-0 creation script</a> <small>I want to write up a full howto/tutorial, but have...</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F05%2F29%2Flcod-5-29-2011-2-quick-tcp-port-check-scripts-in-python%2F' data-shr_title='LCOD+5.29.2011+-+2+quick+TCP+port+check+scripts+in+Python'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F05%2F29%2Flcod-5-29-2011-2-quick-tcp-port-check-scripts-in-python%2F' data-shr_title='LCOD+5.29.2011+-+2+quick+TCP+port+check+scripts+in+Python'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Disclaimer : These scripts could be considered malicious and should only be used to test servers with permission from the server administrator. I accept no responsibility for your use of these scripts, and make no warranty about their usefulness either express or implied.</p>
<p>&nbsp;</p>
<p>I often find myself troubleshooting someone&#8217;s network connectivity, or one of my servers ability to receive connections or mass connections.</p>
<p>For this, <a title="Nmap the Network Mapper" href="http://www.nmap.org/" target="_blank">nmap</a> is invaluable, but sometimes it&#8217;s easier to just send someone a script to run, especially in larger companies where things like nmap, and other port scanners are frowned on.</p>
<p>So, here are 2 scripts that take the same arguments HOST PORT.</p>
<p>They are tcpcheck.py (<a title="tcpcheck.py" href="http://jonzobrist.com/files/tcpcheck.py.gz" target="_blank">here is the gzipped version</a>), and tcpcheck-bulk.py (<a title="tcpcheck-bulk.py" href="http://jonzobrist.com/files/tcpcheck-bulk.py.gz" target="_blank">here is the gzipped version</a>).</p>
<p>tcpcheck.py makes 1 connection to a TCP port and reports success or failure.</p>
<p>Example usage and output  :</p>
<p>./tcpcheck.py jonzobrist.com 80<br />
Success. Connected to jonzobrist.com on port: 80</p>
<p>./tcpcheck.py jonzobrist.com 81<br />
Failure. Cannot connect to jonzobrist.com on port: 81</p>
<p>tcpcheck-bulk.py is hard wired to attempt 1500 connections to a TCP port and reports success/failures.</p>
<p>Example usage and output is :</p>
<p>./tcpcheck-bulk.py jonzobrist.com 80<br />
Done with jonzobrist.com on port: 80<br />
Done. Failures : 0 Successes : 1500</p>
<p>This script was very useful when we tried to determine server performance over a link that seemed to be killing our connections.</p>
<p>Please feel free to use it, and share if it helped.</p>
<div class="shr-publisher-277"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F05%2F29%2Flcod-5-29-2011-2-quick-tcp-port-check-scripts-in-python%2F' data-shr_title='LCOD+5.29.2011+-+2+quick+TCP+port+check+scripts+in+Python'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F05%2F29%2Flcod-5-29-2011-2-quick-tcp-port-check-scripts-in-python%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F05%2F29%2Flcod-5-29-2011-2-quick-tcp-port-check-scripts-in-python%2F' data-shr_title='LCOD+5.29.2011+-+2+quick+TCP+port+check+scripts+in+Python'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><p>Related posts:<ol>
<li><a href='http://www.jonzobrist.com/2011/05/04/my-ec2-ebs-raid-0-creation-script/' rel='bookmark' title='My EC2 EBS RAID-0 creation script'>My EC2 EBS RAID-0 creation script</a> <small>I want to write up a full howto/tutorial, but have...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jonzobrist.com/2011/05/29/lcod-5-29-2011-2-quick-tcp-port-check-scripts-in-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delete lots of EC2 EBS volumes</title>
		<link>http://www.jonzobrist.com/2011/05/23/delete-lots-of-ec2-ebs-volumes/</link>
		<comments>http://www.jonzobrist.com/2011/05/23/delete-lots-of-ec2-ebs-volumes/#comments</comments>
		<pubDate>Mon, 23 May 2011 17:08:38 +0000</pubDate>
		<dc:creator>Jon Zobrist</dc:creator>
				<category><![CDATA[AWS]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[EBS]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[delete]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://jonzobrist.com/?p=274</guid>
		<description><![CDATA[Here is a quick script to delete lots of EBS volumes on Amazon EC2. The output from something like ec2-describe-instances i-6fc30f01 &#124; grep &#8216;^BLOCKDEVICE&#8217; &#124; awk &#8216;{ print $3 }&#8217; &#62; delete-these-volumes.txt Then run ./delete-volumes.sh delete-these-volumes.txt Can be fed into this script (you may want to edit the file first, I accept no responsibility for [...]
Related posts:<ol>
<li><a href='http://www.jonzobrist.com/2011/05/04/my-ec2-ebs-raid-0-creation-script/' rel='bookmark' title='My EC2 EBS RAID-0 creation script'>My EC2 EBS RAID-0 creation script</a> <small>I want to write up a full howto/tutorial, but have...</small></li>
<li><a href='http://www.jonzobrist.com/2011/04/16/ec2-raid0-on-linux-with-ebs-volumes-notes/' rel='bookmark' title='EC2 RAID0 on Linux with EBS volumes notes'>EC2 RAID0 on Linux with EBS volumes notes</a> <small>&nbsp; I&#8217;m almost done with my publish / post of...</small></li>
<li><a href='http://www.jonzobrist.com/2011/03/19/s3-du-sh-script-to-get-bucket-size-on-amazon-aws-s3/' rel='bookmark' title='S3-du.sh script to get bucket size on Amazon AWS S3'>S3-du.sh script to get bucket size on Amazon AWS S3</a> <small>Here is my script s3-du.sh that I wrote to determine...</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F05%2F23%2Fdelete-lots-of-ec2-ebs-volumes%2F' data-shr_title='Delete+lots+of+EC2+EBS+volumes'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F05%2F23%2Fdelete-lots-of-ec2-ebs-volumes%2F' data-shr_title='Delete+lots+of+EC2+EBS+volumes'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Here is a quick script to delete lots of EBS volumes on Amazon EC2.</p>
<p>The output from something like</p>
<p>ec2-describe-instances i-6fc30f01 | grep &#8216;^BLOCKDEVICE&#8217; | awk &#8216;{ print $3 }&#8217; &gt; delete-these-volumes.txt</p>
<p>Then run</p>
<p>./delete-volumes.sh delete-these-volumes.txt</p>
<p>Can be fed into this script (you may want to edit the file first, I accept no responsibility for you deleting your volumes, with or without my script.</p>
<p>Download the gzipped script <a title="EC2 Delete Volumes By List" href="http://jonzobrist.com/files/delete-volumes-list.sh.gz">here</a>.</p>
<p>&nbsp;</p>
<div>#!/bin/bash</div>
<div>if [ "${1}" ]</div>
<div>then</div>
<div>for V in `cat ${1}`</div>
<div>do</div>
<div>ec2-detach-volume ${V}</div>
<div>echo &#8220;Waiting for ${V} to detach&#8221;</div>
<div>while ! ec2-describe-volumes ${V} | grep -q available</div>
<div>do</div>
<div>echo -n &#8220;.&#8221;</div>
<div>sleep 1</div>
<div>done</div>
<div>ec2-delete-volume ${V}</div>
<div>echo &#8220;Volume ${V} deleted at `date`&#8221;</div>
<div>done</div>
<div>else</div>
<div>echo &#8220;Usage : ${0} filename&#8221;</div>
<div>echo &#8220;Where filename is a file with volumes to be deleted&#8221;</div>
<div>exit 1</div>
<div>fi</div>
<p>Example output from me deleting 60 real volumes:</p>
<div>time delete-volumes-list.sh i-6fc30f01.info.delvolumes</div>
<div>Client.IncorrectState: Volume &#8216;vol-3bab1d50&#8242;is in the &#8216;available&#8217; state.</div>
<div>Waiting for vol-3bab1d50 to detach</div>
<div>VOLUME	vol-3bab1d50</div>
<div>Volume vol-3bab1d50 deleted at Mon May 23 10:53:56 MDT 2011</div>
<div>ATTACHMENT	vol-33ab1d58	i-6fc30f01	/dev/sdh2	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-33ab1d58 to detach</div>
<div>VOLUME	vol-33ab1d58</div>
<div>Volume vol-33ab1d58 deleted at Mon May 23 10:54:08 MDT 2011</div>
<div>ATTACHMENT	vol-07ab1d6c	i-6fc30f01	/dev/sdh3	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-07ab1d6c to detach</div>
<div>VOLUME	vol-07ab1d6c</div>
<div>Volume vol-07ab1d6c deleted at Mon May 23 10:54:21 MDT 2011</div>
<div>ATTACHMENT	vol-17ab1d7c	i-6fc30f01	/dev/sdh4	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-17ab1d7c to detach</div>
<div>VOLUME	vol-17ab1d7c</div>
<div>Volume vol-17ab1d7c deleted at Mon May 23 10:54:33 MDT 2011</div>
<div>ATTACHMENT	vol-f9ab1d92	i-6fc30f01	/dev/sdh5	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-f9ab1d92 to detach</div>
<div>VOLUME	vol-f9ab1d92</div>
<div>Volume vol-f9ab1d92 deleted at Mon May 23 10:54:46 MDT 2011</div>
<div>ATTACHMENT	vol-c1ab1daa	i-6fc30f01	/dev/sdh6	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-c1ab1daa to detach</div>
<div>VOLUME	vol-c1ab1daa</div>
<div>Volume vol-c1ab1daa deleted at Mon May 23 10:54:58 MDT 2011</div>
<div>ATTACHMENT	vol-ddab1db6	i-6fc30f01	/dev/sdh7	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-ddab1db6 to detach</div>
<div>VOLUME	vol-ddab1db6</div>
<div>Volume vol-ddab1db6 deleted at Mon May 23 10:55:12 MDT 2011</div>
<div>ATTACHMENT	vol-a5ab1dce	i-6fc30f01	/dev/sdh8	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-a5ab1dce to detach</div>
<div>VOLUME	vol-a5ab1dce</div>
<div>Volume vol-a5ab1dce deleted at Mon May 23 10:55:24 MDT 2011</div>
<div>ATTACHMENT	vol-8bab1de0	i-6fc30f01	/dev/sdh9	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-8bab1de0 to detach</div>
<div>VOLUME	vol-8bab1de0</div>
<div>Volume vol-8bab1de0 deleted at Mon May 23 10:55:37 MDT 2011</div>
<div>ATTACHMENT	vol-85ab1dee	i-6fc30f01	/dev/sdh10	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-85ab1dee to detach</div>
<div>VOLUME	vol-85ab1dee</div>
<div>Volume vol-85ab1dee deleted at Mon May 23 10:55:49 MDT 2011</div>
<div>ATTACHMENT	vol-67a81e0c	i-6fc30f01	/dev/sdh11	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-67a81e0c to detach</div>
<div>VOLUME	vol-67a81e0c</div>
<div>Volume vol-67a81e0c deleted at Mon May 23 10:56:01 MDT 2011</div>
<div>ATTACHMENT	vol-4da81e26	i-6fc30f01	/dev/sdh12	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-4da81e26 to detach</div>
<div>VOLUME	vol-4da81e26</div>
<div>Volume vol-4da81e26 deleted at Mon May 23 10:56:17 MDT 2011</div>
<div>ATTACHMENT	vol-57a81e3c	i-6fc30f01	/dev/sdh13	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-57a81e3c to detach</div>
<div>VOLUME	vol-57a81e3c</div>
<div>Volume vol-57a81e3c deleted at Mon May 23 10:56:29 MDT 2011</div>
<div>ATTACHMENT	vol-1fa81e74	i-6fc30f01	/dev/sdh14	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-1fa81e74 to detach</div>
<div>VOLUME	vol-1fa81e74</div>
<div>Volume vol-1fa81e74 deleted at Mon May 23 10:56:42 MDT 2011</div>
<div>ATTACHMENT	vol-c9a81ea2	i-6fc30f01	/dev/sdi1	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-c9a81ea2 to detach</div>
<div>VOLUME	vol-c9a81ea2</div>
<div>Volume vol-c9a81ea2 deleted at Mon May 23 10:56:54 MDT 2011</div>
<div>ATTACHMENT	vol-afa81ec4	i-6fc30f01	/dev/sdi2	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-afa81ec4 to detach</div>
<div>VOLUME	vol-afa81ec4</div>
<div>Volume vol-afa81ec4 deleted at Mon May 23 10:57:07 MDT 2011</div>
<div>ATTACHMENT	vol-9fa81ef4	i-6fc30f01	/dev/sdi3	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-9fa81ef4 to detach</div>
<div>VOLUME	vol-9fa81ef4</div>
<div>Volume vol-9fa81ef4 deleted at Mon May 23 10:57:20 MDT 2011</div>
<div>ATTACHMENT	vol-6fa91f04	i-6fc30f01	/dev/sdi4	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-6fa91f04 to detach</div>
<div>VOLUME	vol-6fa91f04</div>
<div>Volume vol-6fa91f04 deleted at Mon May 23 10:57:33 MDT 2011</div>
<div>ATTACHMENT	vol-7da91f16	i-6fc30f01	/dev/sdi5	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-7da91f16 to detach</div>
<div>VOLUME	vol-7da91f16</div>
<div>Volume vol-7da91f16 deleted at Mon May 23 10:57:45 MDT 2011</div>
<div>ATTACHMENT	vol-4fa91f24	i-6fc30f01	/dev/sdi6	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-4fa91f24 to detach</div>
<div>VOLUME	vol-4fa91f24</div>
<div>Volume vol-4fa91f24 deleted at Mon May 23 10:57:58 MDT 2011</div>
<div>ATTACHMENT	vol-57a91f3c	i-6fc30f01	/dev/sdi7	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-57a91f3c to detach</div>
<div>VOLUME	vol-57a91f3c</div>
<div>Volume vol-57a91f3c deleted at Mon May 23 10:58:10 MDT 2011</div>
<div>ATTACHMENT	vol-33a91f58	i-6fc30f01	/dev/sdi8	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-33a91f58 to detach</div>
<div>VOLUME	vol-33a91f58</div>
<div>Volume vol-33a91f58 deleted at Mon May 23 10:58:24 MDT 2011</div>
<div>ATTACHMENT	vol-07a91f6c	i-6fc30f01	/dev/sdi9	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-07a91f6c to detach</div>
<div>VOLUME	vol-07a91f6c</div>
<div>Volume vol-07a91f6c deleted at Mon May 23 10:58:36 MDT 2011</div>
<div>ATTACHMENT	vol-fba91f90	i-6fc30f01	/dev/sdi10	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-fba91f90 to detach</div>
<div>VOLUME	vol-fba91f90</div>
<div>Volume vol-fba91f90 deleted at Mon May 23 10:58:49 MDT 2011</div>
<div>ATTACHMENT	vol-fda91f96	i-6fc30f01	/dev/sdi11	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-fda91f96 to detach</div>
<div>VOLUME	vol-fda91f96</div>
<div>Volume vol-fda91f96 deleted at Mon May 23 10:59:01 MDT 2011</div>
<div>ATTACHMENT	vol-c9a91fa2	i-6fc30f01	/dev/sdi12	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-c9a91fa2 to detach</div>
<div>VOLUME	vol-c9a91fa2</div>
<div>Volume vol-c9a91fa2 deleted at Mon May 23 10:59:14 MDT 2011</div>
<div>ATTACHMENT	vol-afa91fc4	i-6fc30f01	/dev/sdi13	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-afa91fc4 to detach</div>
<div>VOLUME	vol-afa91fc4</div>
<div>Volume vol-afa91fc4 deleted at Mon May 23 10:59:27 MDT 2011</div>
<div>ATTACHMENT	vol-bda91fd6	i-6fc30f01	/dev/sdi14	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-bda91fd6 to detach</div>
<div>VOLUME	vol-bda91fd6</div>
<div>Volume vol-bda91fd6 deleted at Mon May 23 10:59:39 MDT 2011</div>
<div>ATTACHMENT	vol-85a91fee	i-6fc30f01	/dev/sdj1	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-85a91fee to detach</div>
<div>VOLUME	vol-85a91fee</div>
<div>Volume vol-85a91fee deleted at Mon May 23 10:59:52 MDT 2011</div>
<div>ATTACHMENT	vol-6d962006	i-6fc30f01	/dev/sdj2	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-6d962006 to detach</div>
<div>VOLUME	vol-6d962006</div>
<div>Volume vol-6d962006 deleted at Mon May 23 11:00:05 MDT 2011</div>
<div>ATTACHMENT	vol-7196201a	i-6fc30f01	/dev/sdj3	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-7196201a to detach</div>
<div>VOLUME	vol-7196201a</div>
<div>Volume vol-7196201a deleted at Mon May 23 11:00:17 MDT 2011</div>
<div>ATTACHMENT	vol-59962032	i-6fc30f01	/dev/sdj4	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-59962032 to detach</div>
<div>VOLUME	vol-59962032</div>
<div>Volume vol-59962032 deleted at Mon May 23 11:00:29 MDT 2011</div>
<div>ATTACHMENT	vol-2196204a	i-6fc30f01	/dev/sdj5	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-2196204a to detach</div>
<div>VOLUME	vol-2196204a</div>
<div>Volume vol-2196204a deleted at Mon May 23 11:00:42 MDT 2011</div>
<div>ATTACHMENT	vol-3596205e	i-6fc30f01	/dev/sdj6	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-3596205e to detach</div>
<div>VOLUME	vol-3596205e</div>
<div>Volume vol-3596205e deleted at Mon May 23 11:00:54 MDT 2011</div>
<div>ATTACHMENT	vol-0796206c	i-6fc30f01	/dev/sdj7	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-0796206c to detach</div>
<div>VOLUME	vol-0796206c</div>
<div>Volume vol-0796206c deleted at Mon May 23 11:01:07 MDT 2011</div>
<div>ATTACHMENT	vol-ed962086	i-6fc30f01	/dev/sdj8	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-ed962086 to detach</div>
<div>VOLUME	vol-ed962086</div>
<div>Volume vol-ed962086 deleted at Mon May 23 11:01:19 MDT 2011</div>
<div>ATTACHMENT	vol-ff962094	i-6fc30f01	/dev/sdj9	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-ff962094 to detach</div>
<div>VOLUME	vol-ff962094</div>
<div>Volume vol-ff962094 deleted at Mon May 23 11:01:32 MDT 2011</div>
<div>ATTACHMENT	vol-fd962096	i-6fc30f01	/dev/sdj10	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-fd962096 to detach</div>
<div>VOLUME	vol-fd962096</div>
<div>Volume vol-fd962096 deleted at Mon May 23 11:01:45 MDT 2011</div>
<div>ATTACHMENT	vol-d39620b8	i-6fc30f01	/dev/sdj11	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-d39620b8 to detach</div>
<div>VOLUME	vol-d39620b8</div>
<div>Volume vol-d39620b8 deleted at Mon May 23 11:01:57 MDT 2011</div>
<div>ATTACHMENT	vol-a59620ce	i-6fc30f01	/dev/sdj12	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-a59620ce to detach</div>
<div>VOLUME	vol-a59620ce</div>
<div>Volume vol-a59620ce deleted at Mon May 23 11:02:10 MDT 2011</div>
<div>ATTACHMENT	vol-6f972104	i-6fc30f01	/dev/sdj13	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-6f972104 to detach</div>
<div>VOLUME	vol-6f972104</div>
<div>Volume vol-6f972104 deleted at Mon May 23 11:02:23 MDT 2011</div>
<div>ATTACHMENT	vol-5d972136	i-6fc30f01	/dev/sdj14	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-5d972136 to detach</div>
<div>VOLUME	vol-5d972136</div>
<div>Volume vol-5d972136 deleted at Mon May 23 11:02:36 MDT 2011</div>
<div>ATTACHMENT	vol-3b972150	i-6fc30f01	/dev/sdk1	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-3b972150 to detach</div>
<div>VOLUME	vol-3b972150</div>
<div>Volume vol-3b972150 deleted at Mon May 23 11:02:48 MDT 2011</div>
<div>ATTACHMENT	vol-3797215c	i-6fc30f01	/dev/sdk2	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-3797215c to detach</div>
<div>VOLUME	vol-3797215c</div>
<div>Volume vol-3797215c deleted at Mon May 23 11:03:01 MDT 2011</div>
<div>ATTACHMENT	vol-1d972176	i-6fc30f01	/dev/sdk3	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-1d972176 to detach</div>
<div>VOLUME	vol-1d972176</div>
<div>Volume vol-1d972176 deleted at Mon May 23 11:03:13 MDT 2011</div>
<div>ATTACHMENT	vol-ef972184	i-6fc30f01	/dev/sdk4	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-ef972184 to detach</div>
<div>VOLUME	vol-ef972184</div>
<div>Volume vol-ef972184 deleted at Mon May 23 11:03:26 MDT 2011</div>
<div>ATTACHMENT	vol-fd972196	i-6fc30f01	/dev/sdk5	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-fd972196 to detach</div>
<div>VOLUME	vol-fd972196</div>
<div>Volume vol-fd972196 deleted at Mon May 23 11:03:38 MDT 2011</div>
<div>ATTACHMENT	vol-c19721aa	i-6fc30f01	/dev/sdk6	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-c19721aa to detach</div>
<div>VOLUME	vol-c19721aa</div>
<div>Volume vol-c19721aa deleted at Mon May 23 11:03:51 MDT 2011</div>
<div>ATTACHMENT	vol-af9721c4	i-6fc30f01	/dev/sdk7	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-af9721c4 to detach</div>
<div>VOLUME	vol-af9721c4</div>
<div>Volume vol-af9721c4 deleted at Mon May 23 11:04:03 MDT 2011</div>
<div>ATTACHMENT	vol-a59721ce	i-6fc30f01	/dev/sdk8	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-a59721ce to detach</div>
<div>VOLUME	vol-a59721ce</div>
<div>Volume vol-a59721ce deleted at Mon May 23 11:04:16 MDT 2011</div>
<div>ATTACHMENT	vol-8d9721e6	i-6fc30f01	/dev/sdk9	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-8d9721e6 to detach</div>
<div>VOLUME	vol-8d9721e6</div>
<div>Volume vol-8d9721e6 deleted at Mon May 23 11:04:28 MDT 2011</div>
<div>ATTACHMENT	vol-9d9721f6	i-6fc30f01	/dev/sdk10	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-9d9721f6 to detach</div>
<div>VOLUME	vol-9d9721f6</div>
<div>Volume vol-9d9721f6 deleted at Mon May 23 11:04:41 MDT 2011</div>
<div>ATTACHMENT	vol-33942258	i-6fc30f01	/dev/sdk11	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-33942258 to detach</div>
<div>VOLUME	vol-33942258</div>
<div>Volume vol-33942258 deleted at Mon May 23 11:04:53 MDT 2011</div>
<div>ATTACHMENT	vol-1794227c	i-6fc30f01	/dev/sdk12	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-1794227c to detach</div>
<div>VOLUME	vol-1794227c</div>
<div>Volume vol-1794227c deleted at Mon May 23 11:05:06 MDT 2011</div>
<div>ATTACHMENT	vol-fb942290	i-6fc30f01	/dev/sdk13	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-fb942290 to detach</div>
<div>VOLUME	vol-fb942290</div>
<div>Volume vol-fb942290 deleted at Mon May 23 11:05:19 MDT 2011</div>
<div>ATTACHMENT	vol-d99422b2	i-6fc30f01	/dev/sdk14	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-d99422b2 to detach</div>
<div>VOLUME	vol-d99422b2</div>
<div>Volume vol-d99422b2 deleted at Mon May 23 11:05:31 MDT 2011</div>
<div>ATTACHMENT	vol-839422e8	i-6fc30f01	/dev/sdl1	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-839422e8 to detach</div>
<div>VOLUME	vol-839422e8</div>
<div>Volume vol-839422e8 deleted at Mon May 23 11:05:44 MDT 2011</div>
<div>ATTACHMENT	vol-9d9422f6	i-6fc30f01	/dev/sdl2	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-9d9422f6 to detach</div>
<div>VOLUME	vol-9d9422f6</div>
<div>Volume vol-9d9422f6 deleted at Mon May 23 11:05:56 MDT 2011</div>
<div>ATTACHMENT	vol-6595230e	i-6fc30f01	/dev/sdl3	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-6595230e to detach</div>
<div>VOLUME	vol-6595230e</div>
<div>Volume vol-6595230e deleted at Mon May 23 11:06:10 MDT 2011</div>
<div>ATTACHMENT	vol-7d952316	i-6fc30f01	/dev/sdl4	detaching	2011-05-23T16:15:08+0000</div>
<div>Waiting for vol-7d952316 to detach</div>
<div>VOLUME	vol-7d952316</div>
<div>Volume vol-7d952316 deleted at Mon May 23 11:06:22 MDT 2011</div>
<div>real	12m38.753s</div>
<div>user	18m46.140s</div>
<div>sys	0m38.000s</div>
<div class="shr-publisher-274"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F05%2F23%2Fdelete-lots-of-ec2-ebs-volumes%2F' data-shr_title='Delete+lots+of+EC2+EBS+volumes'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F05%2F23%2Fdelete-lots-of-ec2-ebs-volumes%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F05%2F23%2Fdelete-lots-of-ec2-ebs-volumes%2F' data-shr_title='Delete+lots+of+EC2+EBS+volumes'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><p>Related posts:<ol>
<li><a href='http://www.jonzobrist.com/2011/05/04/my-ec2-ebs-raid-0-creation-script/' rel='bookmark' title='My EC2 EBS RAID-0 creation script'>My EC2 EBS RAID-0 creation script</a> <small>I want to write up a full howto/tutorial, but have...</small></li>
<li><a href='http://www.jonzobrist.com/2011/04/16/ec2-raid0-on-linux-with-ebs-volumes-notes/' rel='bookmark' title='EC2 RAID0 on Linux with EBS volumes notes'>EC2 RAID0 on Linux with EBS volumes notes</a> <small>&nbsp; I&#8217;m almost done with my publish / post of...</small></li>
<li><a href='http://www.jonzobrist.com/2011/03/19/s3-du-sh-script-to-get-bucket-size-on-amazon-aws-s3/' rel='bookmark' title='S3-du.sh script to get bucket size on Amazon AWS S3'>S3-du.sh script to get bucket size on Amazon AWS S3</a> <small>Here is my script s3-du.sh that I wrote to determine...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jonzobrist.com/2011/05/23/delete-lots-of-ec2-ebs-volumes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My EC2 EBS RAID-0 creation script</title>
		<link>http://www.jonzobrist.com/2011/05/04/my-ec2-ebs-raid-0-creation-script/</link>
		<comments>http://www.jonzobrist.com/2011/05/04/my-ec2-ebs-raid-0-creation-script/#comments</comments>
		<pubDate>Thu, 05 May 2011 05:53:56 +0000</pubDate>
		<dc:creator>Jon Zobrist</dc:creator>
				<category><![CDATA[AWS]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[EBS]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Support - Servers]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[RAID-0]]></category>
		<category><![CDATA[RAID0]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://jonzobrist.com/?p=261</guid>
		<description><![CDATA[I want to write up a full howto/tutorial, but have not had the time. Here is the script that I referred to in my post at http://jonzobrist.com/2011/04/16/ec2-raid0-on-linux-with-ebs-volumes-notes/ This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR [...]
Related posts:<ol>
<li><a href='http://www.jonzobrist.com/2011/03/19/s3-du-sh-script-to-get-bucket-size-on-amazon-aws-s3/' rel='bookmark' title='S3-du.sh script to get bucket size on Amazon AWS S3'>S3-du.sh script to get bucket size on Amazon AWS S3</a> <small>Here is my script s3-du.sh that I wrote to determine...</small></li>
<li><a href='http://www.jonzobrist.com/2011/04/16/ec2-raid0-on-linux-with-ebs-volumes-notes/' rel='bookmark' title='EC2 RAID0 on Linux with EBS volumes notes'>EC2 RAID0 on Linux with EBS volumes notes</a> <small>&nbsp; I&#8217;m almost done with my publish / post of...</small></li>
<li><a href='http://www.jonzobrist.com/2011/04/21/getting-started-with-chef/' rel='bookmark' title='Getting started with Chef.'>Getting started with Chef.</a> <small>I write a lot of scripts, configure a lot of...</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F05%2F04%2Fmy-ec2-ebs-raid-0-creation-script%2F' data-shr_title='My+EC2+EBS+RAID-0+creation+script'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F05%2F04%2Fmy-ec2-ebs-raid-0-creation-script%2F' data-shr_title='My+EC2+EBS+RAID-0+creation+script'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://jonzobrist.com/wp-content/uploads/2011/05/20110504-114718.jpg"><img class="alignleft size-medium wp-image-263" title="20110504-114718.jpg" src="http://jonzobrist.com/wp-content/uploads/2011/05/20110504-114718-224x300.jpg" alt="" width="224" height="300" /></a></p>
<p>I want to write up a full howto/tutorial, but have not had the time.</p>
<p>Here is the script that I referred to in my post at <a title="EC2 RAID0 on Linux" href="http://jonzobrist.com/2011/04/16/ec2-raid0-on-linux-with-ebs-volumes-notes/">http://jonzobrist.com/2011/04/16/ec2-raid0-on-linux-with-ebs-volumes-notes/</a></p>
<p>This program  is  distributed in  the  hope that it will  be  useful but WITHOUT ANY  WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY  or  FITNESS  FOR  A  PARTICULAR  PURPOSE.  See  the <a title="GNU Public License" href="http://www.gnu.org/licenses/gpl.html" target="_blank">GNU General Public License HERE </a>for more details.</p>
<p><a href="../files/setup-ec2-raid-0.zip" target="_blank">http://jonzobrist.com/files/setup-ec2-raid-0.zip</a></p>
<p><a href="http://jonzobrist.com/files/setup-ec2-raid-0.sh.gz" target="_blank">http://jonzobrist.com/files/setup-ec2-raid-0.sh.gz</a></p>
<p>This script needs an AWS command line setup, and may need some minor tweaking if you&#8217;re not running a Ubuntu server.</p>
<p>Ubuntu&#8217;s latest AMI&#8217;s are available for <a title="Ubuntu 10.04 UEC EC2 AMIs" href="http://uec-images.ubuntu.com/releases/10.04/release/" target="_blank">10.04 here.</a></p>
<p>Please feel free to submit patches, comments, or questions.</p>
<p>Thanks to everyone whose helpful posts online and in the AWS forums helped me with this script. I could not have done it with out your generous sharing of work.</p>
<p>Enjoy!</p>
<p>&nbsp;</p>
<div class="shr-publisher-261"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F05%2F04%2Fmy-ec2-ebs-raid-0-creation-script%2F' data-shr_title='My+EC2+EBS+RAID-0+creation+script'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F05%2F04%2Fmy-ec2-ebs-raid-0-creation-script%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F05%2F04%2Fmy-ec2-ebs-raid-0-creation-script%2F' data-shr_title='My+EC2+EBS+RAID-0+creation+script'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><p>Related posts:<ol>
<li><a href='http://www.jonzobrist.com/2011/03/19/s3-du-sh-script-to-get-bucket-size-on-amazon-aws-s3/' rel='bookmark' title='S3-du.sh script to get bucket size on Amazon AWS S3'>S3-du.sh script to get bucket size on Amazon AWS S3</a> <small>Here is my script s3-du.sh that I wrote to determine...</small></li>
<li><a href='http://www.jonzobrist.com/2011/04/16/ec2-raid0-on-linux-with-ebs-volumes-notes/' rel='bookmark' title='EC2 RAID0 on Linux with EBS volumes notes'>EC2 RAID0 on Linux with EBS volumes notes</a> <small>&nbsp; I&#8217;m almost done with my publish / post of...</small></li>
<li><a href='http://www.jonzobrist.com/2011/04/21/getting-started-with-chef/' rel='bookmark' title='Getting started with Chef.'>Getting started with Chef.</a> <small>I write a lot of scripts, configure a lot of...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jonzobrist.com/2011/05/04/my-ec2-ebs-raid-0-creation-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started with Chef.</title>
		<link>http://www.jonzobrist.com/2011/04/21/getting-started-with-chef/</link>
		<comments>http://www.jonzobrist.com/2011/04/21/getting-started-with-chef/#comments</comments>
		<pubDate>Thu, 21 Apr 2011 17:08:48 +0000</pubDate>
		<dc:creator>Jon Zobrist</dc:creator>
				<category><![CDATA[AWS]]></category>
		<category><![CDATA[Chef]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Support - Servers]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[chef]]></category>
		<category><![CDATA[knife]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://jonzobrist.com/?p=249</guid>
		<description><![CDATA[I write a lot of scripts, configure a lot of systems, and do a lot of snapshot related backup/restore/sync stuff on servers in house, and in the cloud. Chef is a Ruby-based configuration management engine. There is a good intro here. I set up a Chef Server. There&#8217;s a good overview here. I followed the [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F04%2F21%2Fgetting-started-with-chef%2F' data-shr_title='Getting+started+with+Chef.'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F04%2F21%2Fgetting-started-with-chef%2F' data-shr_title='Getting+started+with+Chef.'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I write a lot of scripts, configure a lot of systems, and do a lot of snapshot related backup/restore/sync stuff on servers in house, and in the cloud.<br />
Chef is a Ruby-based configuration management engine. There is a good intro <a title="Chef information" href="http://www.rubyinside.com/chef-tasty-server-configuraiton-2162.html">here</a>.</p>
<p>I set up a Chef Server. There&#8217;s a good overview <a title="Chef Server Setup" href="http://vagrantup.com/docs/provisioners/chef_server.html">here.</a></p>
<p>I followed the instructions to setup a Chef server from this <a title="Setup Chef with RubyGems" href="http://wiki.opscode.com/display/chef/Bootstrap+Chef+RubyGems+Installation">Wiki on Opscode.</a></p>
<p>I also referred to the information from Grig Gheorghiu&#8217;s blog <a title="Chef installation and minimal configuration" href="http://agiletesting.blogspot.com/2010/07/chef-installation-and-minimal.html">here</a>.</p>
<p>Now that my server is up, I&#8217;m hoping to port my server configurations to Chef, with heavy reliance on <a title="Amazon EC2 AWS" href="http://aws.amazon.com/ec2/">EC2</a> and hopefully <a title="Ubuntu Enterprise Cloud UEC" href="http://www.ubuntu.com/business/cloud/overview">UEC</a>.</p>
<div class="shr-publisher-249"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F04%2F21%2Fgetting-started-with-chef%2F' data-shr_title='Getting+started+with+Chef.'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F04%2F21%2Fgetting-started-with-chef%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F04%2F21%2Fgetting-started-with-chef%2F' data-shr_title='Getting+started+with+Chef.'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jonzobrist.com/2011/04/21/getting-started-with-chef/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>LCOD &#8211; 7.24.10 &#8211; Get su to respect /etc/security/limits.conf</title>
		<link>http://www.jonzobrist.com/2010/07/24/lcod-7-24-10-get-su-to-respect-etcsecuritylimits-conf/</link>
		<comments>http://www.jonzobrist.com/2010/07/24/lcod-7-24-10-get-su-to-respect-etcsecuritylimits-conf/#comments</comments>
		<pubDate>Sat, 24 Jul 2010 14:00:29 +0000</pubDate>
		<dc:creator>Jon Zobrist</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Command of the Day]]></category>
		<category><![CDATA[Linux Support - Servers]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[pam]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://jonzobrist.com/?p=151</guid>
		<description><![CDATA[Get su to respect settings in /etc/security/limits.conf
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2010%2F07%2F24%2Flcod-7-24-10-get-su-to-respect-etcsecuritylimits-conf%2F' data-shr_title='LCOD+-+7.24.10+-+Get+su+to+respect+%2Fetc%2Fsecurity%2Flimits.conf'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2010%2F07%2F24%2Flcod-7-24-10-get-su-to-respect-etcsecuritylimits-conf%2F' data-shr_title='LCOD+-+7.24.10+-+Get+su+to+respect+%2Fetc%2Fsecurity%2Flimits.conf'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>No idea why this isn&#8217;t the default on the latest Ubuntu, as it is for every other service in /etc/pam.d/</p>
<p>Edit /etc/pam.d/su</p>
<p>Find, and uncomment the line that says</p>
<p># session    required   pam_limits.so</p>
<p>Changes take effect on use, so you&#8217;ll have to re-su to get this to take effect.</p>
<div class="shr-publisher-151"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2010%2F07%2F24%2Flcod-7-24-10-get-su-to-respect-etcsecuritylimits-conf%2F' data-shr_title='LCOD+-+7.24.10+-+Get+su+to+respect+%2Fetc%2Fsecurity%2Flimits.conf'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2010%2F07%2F24%2Flcod-7-24-10-get-su-to-respect-etcsecuritylimits-conf%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2010%2F07%2F24%2Flcod-7-24-10-get-su-to-respect-etcsecuritylimits-conf%2F' data-shr_title='LCOD+-+7.24.10+-+Get+su+to+respect+%2Fetc%2Fsecurity%2Flimits.conf'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jonzobrist.com/2010/07/24/lcod-7-24-10-get-su-to-respect-etcsecuritylimits-conf/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>LCOD – 4.12.10 – Quick Mysqlreport to e-mail setup</title>
		<link>http://www.jonzobrist.com/2010/04/12/lcod-%e2%80%93-4-12-10-%e2%80%93-quick-mysqlreport-to-e-mail-setup/</link>
		<comments>http://www.jonzobrist.com/2010/04/12/lcod-%e2%80%93-4-12-10-%e2%80%93-quick-mysqlreport-to-e-mail-setup/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 00:31:57 +0000</pubDate>
		<dc:creator>Jon Zobrist</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Command of the Day]]></category>
		<category><![CDATA[MySQL Server Support]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://jonzobrist.com/?p=118</guid>
		<description><![CDATA[This will be a quick install to setup your server to e-mail you daily mysql reports using the cool mysqlreport application at hackmysql.com
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2010%2F04%2F12%2Flcod-%25e2%2580%2593-4-12-10-%25e2%2580%2593-quick-mysqlreport-to-e-mail-setup%2F' data-shr_title='LCOD+%E2%80%93+4.12.10+%E2%80%93+Quick+Mysqlreport+to+e-mail+setup'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2010%2F04%2F12%2Flcod-%25e2%2580%2593-4-12-10-%25e2%2580%2593-quick-mysqlreport-to-e-mail-setup%2F' data-shr_title='LCOD+%E2%80%93+4.12.10+%E2%80%93+Quick+Mysqlreport+to+e-mail+setup'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>This will be a quick install to setup your server to e-mail you daily mysql reports using the cool mysqlreport application at <a title="MySQL Report" href="http://hackmysql.com/mysqlreport">hackmysql.com</a></p>
<p>As the user you want to set this up on, run the following commands.</p>
<p>(Note that I touch and then chmod og-rwx the .my.cnf file, since you&#8217;re putting your users mysql password in it, creating it and making it unreadable before editing is always a good idea.)</p>
<pre>wget http://hackmysql.com/scripts/mysqlreport
chmod uog+x mysqlreport
mkdir bin logs
mv mysqlreport bin/
touch ~/.my.cnf
chmod og-rwx ~/.my.cnf
vi ~/.my.cnf
</pre>
<p>Now, put in a client section like this in, you can find your sock file with grep sock /etc/my.cnf, or grep sock /etc/mysql/my.cnf</p>
<pre>[client]</pre>
<pre>user="root"</pre>
<pre>password="password"</pre>
<pre>socket=/var/run/mysqld/mysqld.sock</pre>
<p>Now, install perl&#8217;s DBD::MySQL</p>
<p>Debian/Ubuntu:</p>
<pre>sudo su</pre>
<pre>apt-get install libdbd-mysql-perl</pre>
<p>via CPAN/Other Linux/Generic BSD:</p>
<pre>perl -MCPAN -e shell</pre>
<p>Optional, update CPAN:</p>
<pre>install Bundle::CPAN</pre>
<pre>reload cpan</pre>
<p>(If there are errors on following some dependencies exit, and restart your CPAN shell, then start with install Bundle::CPAN)<br />
Install perl DBI</p>
<pre>install DBD::mysql
exit
</pre>
<p>Now, run it to test, you should see a bunch of text output</p>
<pre>~/bin/mysqlreport
</pre>
<p>Now, set it up to run from cron</p>
<pre>
crontab -e
</pre>
<p>Add a line like this (this will email to test@example.com a full report nightly at midnight, and put the last nights report in /home/USERNAME/logs/mysqlreport)</p>
<pre>
0 0 * * * /home/USERNAME/bin/mysqlreport --email test@example.com &gt; /home/USERNAME/logs/mysqlreport.log 2&gt;&amp;1
</pre>
<div class="shr-publisher-118"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2010%2F04%2F12%2Flcod-%25e2%2580%2593-4-12-10-%25e2%2580%2593-quick-mysqlreport-to-e-mail-setup%2F' data-shr_title='LCOD+%E2%80%93+4.12.10+%E2%80%93+Quick+Mysqlreport+to+e-mail+setup'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2010%2F04%2F12%2Flcod-%25e2%2580%2593-4-12-10-%25e2%2580%2593-quick-mysqlreport-to-e-mail-setup%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2010%2F04%2F12%2Flcod-%25e2%2580%2593-4-12-10-%25e2%2580%2593-quick-mysqlreport-to-e-mail-setup%2F' data-shr_title='LCOD+%E2%80%93+4.12.10+%E2%80%93+Quick+Mysqlreport+to+e-mail+setup'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jonzobrist.com/2010/04/12/lcod-%e2%80%93-4-12-10-%e2%80%93-quick-mysqlreport-to-e-mail-setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LCOD &#8211; 6.18.09 Useful command line grepping (grep!)</title>
		<link>http://www.jonzobrist.com/2009/06/18/lcod-6-18-09-useful-command-line-grepping-grep/</link>
		<comments>http://www.jonzobrist.com/2009/06/18/lcod-6-18-09-useful-command-line-grepping-grep/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 05:49:45 +0000</pubDate>
		<dc:creator>Jon Zobrist</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Command of the Day]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[grep]]></category>

		<guid isPermaLink="false">http://jonzobrist.com/?p=96</guid>
		<description><![CDATA[There are a few regular expressions I find myself using all the time via grep on the command line. Here are a few, along with a few frequently used commands I can&#8217;t live without. Find the non comment parts of a file. (Useful if you want to see or compare the active parts of a [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2009%2F06%2F18%2Flcod-6-18-09-useful-command-line-grepping-grep%2F' data-shr_title='LCOD+-+6.18.09+Useful+command+line+grepping+%28grep%21%29+'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2009%2F06%2F18%2Flcod-6-18-09-useful-command-line-grepping-grep%2F' data-shr_title='LCOD+-+6.18.09+Useful+command+line+grepping+%28grep%21%29+'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>There are a few regular expressions I find myself using all the time via grep on the command line. Here are a few, along with a few frequently used commands I can&#8217;t live without.</p>
<p>Find the non comment parts of a file.<br />
(Useful if you want to see or compare the active parts of a config file.)<br />
Most Unix config files use # as a comment tag, indicating everything after the # is a comment.<br />
 grep &#8216;^[^#]&#8216; filename.conf</p>
<p>To break this down, first we have grep , which is a command line program to find lines that match a regular expression pattern, and display them. The single quotes indicate that we&#8217;re passing the entire section enclosed in single quotes as the first argument, which doesn&#8217;t matter as much in this example, but it&#8217;s good to practice, so when you have a space or some other character, you won&#8217;t be confused when your shell interprits it. The regular expression used is<br />
^[^#]<br />
Which is slightly trick, as far as regular expressions go, for only one reason; the character ^ is used twice, with different meanings.<br />
Normally the ^ is regular expression for the start of a line, and we use it here as this, the first time. The second time, inside the brackets, it means NOT.<br />
Brackets in regular expressions are like a giant OR statement, with every non-escape character (like the forward slash / ) as a possible match. This can hang people up when they expect [bob] to match the full word bob, instead of just the first b.<br />
Then we have the #, which just matches our comment character, #.<br />
Then the closing bracket, since we&#8217;re not doing any other options.<br />
The net result of this is to match any line that has a # right after the start of the line.</p>
<p>To do the same thing on a config file that uses a ; as a comment indicator:<br />
grep &#8216;^[;]&#8216; filename.conf</p>
<p>OR, to be even trickier, you could just add the # and ; in the same set of brackets, like<br />
grep &#8216;^[;#] fliename.conf</p>
<p>Note the order of items inside the bracket doesn&#8217;t really matter in this case.</p>
<p>Next, often times I have a file with a bunch of empty lines in it, and I want to quickly get rid of them all. To do this I use a combination of a simple grep and a output redirect.</p>
<p>grep . filename<br />
The . character is a regular expression match for any character, but it won&#8217;t match empty lines (the regular expression ^$ does though).<br />
To get this into the file, first redirect it to a new file, then move the file back.<br />
 grep . filename > newfile<br />
mv newfile filename</p>
<p>or, if you want to sort, just run<br />
sort newfile > filename</p>
<p>perhaps you now want to just get the unique lines<br />
uniq newfile > filename</p>
<p>Of course, I should mention the very obvious ones.<br />
Grepping for words in files.</p>
<p>grep Word filename</p>
<p>Note that grep is case sensitive, but you can turn that off with the -i flag.</p>
<p> grep -i word filename</p>
<p>There is an infinite amount of uses for grep, but the foundation for grep/sed/awk/perl use for patterns is regular expressions. More than any single book I&#8217;ve read about techonlogy, the O&#8217;Reilly book &#8220;Mastering Regular Expressions&#8221;, by Jeffrey Friedl has helped me the most in my IT career. I highly suggest you buy and read it.</p>
<div class="shr-publisher-96"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2009%2F06%2F18%2Flcod-6-18-09-useful-command-line-grepping-grep%2F' data-shr_title='LCOD+-+6.18.09+Useful+command+line+grepping+%28grep%21%29+'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2009%2F06%2F18%2Flcod-6-18-09-useful-command-line-grepping-grep%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2009%2F06%2F18%2Flcod-6-18-09-useful-command-line-grepping-grep%2F' data-shr_title='LCOD+-+6.18.09+Useful+command+line+grepping+%28grep%21%29+'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jonzobrist.com/2009/06/18/lcod-6-18-09-useful-command-line-grepping-grep/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LCOD 2.23.09 Setup Polycom Soundstation 6000 w/Asterisk</title>
		<link>http://www.jonzobrist.com/2009/02/23/lcod-2-23-09-setup-polycom-soundstation-6000-wasterisk/</link>
		<comments>http://www.jonzobrist.com/2009/02/23/lcod-2-23-09-setup-polycom-soundstation-6000-wasterisk/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 05:48:07 +0000</pubDate>
		<dc:creator>Jon Zobrist</dc:creator>
				<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Command of the Day]]></category>
		<category><![CDATA[VoiP]]></category>

		<guid isPermaLink="false">http://jonzobrist.com/?p=94</guid>
		<description><![CDATA[Setup/install notes, Polycom Soundstation IP 6000 with Asterisk 1.4 Have tftp setup, in this we use /tftpboot as the main tftp folder, and it&#8217;s world readable/writable, (LIMIT ACCESS VIA IPTABLES/FIREWALL/SOMETHING) Have a dhcp server setup that&#8217;s giving out the normal things for SIP phones, option tftp-server-name &#8220;[ASTERISK-SERVER-IP"; option time-offset -23400; # Mountain Standard Time option [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2009%2F02%2F23%2Flcod-2-23-09-setup-polycom-soundstation-6000-wasterisk%2F' data-shr_title='LCOD+2.23.09+Setup+Polycom+Soundstation+6000+w%2FAsterisk+'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2009%2F02%2F23%2Flcod-2-23-09-setup-polycom-soundstation-6000-wasterisk%2F' data-shr_title='LCOD+2.23.09+Setup+Polycom+Soundstation+6000+w%2FAsterisk+'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Setup/install notes, Polycom Soundstation IP 6000 with Asterisk 1.4</p>
<p>Have tftp setup, in this we use /tftpboot as the main tftp folder, and it&#8217;s world readable/writable, (LIMIT ACCESS VIA IPTABLES/FIREWALL/SOMETHING)<br />
Have a dhcp server setup that&#8217;s giving out the normal things for SIP phones,<br />
  option tftp-server-name &#8220;[ASTERISK-SERVER-IP";<br />
  option time-offset              -23400; # Mountain Standard Time<br />
  option ntp-servers              10.0.2.1;</p>
<p>Have asterisk up and running, make a SIP extension/entry like you would for a normal SIP client, although don't use type=friend, use type=peer<br />
like this for extension 101, username 101, password temp<br />
[101]<br />
type=peer<br />
username=101<br />
secret=temp<br />
host=dynamic<br />
context=[your default context for phones]<br />
qualify=150<br />
accountcode=[optional accounting code]<br />
mailbox=[extension for mailbox]</p>
<p>reload asterisk&#8217;s sip module<br />
asterisk -vvvngrd<br />
asterisk*>CLI>sip reload</p>
<p>Setup the Polycom:<br />
download the latest rpm for firmware for trixbox from</p>
<p>http://yum.trixbox.org/centos/5/RPMS/</p>
<p>this time it was:</p>
<p>http://yum.trixbox.org/centos/5/RPMS/firmware-polycom-3.0.1-2.noarch.rpm</p>
<p>unzip this, put the tftpboot files into your tftpboot dir, put the setup-polycom.rpm_tmp_update in<br />
/usr/local/sbin/setup-polycom.rpm_tmp_update</p>
<p>check which NIC your asterisk interface system is on and run<br />
/usr/local/sbin/setup-polycom.rpm_tmp_update</p>
<p>(my ntp server doesn&#8217;t like our SIP clients sntp requests, so I use time.nist.gov and nat that outbound for the phones)<br />
edit /tftpboot/server.cfg<br />
change<br />
   tcpIpApp.sntp.address=&#8221;192.43.244.18&#8243;</p>
<p>Now download the latest version of the sip firwmare from polycom</p>
<p>http://downloads.polycom.com/voice/voip/sp_ss_sip/spip_ssip_3_1_2_release_sig_combined.zip</p>
<p>unzip and put all the files in /tftpboot/</p>
<p>edit /tftpboot/000000000000.cfg<br />
add server.cfg on the CONFIG_FILES line, so mine looks like this<br />
<APPLICATION APP_FILE_PATH="sip.ld" CONFIG_FILES="server.cfg, phone1.cfg, sip.cfg" MISC_FILES="" LOG_FILE_DIRECTORY="" OVERRIDES_DIRECTORY="" CONTACTS_DIRECTORY="" LICENSE_DIRECTORY=""></p>
<p>note there were 2 other application lines but i left them the same as they looked like they were for SPIP300/500&#8242;s</p>
<p>now, per conference phone, copy the /tftpboot/000000000000.cfg to /tftpboot/[phone mac address].cfg<br />
the mac address is also the serial number of the phone (on the back!)<br />
I&#8217;m not sure if it&#8217;s case sensitive but I did all lower case and it worked, tail your tftp servers logs to see what&#8217;s getting requested.</p>
<p>edit the /tftpboot/[phone mac address].cfg<br />
on the line where you added server.cfg, add a custom config for this device, calling it whatever you want, so if you wanted, call it conference1.cfg, your application line would look like:<br />
<APPLICATION APP_FILE_PATH="sip.ld" CONFIG_FILES="conference1.cfg, server.cfg, phone1.cfg, sip.cfg" MISC_FILES="" LOG_FILE_DIRECTORY="" OVERRIDES_DIRECTORY="" CONTACTS_DIRECTORY="" LICENSE_DIRECTORY=""></p>
<p>now edit that file /tftpboot/conference1.cfg (or whatever you called it)<br />
username and password should match what you put in asterisk&#8217;s sip.conf<br />
it should look something like this</p>
<p><?xml version="1.0" encoding="UTF-8" standalone="yes"?><br />
<!-- Per-phone configuration in this file --><br />
<reginfo><br />
  <reg<br />
        reg.1.displayName="PhoneName"<br />
        reg.1.address="101"<br />
        reg.1.label="101"<br />
        reg.1.auth.userId="101"<br />
        reg.1.auth.password="password"<br />
        reg.1.lineKeys="6"<br />
   /><br />
</reginfo></p>
<p>I mostly followed the directions from here (I am using a self compiled asterisk, version 1.4.19.1 on Gentoo Linux, not trixbox)</p>
<p>http://www.sureteq.com/asterisk/polycom.htm</p>
<p>and used the following links for reference:</p>
<p>http://www.voip-info.org/wiki/view/polycom+trixbox</p>
<p>http://www.voip-info.org/wiki/view/Polycom+Phones</p>
<p>http://www.polycom.com/support/voice/soundstation_ip_series/soundstation_ip6000.html</p>
<p>http://blog.voipsupply.com/new-products/polycom-sip-firmware-31-released-whats-in-it-for-me</p>
<p>http://blog.voipsupply.com/voip-software/unleash-your-polycom-soundpoint-ip-phone%e2%80%a6introducing-the-polycom-productivity-suite-package</p>
<p>http://yum.trixbox.org/centos/5/RPMS/repodata/repoview/firmware-polycom-0-3.0.1-2.html</p>
<p>http://www.voip-info.org/wiki/view/Asterisk%40Home+Handbook+Wiki+Chapter+7#7224HowtouseProvisioningCentralBootServe</p>
<p>http://www.asteriskvoipnews.com/polycom/polycom_releases_soundstation_ip_7000_and_ip_6000_conference_phone.html</p>
<div class="shr-publisher-94"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2009%2F02%2F23%2Flcod-2-23-09-setup-polycom-soundstation-6000-wasterisk%2F' data-shr_title='LCOD+2.23.09+Setup+Polycom+Soundstation+6000+w%2FAsterisk+'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2009%2F02%2F23%2Flcod-2-23-09-setup-polycom-soundstation-6000-wasterisk%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2009%2F02%2F23%2Flcod-2-23-09-setup-polycom-soundstation-6000-wasterisk%2F' data-shr_title='LCOD+2.23.09+Setup+Polycom+Soundstation+6000+w%2FAsterisk+'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jonzobrist.com/2009/02/23/lcod-2-23-09-setup-polycom-soundstation-6000-wasterisk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

