<?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>beer planet &#187; Linux</title> <atom:link href="http://beerpla.net/category/linux/feed/" rel="self" type="application/rss+xml" /><link>http://beerpla.net</link> <description>where things have nothing to do with beer - tutorials, tips, how-tos, thoughts, hacks, and other techy nonsense</description> <lastBuildDate>Thu, 17 May 2012 22:50:53 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <atom:link rel='hub' href='http://beerpla.net/?pushpress=hub'/> <item><title>How To Display Just The HTTP Response Code In Command Line Curl</title><link>http://beerpla.net/2010/06/10/how-to-display-just-the-http-response-code-in-cli-curl/</link> <comments>http://beerpla.net/2010/06/10/how-to-display-just-the-http-response-code-in-cli-curl/#comments</comments> <pubDate>Fri, 11 Jun 2010 05:49:05 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Tips]]></category> <category><![CDATA[code]]></category> <category><![CDATA[curl]]></category> <category><![CDATA[custom]]></category> <category><![CDATA[format]]></category> <category><![CDATA[http]]></category> <category><![CDATA[response]]></category> <guid
isPermaLink="false">http://beerpla.net/2010/06/10/how-to-display-just-the-http-response-code-in-cli-curl/</guid> <description><![CDATA[<p>Today, I was looking for a quick way to see HTTP response codes of a bunch of urls. Naturally, I turned to the <strong><em>curl</em></strong> command, which I would usually use like this:</p><div
class="wp_syntax"><div
class="code"><pre>curl -IL &#34;URL&#34;</pre></div></div><p>This command would send a HEAD request (-I), follow through all redirects (-L), and display some useful information in the end. Most of the time it&#039;s ideal:</p><div
class="wp_syntax"><div
class="code"><pre>curl -IL &#34;http://www.google.com&#34;
&#160;
HTTP/1.1 200 OK
Date: Fri, 11 Jun 2010 03:58:55 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
Server: gws
X-XSS-Protection: 1; mode=block
Transfer-Encoding: chunked</pre></div></div><p>However, the server I was curling didn&#039;t support HEAD requests explicitly. Additionally, I was really only interested in HTTP status codes and not in the rest of the output. ...<div
class=clear></div> <a
href="http://beerpla.net/2010/06/10/how-to-display-just-the-http-response-code-in-cli-curl/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description> <content:encoded><![CDATA[<p>Today, I was looking for a quick way to see HTTP response codes of a bunch of urls. Naturally, I turned to the <strong><em>curl</em></strong> command, which I would usually use like this:</p><div
class="wp_syntax"><div
class="code"><pre>curl -IL &quot;URL&quot;</pre></div></div><p>This command would send a HEAD request (-I), follow through all redirects (-L), and display some useful information in the end. Most of the time it&#039;s ideal:</p><div
class="wp_syntax"><div
class="code"><pre>curl -IL &quot;http://www.google.com&quot;
&nbsp;
HTTP/1.1 200 OK
Date: Fri, 11 Jun 2010 03:58:55 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
Server: gws
X-XSS-Protection: 1; mode=block
Transfer-Encoding: chunked</pre></div></div><p>However, the server I was curling didn&#039;t support HEAD requests explicitly. Additionally, I was really only interested in HTTP status codes and not in the rest of the output. This means I would have to change my strategy and issue GET requests, ignoring HTML output completely.</p><p>Curl manual to the rescue. A few minutes later, I came up with the following, which served my needs perfectly:</p><div
class="wp_syntax"><div
class="code"><pre>curl -sL -w &quot;%{http_code} %{url_effective}\\n&quot; &quot;URL&quot; -o /dev/null</pre></div></div><p>Here is a sample of what comes out:</p><div
class="wp_syntax"><div
class="code"><pre>curl -sL -w &quot;%{http_code} %{url_effective}\\n&quot; &quot;http://www.amazon.com/Kindle-Wireless-Reading-Display-Generation/dp/B0015T963C?tag=androidpolice-20&quot; -o /dev/null
&nbsp;
200 http://www.amazon.com/Kindle-Wireless-Reading-Display-Generation/dp/B0015T963C</pre></div></div><p>Here, -s silences curl&#039;s progress output, -L follows all redirects as before, -w prints the report using a custom format, and -o redirects curl&#039;s HTML output to /dev/null.</p><p>Here are the other special variables available in case you want to customize the output some more:</p><ul><li>url_effective</li><li>http_code</li><li>http_connect</li><li>time_total</li><li>time_namelookup</li><li>time_connect</li><li>time_pretransfer</li><li>time_redirect</li><li>time_starttransfer</li><li>size_download</li><li>size_upload</li><li>size_header</li><li>size_request</li><li>speed_download</li><li>speed_upload</li><li>content_type</li><li>num_connects</li><li>num_redirects</li><li>ftp_entry_path</li></ul><p>Is there a better way to do this with curl? Perhaps, but this way offers the most flexibility, as I am in control of all the formatting.</p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Display+Just+The+HTTP+Response+Code+In+Command+Line+Curl&amp;link=http://beerpla.net/2010/06/10/how-to-display-just-the-http-response-code-in-cli-curl/&amp;notes=Today%2C%20I%20was%20looking%20for%20a%20quick%20way%20to%20see%20HTTP%20response%20codes%20of%20a%20bunch%20of%20urls.%20Naturally%2C%20I%20turned%20to%20the%20curl%20command%2C%20which%20I%20would%20usually%20use%20like%20this%3A%0D%0Acurl%20-IL%20%26quot%3BURL%26quot%3BThis%20command%20would%20send%20a%20HEAD%20request%20%28-I%29%2C%20follow%20through%20all%20redirects%20%28-L%29%2C%20and%20display%20some%20useful%20informati&amp;short_link=http://bit.ly/9PvLII&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Display+Just+The+HTTP+Response+Code+In+Command+Line+Curl&amp;link=http://beerpla.net/2010/06/10/how-to-display-just-the-http-response-code-in-cli-curl/&amp;notes=Today%2C%20I%20was%20looking%20for%20a%20quick%20way%20to%20see%20HTTP%20response%20codes%20of%20a%20bunch%20of%20urls.%20Naturally%2C%20I%20turned%20to%20the%20curl%20command%2C%20which%20I%20would%20usually%20use%20like%20this%3A%0D%0Acurl%20-IL%20%26quot%3BURL%26quot%3BThis%20command%20would%20send%20a%20HEAD%20request%20%28-I%29%2C%20follow%20through%20all%20redirects%20%28-L%29%2C%20and%20display%20some%20useful%20informati&amp;short_link=http://bit.ly/9PvLII&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Display+Just+The+HTTP+Response+Code+In+Command+Line+Curl&amp;link=http://beerpla.net/2010/06/10/how-to-display-just-the-http-response-code-in-cli-curl/&amp;notes=Today%2C%20I%20was%20looking%20for%20a%20quick%20way%20to%20see%20HTTP%20response%20codes%20of%20a%20bunch%20of%20urls.%20Naturally%2C%20I%20turned%20to%20the%20curl%20command%2C%20which%20I%20would%20usually%20use%20like%20this%3A%0D%0Acurl%20-IL%20%26quot%3BURL%26quot%3BThis%20command%20would%20send%20a%20HEAD%20request%20%28-I%29%2C%20follow%20through%20all%20redirects%20%28-L%29%2C%20and%20display%20some%20useful%20informati&amp;short_link=http://bit.ly/9PvLII&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Display+Just+The+HTTP+Response+Code+In+Command+Line+Curl&amp;link=http://beerpla.net/2010/06/10/how-to-display-just-the-http-response-code-in-cli-curl/&amp;notes=Today%2C%20I%20was%20looking%20for%20a%20quick%20way%20to%20see%20HTTP%20response%20codes%20of%20a%20bunch%20of%20urls.%20Naturally%2C%20I%20turned%20to%20the%20curl%20command%2C%20which%20I%20would%20usually%20use%20like%20this%3A%0D%0Acurl%20-IL%20%26quot%3BURL%26quot%3BThis%20command%20would%20send%20a%20HEAD%20request%20%28-I%29%2C%20follow%20through%20all%20redirects%20%28-L%29%2C%20and%20display%20some%20useful%20informati&amp;short_link=http://bit.ly/9PvLII&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Display+Just+The+HTTP+Response+Code+In+Command+Line+Curl&amp;link=http://beerpla.net/2010/06/10/how-to-display-just-the-http-response-code-in-cli-curl/&amp;notes=Today%2C%20I%20was%20looking%20for%20a%20quick%20way%20to%20see%20HTTP%20response%20codes%20of%20a%20bunch%20of%20urls.%20Naturally%2C%20I%20turned%20to%20the%20curl%20command%2C%20which%20I%20would%20usually%20use%20like%20this%3A%0D%0Acurl%20-IL%20%26quot%3BURL%26quot%3BThis%20command%20would%20send%20a%20HEAD%20request%20%28-I%29%2C%20follow%20through%20all%20redirects%20%28-L%29%2C%20and%20display%20some%20useful%20informati&amp;short_link=http://bit.ly/9PvLII&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Display+Just+The+HTTP+Response+Code+In+Command+Line+Curl&amp;link=http://beerpla.net/2010/06/10/how-to-display-just-the-http-response-code-in-cli-curl/&amp;notes=Today%2C%20I%20was%20looking%20for%20a%20quick%20way%20to%20see%20HTTP%20response%20codes%20of%20a%20bunch%20of%20urls.%20Naturally%2C%20I%20turned%20to%20the%20curl%20command%2C%20which%20I%20would%20usually%20use%20like%20this%3A%0D%0Acurl%20-IL%20%26quot%3BURL%26quot%3BThis%20command%20would%20send%20a%20HEAD%20request%20%28-I%29%2C%20follow%20through%20all%20redirects%20%28-L%29%2C%20and%20display%20some%20useful%20informati&amp;short_link=http://bit.ly/9PvLII&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Display+Just+The+HTTP+Response+Code+In+Command+Line+Curl&amp;link=http://beerpla.net/2010/06/10/how-to-display-just-the-http-response-code-in-cli-curl/&amp;notes=Today%2C%20I%20was%20looking%20for%20a%20quick%20way%20to%20see%20HTTP%20response%20codes%20of%20a%20bunch%20of%20urls.%20Naturally%2C%20I%20turned%20to%20the%20curl%20command%2C%20which%20I%20would%20usually%20use%20like%20this%3A%0D%0Acurl%20-IL%20%26quot%3BURL%26quot%3BThis%20command%20would%20send%20a%20HEAD%20request%20%28-I%29%2C%20follow%20through%20all%20redirects%20%28-L%29%2C%20and%20display%20some%20useful%20informati&amp;short_link=http://bit.ly/9PvLII&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=How%20To%20Display%20Just%20The%20HTTP%20Response%20Code%20In%20Command%20Line%20Curl&amp;link=http://beerpla.net/2010/06/10/how-to-display-just-the-http-response-code-in-cli-curl/&amp;notes=Today%2C%20I%20was%20looking%20for%20a%20quick%20way%20to%20see%20HTTP%20response%20codes%20of%20a%20bunch%20of%20urls.%20Naturally%2C%20I%20turned%20to%20the%20curl%20command%2C%20which%20I%20would%20usually%20use%20like%20this%3A%0D%0Acurl%20-IL%20%26quot%3BURL%26quot%3BThis%20command%20would%20send%20a%20HEAD%20request%20%28-I%29%2C%20follow%20through%20all%20redirects%20%28-L%29%2C%20and%20display%20some%20useful%20informati&amp;short_link=http://bit.ly/9PvLII&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2010/03/06/how-to-show-hiddeninvisible-files-in-total-commander-both-locally-and-on-an-ftp-server/" rel="bookmark" title="March 6, 2010">How To Show Hidden/Invisible Files In Total Commander, Both Locally And On An FTP Server</a></li><li><a
href="http://beerpla.net/2010/02/03/how-not-to-implement-a-web-application-that-handles-external-authentication-using-betwittered-com-as-an-example/" rel="bookmark" title="February 3, 2010">How *Not* To Implement A Web Application That Handles External Authentication, Using BeTwittered.com As An Example</a></li><li><a
href="http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/" rel="bookmark" title="February 17, 2009">Swapping Column Values in MySQL</a></li><li><a
href="http://beerpla.net/2008/06/08/wireless-headphones-are-nothing-new-what-about-wireless-earbuds/" rel="bookmark" title="June 8, 2008">Wireless Headphones Are Nothing New &#8211; What About Wireless Earbuds?</a></li><li><a
href="http://beerpla.net/2008/04/16/mysql-conference-liveblogging-portable-scale-out-benchmarks-for-mysql-wednesday-1050am/" rel="bookmark" title="April 16, 2008">MySQL Conference Liveblogging: Portable Scale-out Benchmarks For MySQL (Wednesday 10:50AM)</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2010%2F06%2F10%2Fhow-to-display-just-the-http-response-code-in-cli-curl%2F&amp;title=How%20To%20Display%20Just%20The%20HTTP%20Response%20Code%20In%20Command%20Line%20Curl" id="wpa2a_2"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2010/06/10/how-to-display-just-the-http-response-code-in-cli-curl/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>How To Export/Import Your ExpanDrive/SFTPDrive Drives And Settings</title><link>http://beerpla.net/2010/01/09/how-to-exportimport-your-expandrivesftpdrive-drives-and-settings/</link> <comments>http://beerpla.net/2010/01/09/how-to-exportimport-your-expandrivesftpdrive-drives-and-settings/#comments</comments> <pubDate>Sat, 09 Jan 2010 21:59:12 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Tips]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[drive]]></category> <category><![CDATA[expandrive]]></category> <category><![CDATA[export]]></category> <category><![CDATA[import]]></category> <category><![CDATA[settings]]></category> <category><![CDATA[sftpdrive]]></category> <guid
isPermaLink="false">http://beerpla.net/2010/01/09/how-to-exportimport-your-expandrivesftpdrive-drives-and-settings/</guid> <description><![CDATA[<p><img
style="margin: 0px 10px 10px 0px; display: inline" title="ExpanDrive logo" alt="ExpanDrive logo" align="left" src="http://beerpla.net/wp-content/uploads/HowToExportImportYourExpanDriveDrivesAnd_C2EB/image_6.png" width="150" height="140" /> <a
href="http://www.expandrive.com" rel="nofollow">ExpanDrive</a> (formerly SFTPDrive) is a very handy Windows and Mac application that lets you take any SSH connection and mount it as a local drive. It saves me countless annoyances because I don&#039;t have to use a proprietary sftp uploader &#8211; in fact, I can simply open any file with my favorite editor, directly on the newly mounted drive.</p><h2>The Problem</h2><p>The problem with ExpandDrive is &#8211; it&#039;s quite simplistic. So simplistic that it doesn&#039;t offer an easy way to export its drive list and the associated settings. Because of that, you will have to enter all the drives all over again in case you reinstall Windows or want to replicate them to another computer.</p><p>Of course, there is a ...<div
class=clear></div> <a
href="http://beerpla.net/2010/01/09/how-to-exportimport-your-expandrivesftpdrive-drives-and-settings/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description> <content:encoded><![CDATA[<p><img
style="margin: 0px 10px 10px 0px; display: inline" title="ExpanDrive logo" alt="ExpanDrive logo" align="left" src="http://beerpla.net/wp-content/uploads/HowToExportImportYourExpanDriveDrivesAnd_C2EB/image_6.png" width="150" height="140" /> <a
href="http://www.expandrive.com" rel="nofollow">ExpanDrive</a> (formerly SFTPDrive) is a very handy Windows and Mac application that lets you take any SSH connection and mount it as a local drive. It saves me countless annoyances because I don&#039;t have to use a proprietary sftp uploader &#8211; in fact, I can simply open any file with my favorite editor, directly on the newly mounted drive.</p><h2>The Problem</h2><p>The problem with ExpandDrive is &#8211; it&#039;s quite simplistic. So simplistic that it doesn&#039;t offer an easy way to export its drive list and the associated settings. Because of that, you will have to enter all the drives all over again in case you reinstall Windows or want to replicate them to another computer.</p><p>Of course, there is a workaround.</p><h2>The Workaround</h2><p>The workaround involves the following easy steps and, as I don&#039;t have a Mac, works only on Windows:</p><p><strong><font
size="5">1.</font></strong> On the source computer, load the registry editor by opening the run menu (WinKey+R) and typing in &#039;regedit&#039;.</p><p><strong><font
size="5">2.</font></strong> Expand the following location: HKEY_CURRENT_USER\Software\ExpanDrive. If you have SFTPDrive, install ExpanDrive first, which should migrate the old settings to this location. <br
/>Inside, you should find these 2 subfolders: Hostkeys and Sessions</p><p><a
href="http://beerpla.net/wp-content/uploads/HowToExportImportYourExpanDriveDrivesAnd_C2EB/image.png" class="lightview" rel="gallery['1341']" title="image"><img
style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/HowToExportImportYourExpanDriveDrivesAnd_C2EB/image_thumb.png" width="160" height="112" /></a></p><p><strong><font
size="5">3.</font></strong> Right click on ExpanDrive, select Export, and then save the reg file as expandrive.reg while making sure the &quot;Selected branch&quot; is selected in the Save dialog:</p><p><a
href="http://beerpla.net/wp-content/uploads/HowToExportImportYourExpanDriveDrivesAnd_C2EB/image_3.png" class="lightview" rel="gallery['1341']" title="image"><img
style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/HowToExportImportYourExpanDriveDrivesAnd_C2EB/image_thumb_3.png" width="143" height="183" /></a>&#160;<a
href="http://beerpla.net/wp-content/uploads/HowToExportImportYourExpanDriveDrivesAnd_C2EB/image_4.png" class="lightview" rel="gallery['1341']" title="image"><img
style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/HowToExportImportYourExpanDriveDrivesAnd_C2EB/image_thumb_4.png" width="554" height="189" /></a>&#160;</p><p><font
size="5"><strong>4.</strong></font> Close ExpanDrive on your new computer, transfer expandrive.reg to it, and then execute it. Click &quot;Yes&quot; at the following dialog:</p><p><a
href="http://beerpla.net/wp-content/uploads/HowToExportImportYourExpanDriveDrivesAnd_C2EB/image_5.png" class="lightview" rel="gallery['1341']" title="image"><img
style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/HowToExportImportYourExpanDriveDrivesAnd_C2EB/image_thumb_5.png" width="524" height="117" /></a></p><p><font
size="5"><strong>5. </strong></font>Reopen ExpanDrive and you should now have all your drives.</p><p><div
class="note"><div
class="notewarning">For some reason, the public/private key settings did not get carried over, even though it seemed like they would. You may need to enter them again for the lack of a better method.</div></div></p><p>If anyone has a better method, comments about the one above, or a way to carry over the public/private key settings, please share in the comments.</p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Export%2FImport+Your+ExpanDrive%2FSFTPDrive+Drives+And+Settings&amp;link=http://beerpla.net/2010/01/09/how-to-exportimport-your-expandrivesftpdrive-drives-and-settings/&amp;notes=%20ExpanDrive%20%28formerly%20SFTPDrive%29%20is%20a%20very%20handy%20Windows%20and%20Mac%20application%20that%20lets%20you%20take%20any%20SSH%20connection%20and%20mount%20it%20as%20a%20local%20drive.%20It%20saves%20me%20countless%20annoyances%20because%20I%20don%27t%20have%20to%20use%20a%20proprietary%20sftp%20uploader%20-%20in%20fact%2C%20I%20can%20simply%20open%20any%20file%20with%20my%20favorite%20editor%2C%20di&amp;short_link=http://bit.ly/csrxin&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Export%2FImport+Your+ExpanDrive%2FSFTPDrive+Drives+And+Settings&amp;link=http://beerpla.net/2010/01/09/how-to-exportimport-your-expandrivesftpdrive-drives-and-settings/&amp;notes=%20ExpanDrive%20%28formerly%20SFTPDrive%29%20is%20a%20very%20handy%20Windows%20and%20Mac%20application%20that%20lets%20you%20take%20any%20SSH%20connection%20and%20mount%20it%20as%20a%20local%20drive.%20It%20saves%20me%20countless%20annoyances%20because%20I%20don%27t%20have%20to%20use%20a%20proprietary%20sftp%20uploader%20-%20in%20fact%2C%20I%20can%20simply%20open%20any%20file%20with%20my%20favorite%20editor%2C%20di&amp;short_link=http://bit.ly/csrxin&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Export%2FImport+Your+ExpanDrive%2FSFTPDrive+Drives+And+Settings&amp;link=http://beerpla.net/2010/01/09/how-to-exportimport-your-expandrivesftpdrive-drives-and-settings/&amp;notes=%20ExpanDrive%20%28formerly%20SFTPDrive%29%20is%20a%20very%20handy%20Windows%20and%20Mac%20application%20that%20lets%20you%20take%20any%20SSH%20connection%20and%20mount%20it%20as%20a%20local%20drive.%20It%20saves%20me%20countless%20annoyances%20because%20I%20don%27t%20have%20to%20use%20a%20proprietary%20sftp%20uploader%20-%20in%20fact%2C%20I%20can%20simply%20open%20any%20file%20with%20my%20favorite%20editor%2C%20di&amp;short_link=http://bit.ly/csrxin&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Export%2FImport+Your+ExpanDrive%2FSFTPDrive+Drives+And+Settings&amp;link=http://beerpla.net/2010/01/09/how-to-exportimport-your-expandrivesftpdrive-drives-and-settings/&amp;notes=%20ExpanDrive%20%28formerly%20SFTPDrive%29%20is%20a%20very%20handy%20Windows%20and%20Mac%20application%20that%20lets%20you%20take%20any%20SSH%20connection%20and%20mount%20it%20as%20a%20local%20drive.%20It%20saves%20me%20countless%20annoyances%20because%20I%20don%27t%20have%20to%20use%20a%20proprietary%20sftp%20uploader%20-%20in%20fact%2C%20I%20can%20simply%20open%20any%20file%20with%20my%20favorite%20editor%2C%20di&amp;short_link=http://bit.ly/csrxin&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Export%2FImport+Your+ExpanDrive%2FSFTPDrive+Drives+And+Settings&amp;link=http://beerpla.net/2010/01/09/how-to-exportimport-your-expandrivesftpdrive-drives-and-settings/&amp;notes=%20ExpanDrive%20%28formerly%20SFTPDrive%29%20is%20a%20very%20handy%20Windows%20and%20Mac%20application%20that%20lets%20you%20take%20any%20SSH%20connection%20and%20mount%20it%20as%20a%20local%20drive.%20It%20saves%20me%20countless%20annoyances%20because%20I%20don%27t%20have%20to%20use%20a%20proprietary%20sftp%20uploader%20-%20in%20fact%2C%20I%20can%20simply%20open%20any%20file%20with%20my%20favorite%20editor%2C%20di&amp;short_link=http://bit.ly/csrxin&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Export%2FImport+Your+ExpanDrive%2FSFTPDrive+Drives+And+Settings&amp;link=http://beerpla.net/2010/01/09/how-to-exportimport-your-expandrivesftpdrive-drives-and-settings/&amp;notes=%20ExpanDrive%20%28formerly%20SFTPDrive%29%20is%20a%20very%20handy%20Windows%20and%20Mac%20application%20that%20lets%20you%20take%20any%20SSH%20connection%20and%20mount%20it%20as%20a%20local%20drive.%20It%20saves%20me%20countless%20annoyances%20because%20I%20don%27t%20have%20to%20use%20a%20proprietary%20sftp%20uploader%20-%20in%20fact%2C%20I%20can%20simply%20open%20any%20file%20with%20my%20favorite%20editor%2C%20di&amp;short_link=http://bit.ly/csrxin&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Export%2FImport+Your+ExpanDrive%2FSFTPDrive+Drives+And+Settings&amp;link=http://beerpla.net/2010/01/09/how-to-exportimport-your-expandrivesftpdrive-drives-and-settings/&amp;notes=%20ExpanDrive%20%28formerly%20SFTPDrive%29%20is%20a%20very%20handy%20Windows%20and%20Mac%20application%20that%20lets%20you%20take%20any%20SSH%20connection%20and%20mount%20it%20as%20a%20local%20drive.%20It%20saves%20me%20countless%20annoyances%20because%20I%20don%27t%20have%20to%20use%20a%20proprietary%20sftp%20uploader%20-%20in%20fact%2C%20I%20can%20simply%20open%20any%20file%20with%20my%20favorite%20editor%2C%20di&amp;short_link=http://bit.ly/csrxin&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=How%20To%20Export%2FImport%20Your%20ExpanDrive%2FSFTPDrive%20Drives%20And%20Settings&amp;link=http://beerpla.net/2010/01/09/how-to-exportimport-your-expandrivesftpdrive-drives-and-settings/&amp;notes=%20ExpanDrive%20%28formerly%20SFTPDrive%29%20is%20a%20very%20handy%20Windows%20and%20Mac%20application%20that%20lets%20you%20take%20any%20SSH%20connection%20and%20mount%20it%20as%20a%20local%20drive.%20It%20saves%20me%20countless%20annoyances%20because%20I%20don%27t%20have%20to%20use%20a%20proprietary%20sftp%20uploader%20-%20in%20fact%2C%20I%20can%20simply%20open%20any%20file%20with%20my%20favorite%20editor%2C%20di&amp;short_link=http://bit.ly/csrxin&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2007/08/10/how-to-resizegrow-vmware-linux-disks-and-partitions/" rel="bookmark" title="August 10, 2007">How To Resize/Grow VMware Linux Disks and Partitions</a></li><li><a
href="http://beerpla.net/2009/11/17/is-your-simplifymedia-for-winamp-broken-on-a-64-bit-windows-7-heres-how-to-fix-it/" rel="bookmark" title="November 17, 2009">Is Your Simplifymedia For Winamp Broken On A 64 Bit Windows 7? Here&#039;s How To Fix It</a></li><li><a
href="http://beerpla.net/2009/10/24/are-you-a-stackoverflow-com-superuser-com-serverfault-com-fan-heres-a-greasemonkey-script-to-keep-track-of-your-accounts-on-all-of-them/" rel="bookmark" title="October 24, 2009">StackOverflow.com, SuperUser.com, ServerFault.com Fan? Here&#039;s A Greasemonkey Script To Keep Track Of All Your Accounts</a></li><li><a
href="http://beerpla.net/2009/11/04/android-auto-formatting-android-xml-files-with-eclipse/" rel="bookmark" title="November 4, 2009">[Android] Auto Formatting Android XML Files With Eclipse</a></li><li><a
href="http://beerpla.net/2012/04/13/how-to-fix-incomplete-wordpress-wxr-exports/" rel="bookmark" title="April 13, 2012">How To Fix Incomplete WordPress (WXR) Exports</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2010%2F01%2F09%2Fhow-to-exportimport-your-expandrivesftpdrive-drives-and-settings%2F&amp;title=How%20To%20Export%2FImport%20Your%20ExpanDrive%2FSFTPDrive%20Drives%20And%20Settings" id="wpa2a_4"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2010/01/09/how-to-exportimport-your-expandrivesftpdrive-drives-and-settings/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Impressions From The StackOverflow&#039;s DevDays Conference In San Francisco</title><link>http://beerpla.net/2009/10/19/impressions-from-the-stackoverflows-devdays-conference-in-san-francisco/</link> <comments>http://beerpla.net/2009/10/19/impressions-from-the-stackoverflows-devdays-conference-in-san-francisco/#comments</comments> <pubDate>Tue, 20 Oct 2009 03:16:48 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Android]]></category> <category><![CDATA[Java]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[Technology]]></category> <category><![CDATA[Twitter]]></category> <category><![CDATA[conference]]></category> <category><![CDATA[devdays]]></category> <category><![CDATA[iphone]]></category> <category><![CDATA[jeff atwood]]></category> <category><![CDATA[joel spolsky]]></category> <category><![CDATA[jquery]]></category> <category><![CDATA[qt]]></category> <category><![CDATA[San Francisco]]></category> <category><![CDATA[stackoverflow]]></category> <guid
isPermaLink="false">http://beerpla.net/2009/10/19/impressions-from-the-stackoverflows-devdays-conference-in-san-francisco/</guid> <description><![CDATA[<p><img
style="margin: 0px 10px 10px 0px; display: inline" align="left" src="http://static1.abduzeedo.com/files/posts/sites_week/stackoverflow.jpg" width="150" height="100" />I just got back from the <a
href="http://www.stackoverflow.com" rel="nofollow">StackOverflow</a>&#039;s <a
href="http://stackoverflow.carsonified.com/events/sanfrancisco/" rel="nofollow">DevDays</a> conference in the rainy (at least today) San Francisco.</p><p>I was really glad to see <a
href="http://twitter.com/spolsky" rel="nofollow">Joel Spolsky</a>, <a
href="http://twitter.com/codinghorror" rel="nofollow">Jeff Atwood</a>, and the whole StackOverflow team in person, as well as listen to great talks in the following topics:</p><p>9:00 &#8211; 9:50&#160;&#160;&#160; Joel Spolsky Opening Keynote <br
/>9:50 &#8211; 10:45&#160;&#160;&#160; Mark Harrison Python <br
/>11:00 &#8211; 11:55&#160;&#160;&#160; Rory Blyth iPhone <br
/>11:55 &#8211; 12:25&#160;&#160;&#160; Joel Spolsky Fogbugz <br
/>13:30 &#8211; 14:25&#160;&#160;&#160; Scott Hanselman ASP.NET-MVC <br
/>14:25 &#8211; 14:45&#160;&#160;&#160; Jeff Atwood Stack Overflow <br
/>14:45 &#8211; 15:40&#160;&#160;&#160; Daniel Rocha Qt <br
/>16:10 &#8211; 17:05&#160;&#160;&#160; James Yum Android <br
/>17:05 &#8211; 18:00&#160;&#160;&#160; Yehuda Katz jQuery</p><p>My own favorite topics were in the following order of fun/usefulness level:</p><ul><li>iPhone (though I&#039;m interested</li>...<div
class=clear></div> <a
href="http://beerpla.net/2009/10/19/impressions-from-the-stackoverflows-devdays-conference-in-san-francisco/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></ul>]]></description> <content:encoded><![CDATA[<p><img
style="margin: 0px 10px 10px 0px; display: inline" align="left" src="http://static1.abduzeedo.com/files/posts/sites_week/stackoverflow.jpg" width="150" height="100" />I just got back from the <a
href="http://www.stackoverflow.com" rel="nofollow">StackOverflow</a>&#039;s <a
href="http://stackoverflow.carsonified.com/events/sanfrancisco/" rel="nofollow">DevDays</a> conference in the rainy (at least today) San Francisco.</p><p>I was really glad to see <a
href="http://twitter.com/spolsky" rel="nofollow">Joel Spolsky</a>, <a
href="http://twitter.com/codinghorror" rel="nofollow">Jeff Atwood</a>, and the whole StackOverflow team in person, as well as listen to great talks in the following topics:</p><p>9:00 &#8211; 9:50&#160;&#160;&#160; Joel Spolsky Opening Keynote <br
/>9:50 &#8211; 10:45&#160;&#160;&#160; Mark Harrison Python <br
/>11:00 &#8211; 11:55&#160;&#160;&#160; Rory Blyth iPhone <br
/>11:55 &#8211; 12:25&#160;&#160;&#160; Joel Spolsky Fogbugz <br
/>13:30 &#8211; 14:25&#160;&#160;&#160; Scott Hanselman ASP.NET-MVC <br
/>14:25 &#8211; 14:45&#160;&#160;&#160; Jeff Atwood Stack Overflow <br
/>14:45 &#8211; 15:40&#160;&#160;&#160; Daniel Rocha Qt <br
/>16:10 &#8211; 17:05&#160;&#160;&#160; James Yum Android <br
/>17:05 &#8211; 18:00&#160;&#160;&#160; Yehuda Katz jQuery</p><p>My own favorite topics were in the following order of fun/usefulness level:</p><ul><li>iPhone (though I&#039;m interested in Android development myself but it&#039;s always good to check out the competition) &#8211; it was fun and not boring. Quirky, jittery, OCD all come to mind.</li><li>Joel&#039;s keynote (Hi, Joel, I&#039;m <a
href="http://twitter.com/ArtemR" rel="nofollow">@ArtemR</a> ) &#8211; I welcome the discussion of simple vs feature rich, though Joel has talked about this on his blog <a
href="http://www.joelonsoftware.com/items/2006/12/09.html" rel="nofollow">multiple</a> <a
href="http://www.joelonsoftware.com/items/2006/11/21.html" rel="nofollow">times</a>.</li><li>jQuery &#8211; nice intro into history of jQuery and competition with other frameworks. The technical level of specific examples was quite basic.</li><li>Android &#8211; this is the topic I&#039;m mostly interested in and unfortunately the main speaker got substituted by a guy who has obviously not presented in front of a large crowd before (sorry, I have to criticize &#8211; you&#039;ll do better and better each time! Just don&#039;t worry so much and know your stuff) and was pretty much a recent college grad from the looks of it. He did a pretty decent job at making the code run but a really poor job of marketing and explaining Android&#039;s weaknesses and strengths, as some people on twitter <a
href="http://twitter.com/scanningcrew/statuses/5004657117" rel="nofollow">pointed</a> <a
href="http://twitter.com/SuperDalgas/statuses/5004654967" rel="nofollow">out</a>.</li><li>StackOverflow review &#8211; quite brief but fun. Thanks Jeff!</li><li>Python &#8211; very odd that it was even there &#8211; just a look at a few lines of code from the infamous Python google-like suggest algorithm.</li><li>Qt &#8211; didn&#039;t really care for it but sat through it. Nokia, meh. Next!</li><li>ASP.NET, Fogbugz &#8211; I skipped as I didn&#039;t care much for those</li></ul><p>Overall, I feel like the information presented in all sessions was pretty basic but I guess that was the idea &#8211; a little bit of everything for everyone.</p><p>The absence of WiFi was pretty disappointing as I think it was advertised but I didn&#039;t care much for it. Kept everyone more concentrated anyway.</p><p>The free memory upgrades by Microsoft was an AWESOME move (though mine is already at 4GB and they didn&#039;t give out 4GB sticks)!</p><p>Lunch was decent &#8211; Boudin. Lots of drinks and snacks.</p><p>Well worth $99.</p><p><a
href="http://twitter.com/search?q=+%23devdays+since%3A2009-10-18+until%3A2009-10-19" rel="nofollow">Twitter #devdays results</a>.</p><p><a
href="http://meta.stackoverflow.com/questions/26536/devdays-reviews-san-francisco/" rel="nofollow">Cross-posted</a> to Meta-StackOverflow.</p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=Impressions+From+The+StackOverflow%27s+DevDays+Conference+In+San+Francisco&amp;link=http://beerpla.net/2009/10/19/impressions-from-the-stackoverflows-devdays-conference-in-san-francisco/&amp;notes=I%20just%20got%20back%20from%20the%20StackOverflow%27s%20DevDays%20conference%20in%20the%20rainy%20%28at%20least%20today%29%20San%20Francisco.%20%20I%20was%20really%20glad%20to%20see%20Joel%20Spolsky%2C%20Jeff%20Atwood%2C%20and%20the%20whole%20StackOverflow%20team%20in%20person%2C%20as%20well%20as%20listen%20to%20great%20talks%20in%20the%20following%20topics%3A%20%209%3A00%20-%209%3A50%26%23160%3B%26%23160%3B%26%23160%3B%20Joel%20Spol&amp;short_link=http://bit.ly/bIgG0v&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=Impressions+From+The+StackOverflow%27s+DevDays+Conference+In+San+Francisco&amp;link=http://beerpla.net/2009/10/19/impressions-from-the-stackoverflows-devdays-conference-in-san-francisco/&amp;notes=I%20just%20got%20back%20from%20the%20StackOverflow%27s%20DevDays%20conference%20in%20the%20rainy%20%28at%20least%20today%29%20San%20Francisco.%20%20I%20was%20really%20glad%20to%20see%20Joel%20Spolsky%2C%20Jeff%20Atwood%2C%20and%20the%20whole%20StackOverflow%20team%20in%20person%2C%20as%20well%20as%20listen%20to%20great%20talks%20in%20the%20following%20topics%3A%20%209%3A00%20-%209%3A50%26%23160%3B%26%23160%3B%26%23160%3B%20Joel%20Spol&amp;short_link=http://bit.ly/bIgG0v&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=Impressions+From+The+StackOverflow%27s+DevDays+Conference+In+San+Francisco&amp;link=http://beerpla.net/2009/10/19/impressions-from-the-stackoverflows-devdays-conference-in-san-francisco/&amp;notes=I%20just%20got%20back%20from%20the%20StackOverflow%27s%20DevDays%20conference%20in%20the%20rainy%20%28at%20least%20today%29%20San%20Francisco.%20%20I%20was%20really%20glad%20to%20see%20Joel%20Spolsky%2C%20Jeff%20Atwood%2C%20and%20the%20whole%20StackOverflow%20team%20in%20person%2C%20as%20well%20as%20listen%20to%20great%20talks%20in%20the%20following%20topics%3A%20%209%3A00%20-%209%3A50%26%23160%3B%26%23160%3B%26%23160%3B%20Joel%20Spol&amp;short_link=http://bit.ly/bIgG0v&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=Impressions+From+The+StackOverflow%27s+DevDays+Conference+In+San+Francisco&amp;link=http://beerpla.net/2009/10/19/impressions-from-the-stackoverflows-devdays-conference-in-san-francisco/&amp;notes=I%20just%20got%20back%20from%20the%20StackOverflow%27s%20DevDays%20conference%20in%20the%20rainy%20%28at%20least%20today%29%20San%20Francisco.%20%20I%20was%20really%20glad%20to%20see%20Joel%20Spolsky%2C%20Jeff%20Atwood%2C%20and%20the%20whole%20StackOverflow%20team%20in%20person%2C%20as%20well%20as%20listen%20to%20great%20talks%20in%20the%20following%20topics%3A%20%209%3A00%20-%209%3A50%26%23160%3B%26%23160%3B%26%23160%3B%20Joel%20Spol&amp;short_link=http://bit.ly/bIgG0v&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=Impressions+From+The+StackOverflow%27s+DevDays+Conference+In+San+Francisco&amp;link=http://beerpla.net/2009/10/19/impressions-from-the-stackoverflows-devdays-conference-in-san-francisco/&amp;notes=I%20just%20got%20back%20from%20the%20StackOverflow%27s%20DevDays%20conference%20in%20the%20rainy%20%28at%20least%20today%29%20San%20Francisco.%20%20I%20was%20really%20glad%20to%20see%20Joel%20Spolsky%2C%20Jeff%20Atwood%2C%20and%20the%20whole%20StackOverflow%20team%20in%20person%2C%20as%20well%20as%20listen%20to%20great%20talks%20in%20the%20following%20topics%3A%20%209%3A00%20-%209%3A50%26%23160%3B%26%23160%3B%26%23160%3B%20Joel%20Spol&amp;short_link=http://bit.ly/bIgG0v&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=Impressions+From+The+StackOverflow%27s+DevDays+Conference+In+San+Francisco&amp;link=http://beerpla.net/2009/10/19/impressions-from-the-stackoverflows-devdays-conference-in-san-francisco/&amp;notes=I%20just%20got%20back%20from%20the%20StackOverflow%27s%20DevDays%20conference%20in%20the%20rainy%20%28at%20least%20today%29%20San%20Francisco.%20%20I%20was%20really%20glad%20to%20see%20Joel%20Spolsky%2C%20Jeff%20Atwood%2C%20and%20the%20whole%20StackOverflow%20team%20in%20person%2C%20as%20well%20as%20listen%20to%20great%20talks%20in%20the%20following%20topics%3A%20%209%3A00%20-%209%3A50%26%23160%3B%26%23160%3B%26%23160%3B%20Joel%20Spol&amp;short_link=http://bit.ly/bIgG0v&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=Impressions+From+The+StackOverflow%27s+DevDays+Conference+In+San+Francisco&amp;link=http://beerpla.net/2009/10/19/impressions-from-the-stackoverflows-devdays-conference-in-san-francisco/&amp;notes=I%20just%20got%20back%20from%20the%20StackOverflow%27s%20DevDays%20conference%20in%20the%20rainy%20%28at%20least%20today%29%20San%20Francisco.%20%20I%20was%20really%20glad%20to%20see%20Joel%20Spolsky%2C%20Jeff%20Atwood%2C%20and%20the%20whole%20StackOverflow%20team%20in%20person%2C%20as%20well%20as%20listen%20to%20great%20talks%20in%20the%20following%20topics%3A%20%209%3A00%20-%209%3A50%26%23160%3B%26%23160%3B%26%23160%3B%20Joel%20Spol&amp;short_link=http://bit.ly/bIgG0v&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=Impressions%20From%20The%20StackOverflow%27s%20DevDays%20Conference%20In%20San%20Francisco&amp;link=http://beerpla.net/2009/10/19/impressions-from-the-stackoverflows-devdays-conference-in-san-francisco/&amp;notes=I%20just%20got%20back%20from%20the%20StackOverflow%27s%20DevDays%20conference%20in%20the%20rainy%20%28at%20least%20today%29%20San%20Francisco.%20%20I%20was%20really%20glad%20to%20see%20Joel%20Spolsky%2C%20Jeff%20Atwood%2C%20and%20the%20whole%20StackOverflow%20team%20in%20person%2C%20as%20well%20as%20listen%20to%20great%20talks%20in%20the%20following%20topics%3A%20%209%3A00%20-%209%3A50%26%23160%3B%26%23160%3B%26%23160%3B%20Joel%20Spol&amp;short_link=http://bit.ly/bIgG0v&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2009/06/21/hidden-features-of-perl-php-javascript-c-c-c-java-ruby-python-and-others-collection-of-incredibly-useful-lists/" rel="bookmark" title="June 21, 2009">Hidden Features Of Perl, PHP, Javascript, C, C++, C#, Java, Ruby, Python, And Others [Collection Of Incredibly Useful Lists]</a></li><li><a
href="http://beerpla.net/2009/10/24/are-you-a-stackoverflow-com-superuser-com-serverfault-com-fan-heres-a-greasemonkey-script-to-keep-track-of-your-accounts-on-all-of-them/" rel="bookmark" title="October 24, 2009">StackOverflow.com, SuperUser.com, ServerFault.com Fan? Here&#039;s A Greasemonkey Script To Keep Track Of All Your Accounts</a></li><li><a
href="http://beerpla.net/2008/12/19/monitor-all-your-domains-from-one-location/" rel="bookmark" title="December 19, 2008">Monitor All Your Domains From One Location</a></li><li><a
href="http://beerpla.net/2009/04/09/the-real-reasons-to-use-twitter-get-over-your-prejudice-already/" rel="bookmark" title="April 9, 2009">The Real Reasons To Use Twitter (Get Over Your Prejudice Already)</a></li><li><a
href="http://beerpla.net/2006/08/06/minority-report-becomes-reality/" rel="bookmark" title="August 6, 2006">Minority Report Becomes Reality</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2009%2F10%2F19%2Fimpressions-from-the-stackoverflows-devdays-conference-in-san-francisco%2F&amp;title=Impressions%20From%20The%20StackOverflow%26%23039%3Bs%20DevDays%20Conference%20In%20San%20Francisco" id="wpa2a_6"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2009/10/19/impressions-from-the-stackoverflows-devdays-conference-in-san-francisco/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Supercharge Your GNU Screen With A Power &quot;Taskbar&quot; And Never Feel Lost Again</title><link>http://beerpla.net/2009/10/06/supercharge-your-gnu-screen-with-a-power-taskbar-and-never-feel-lost-again/</link> <comments>http://beerpla.net/2009/10/06/supercharge-your-gnu-screen-with-a-power-taskbar-and-never-feel-lost-again/#comments</comments> <pubDate>Tue, 06 Oct 2009 14:30:00 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[My Favorites]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[bandwidth]]></category> <category><![CDATA[bar]]></category> <category><![CDATA[gnu]]></category> <category><![CDATA[gnu screen]]></category> <category><![CDATA[load]]></category> <category><![CDATA[manage]]></category> <category><![CDATA[screen]]></category> <category><![CDATA[screenrc]]></category> <category><![CDATA[taskbar]]></category> <category><![CDATA[time]]></category> <category><![CDATA[tip]]></category> <category><![CDATA[trick]]></category> <category><![CDATA[windows]]></category> <category><![CDATA[wormulon]]></category> <guid
isPermaLink="false">http://beerpla.net/?p=1154</guid> <description><![CDATA[<h2>Introduction</h2><p><img
style="margin: 0px 10px 10px 0px; display: inline" title="image" alt="image" align="left" src="http://beerpla.net/wp-content/uploads/SuperchargeYourGNUScreenWithAPowerBar_B381/image_thumb_3.png" width="240" height="24" /><a
href="http://www.gnu.org/software/screen/" rel="nofollow"><em>Screen</em></a> is awesome. Once you become comfortable navigating around it, you start using it ALL the time. No more dropped sessions, no having 10 Putty windows open at the same time, no more nohup.</p><p>However, with default <em>screen </em>settings I&#039;ve always felt a bit lost and out of place, mostly because there was no &#34;taskbar&#34; with a bird&#039;s eye view of all windows. Pressing <em>ctrl-a, &#34;</em> really does get annoying fast (that&#039;s the command that brings up the window selector &#8211; screenshot below).</p><p><img
style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/SuperchargeYourGNUScreenWithAPowerBar_B381/image_thumb.png" width="153" height="117" /></p><p>So instead I modded my <em>screen</em> to have a &#34;taskbar&#34; which sits at the bottom of <em>screen</em> and adds:</p><ul><li>the name of each window</li><li>a clear marking of window states, such as<ul><li>the currently active window</li></ul></li>...<div
class=clear></div> <a
href="http://beerpla.net/2009/10/06/supercharge-your-gnu-screen-with-a-power-taskbar-and-never-feel-lost-again/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></ul>]]></description> <content:encoded><![CDATA[<h2>Introduction</h2><p><img
style="margin: 0px 10px 10px 0px; display: inline" title="image" alt="image" align="left" src="http://beerpla.net/wp-content/uploads/SuperchargeYourGNUScreenWithAPowerBar_B381/image_thumb_3.png" width="240" height="24" /><a
href="http://www.gnu.org/software/screen/" rel="nofollow"><em>Screen</em></a> is awesome. Once you become comfortable navigating around it, you start using it ALL the time. No more dropped sessions, no having 10 Putty windows open at the same time, no more nohup.</p><p>However, with default <em>screen </em>settings I&#039;ve always felt a bit lost and out of place, mostly because there was no &quot;taskbar&quot; with a bird&#039;s eye view of all windows. Pressing <em>ctrl-a, &quot;</em> really does get annoying fast (that&#039;s the command that brings up the window selector &#8211; screenshot below).</p><p><img
style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/SuperchargeYourGNUScreenWithAPowerBar_B381/image_thumb.png" width="153" height="117" /></p><p>So instead I modded my <em>screen</em> to have a &quot;taskbar&quot; which sits at the bottom of <em>screen</em> and adds:</p><ul><li>the name of each window</li><li>a clear marking of window states, such as<ul><li>the currently active window (* and different background)</li><li>last used window (-)</li><li>if you&#039;re sharing the current window with someone else (&amp;)</li></ul></li><li>the current incoming/outgoing bandwidth in bytes/sec, updating every 5 seconds</li><li>the current time</li><li>the load on the server, as reported by the <em>uptime</em> or <em>w</em> commands</li></ul><p>Of course, all of the above is customizable to your liking, but this is what I picked for myself.</p><p>Without further ado, here&#039;s a screenshot:</p><p><a
href="http://beerpla.net/wp-content/uploads/SuperchargeYourGNUScreenWithAPowerBar_B381/image_3.png" class="lightview" rel="gallery['1154']" title="screen power taskbar"><img
style="display: block; float: none; margin-left: auto; margin-right: auto" title="screen power taskbar" alt="screen power taskbar" src="http://beerpla.net/wp-content/uploads/SuperchargeYourGNUScreenWithAPowerBar_B381/image_thumb_3.png" width="700" height="71" /></a></p><p>Doesn&#039;t that make you feel much more homey?</p><p>Now using a shared <em>screen </em>session for pair programming, as suggested in a <a
href="http://haruska.com/2009/09/29/remote-pair-programming/" rel="nofollow">recent article</a> posted on <a
href="http://news.ycombinator.com" rel="nofollow">Hacker News</a>, suddenly sounds even more appealing.</p><p><div
class="note"><div
class="notetip">Did you know you could rename each individual window within screen? Just press ctrl-a A and enter a new name.</div></div></p><h2>Installation</h2><p>Here&#039;s what you need to get this bar on your <em>screen</em>:</p><ul><li>download my <a
href="http://beerpla.net/downloads/.screenrc">.screenrc</a> (0 B, downloaded 963 times) and put it in your home directory. Make sure the location of wormulon (installed in the next step) is correct. Also, specify the right network interface (eth0 in most cases). <br
/>Here is the file, for reference:</li></ul><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td
class="code"><pre># Monitor eth0 bandwidth and update every 5 s
# Assign the output of this cmd to '%1`' and use it in the below hardstatus line:
backtick 1 0 0 /usr/local/bin/wormulon -d 5 -i eth0
&nbsp;
hardstatus alwayslastline &quot;%{bw}[%H] [%?%-Lw%?%{wb}%n*%f %t%{bw}%?%+Lw%?]%=%{bw} [%1`] [%c:%s] [%l]&quot; # modified from http://lists.gnu.org/archive/html/screen-users/2007-08/msg00008.html
&nbsp;
# Set the scrollback length:
defscrollback 10000
&nbsp;
# Select whether you want to see the copyright notice during startup:
startup_message off</pre></td></tr></table></div><ul><li>download and compile <em>wormulon</em> (<a
href="http://beerpla.net/downloads/wormulon-0.1.4.tar.gz">wormulon-0.1.4.tar.gz</a> 45.3 kB, downloaded 473 times or from a <a
href="http://www.sourcefiles.org/Monitoring/Network/wormulon-0.1.4.tar.gz" rel="nofollow">mirror</a>) &#8211; a nifty little program that shows incoming and outgoing bandwidth and is perfect for integrating with <em>screen</em>. You can omit this step if you don&#039;t want the bandwidth monitor. I know the name is a bit odd but it&#039;s a legit little open source utility &#8211; feel free to check out the code.</li></ul><div
class="wp_syntax"><div
class="code"><pre>tar xvzf wormulon-0.1.4.tar.gz
cd wormulon-0.1.4/
./configure &amp;&amp; make
sudo make install # this installs into /usr/local/bin/;
                  # alternatively, copy the wormulon binary wherever you
                  # want and update the path in .screenrc</pre></div></div><p>Now restart screen and you&#039;re good to go.</p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=Supercharge+Your+GNU+Screen+With+A+Power+%26quot%3BTaskbar%26quot%3B+And+Never+Feel+Lost+Again&amp;link=http://beerpla.net/2009/10/06/supercharge-your-gnu-screen-with-a-power-taskbar-and-never-feel-lost-again/&amp;notes=Introduction%0D%0AScreen%20is%20awesome.%20Once%20you%20become%20comfortable%20navigating%20around%20it%2C%20you%20start%20using%20it%20ALL%20the%20time.%20No%20more%20dropped%20sessions%2C%20no%20having%2010%20Putty%20windows%20open%20at%20the%20same%20time%2C%20no%20more%20nohup.%0D%0AHowever%2C%20with%20default%20screen%20settings%20I%27ve%20always%20felt%20a%20bit%20lost%20and%20out%20of%20place%2C%20mostly%20b&amp;short_link=http://bit.ly/dBSHMa&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=Supercharge+Your+GNU+Screen+With+A+Power+%26quot%3BTaskbar%26quot%3B+And+Never+Feel+Lost+Again&amp;link=http://beerpla.net/2009/10/06/supercharge-your-gnu-screen-with-a-power-taskbar-and-never-feel-lost-again/&amp;notes=Introduction%0D%0AScreen%20is%20awesome.%20Once%20you%20become%20comfortable%20navigating%20around%20it%2C%20you%20start%20using%20it%20ALL%20the%20time.%20No%20more%20dropped%20sessions%2C%20no%20having%2010%20Putty%20windows%20open%20at%20the%20same%20time%2C%20no%20more%20nohup.%0D%0AHowever%2C%20with%20default%20screen%20settings%20I%27ve%20always%20felt%20a%20bit%20lost%20and%20out%20of%20place%2C%20mostly%20b&amp;short_link=http://bit.ly/dBSHMa&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=Supercharge+Your+GNU+Screen+With+A+Power+%26quot%3BTaskbar%26quot%3B+And+Never+Feel+Lost+Again&amp;link=http://beerpla.net/2009/10/06/supercharge-your-gnu-screen-with-a-power-taskbar-and-never-feel-lost-again/&amp;notes=Introduction%0D%0AScreen%20is%20awesome.%20Once%20you%20become%20comfortable%20navigating%20around%20it%2C%20you%20start%20using%20it%20ALL%20the%20time.%20No%20more%20dropped%20sessions%2C%20no%20having%2010%20Putty%20windows%20open%20at%20the%20same%20time%2C%20no%20more%20nohup.%0D%0AHowever%2C%20with%20default%20screen%20settings%20I%27ve%20always%20felt%20a%20bit%20lost%20and%20out%20of%20place%2C%20mostly%20b&amp;short_link=http://bit.ly/dBSHMa&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=Supercharge+Your+GNU+Screen+With+A+Power+%26quot%3BTaskbar%26quot%3B+And+Never+Feel+Lost+Again&amp;link=http://beerpla.net/2009/10/06/supercharge-your-gnu-screen-with-a-power-taskbar-and-never-feel-lost-again/&amp;notes=Introduction%0D%0AScreen%20is%20awesome.%20Once%20you%20become%20comfortable%20navigating%20around%20it%2C%20you%20start%20using%20it%20ALL%20the%20time.%20No%20more%20dropped%20sessions%2C%20no%20having%2010%20Putty%20windows%20open%20at%20the%20same%20time%2C%20no%20more%20nohup.%0D%0AHowever%2C%20with%20default%20screen%20settings%20I%27ve%20always%20felt%20a%20bit%20lost%20and%20out%20of%20place%2C%20mostly%20b&amp;short_link=http://bit.ly/dBSHMa&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=Supercharge+Your+GNU+Screen+With+A+Power+%26quot%3BTaskbar%26quot%3B+And+Never+Feel+Lost+Again&amp;link=http://beerpla.net/2009/10/06/supercharge-your-gnu-screen-with-a-power-taskbar-and-never-feel-lost-again/&amp;notes=Introduction%0D%0AScreen%20is%20awesome.%20Once%20you%20become%20comfortable%20navigating%20around%20it%2C%20you%20start%20using%20it%20ALL%20the%20time.%20No%20more%20dropped%20sessions%2C%20no%20having%2010%20Putty%20windows%20open%20at%20the%20same%20time%2C%20no%20more%20nohup.%0D%0AHowever%2C%20with%20default%20screen%20settings%20I%27ve%20always%20felt%20a%20bit%20lost%20and%20out%20of%20place%2C%20mostly%20b&amp;short_link=http://bit.ly/dBSHMa&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=Supercharge+Your+GNU+Screen+With+A+Power+%26quot%3BTaskbar%26quot%3B+And+Never+Feel+Lost+Again&amp;link=http://beerpla.net/2009/10/06/supercharge-your-gnu-screen-with-a-power-taskbar-and-never-feel-lost-again/&amp;notes=Introduction%0D%0AScreen%20is%20awesome.%20Once%20you%20become%20comfortable%20navigating%20around%20it%2C%20you%20start%20using%20it%20ALL%20the%20time.%20No%20more%20dropped%20sessions%2C%20no%20having%2010%20Putty%20windows%20open%20at%20the%20same%20time%2C%20no%20more%20nohup.%0D%0AHowever%2C%20with%20default%20screen%20settings%20I%27ve%20always%20felt%20a%20bit%20lost%20and%20out%20of%20place%2C%20mostly%20b&amp;short_link=http://bit.ly/dBSHMa&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=Supercharge+Your+GNU+Screen+With+A+Power+%26quot%3BTaskbar%26quot%3B+And+Never+Feel+Lost+Again&amp;link=http://beerpla.net/2009/10/06/supercharge-your-gnu-screen-with-a-power-taskbar-and-never-feel-lost-again/&amp;notes=Introduction%0D%0AScreen%20is%20awesome.%20Once%20you%20become%20comfortable%20navigating%20around%20it%2C%20you%20start%20using%20it%20ALL%20the%20time.%20No%20more%20dropped%20sessions%2C%20no%20having%2010%20Putty%20windows%20open%20at%20the%20same%20time%2C%20no%20more%20nohup.%0D%0AHowever%2C%20with%20default%20screen%20settings%20I%27ve%20always%20felt%20a%20bit%20lost%20and%20out%20of%20place%2C%20mostly%20b&amp;short_link=http://bit.ly/dBSHMa&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=Supercharge%20Your%20GNU%20Screen%20With%20A%20Power%20%26quot%3BTaskbar%26quot%3B%20And%20Never%20Feel%20Lost%20Again&amp;link=http://beerpla.net/2009/10/06/supercharge-your-gnu-screen-with-a-power-taskbar-and-never-feel-lost-again/&amp;notes=Introduction%0D%0AScreen%20is%20awesome.%20Once%20you%20become%20comfortable%20navigating%20around%20it%2C%20you%20start%20using%20it%20ALL%20the%20time.%20No%20more%20dropped%20sessions%2C%20no%20having%2010%20Putty%20windows%20open%20at%20the%20same%20time%2C%20no%20more%20nohup.%0D%0AHowever%2C%20with%20default%20screen%20settings%20I%27ve%20always%20felt%20a%20bit%20lost%20and%20out%20of%20place%2C%20mostly%20b&amp;short_link=http://bit.ly/dBSHMa&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2007/07/09/how-to-download-and-install-windows-media-player-11-bypassing-wga/" rel="bookmark" title="July 9, 2007">How To Download And Install Windows Media Player 11 Bypassing WGA</a></li><li><a
href="http://beerpla.net/2007/08/04/watch-a-useful-linux-command-you-may-have-never-heard-of/" rel="bookmark" title="August 4, 2007">Watch &#8211; A Useful Linux Command You May Have Never Heard Of</a></li><li><a
href="http://beerpla.net/2010/09/29/how-to-update-eclipse-from-galileo-3-5-to-helios-3-6-in-place-without-reinstalling/" rel="bookmark" title="September 29, 2010">How To Update Eclipse From Galileo (3.5) To Helios (3.6) In-Place Without Reinstalling</a></li><li><a
href="http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/" rel="bookmark" title="December 22, 2008">Mastering The Linux Shell &#8211; Bash Shortcuts Explained (Now With Cheat Sheets)</a></li><li><a
href="http://beerpla.net/2007/08/10/how-to-resizegrow-vmware-linux-disks-and-partitions/" rel="bookmark" title="August 10, 2007">How To Resize/Grow VMware Linux Disks and Partitions</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2009%2F10%2F06%2Fsupercharge-your-gnu-screen-with-a-power-taskbar-and-never-feel-lost-again%2F&amp;title=Supercharge%20Your%20GNU%20Screen%20With%20A%20Power%20%26quot%3BTaskbar%26quot%3B%20And%20Never%20Feel%20Lost%20Again" id="wpa2a_8"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2009/10/06/supercharge-your-gnu-screen-with-a-power-taskbar-and-never-feel-lost-again/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>[Solr] How To Fix java.io.IOException: directory FOO exists and is a directory, but cannot be listed: list() returned null</title><link>http://beerpla.net/2009/09/21/solr-how-to-fix-java-io-ioexception-directory-foo-exists-and-is-a-directory-but-cannot-be-listed-list-returned-null/</link> <comments>http://beerpla.net/2009/09/21/solr-how-to-fix-java-io-ioexception-directory-foo-exists-and-is-a-directory-but-cannot-be-listed-list-returned-null/#comments</comments> <pubDate>Mon, 21 Sep 2009 19:47:53 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Solr]]></category> <category><![CDATA[commit]]></category> <category><![CDATA[directory]]></category> <category><![CDATA[exception]]></category> <category><![CDATA[exists]]></category> <category><![CDATA[Java]]></category> <category><![CDATA[limit]]></category> <category><![CDATA[list]]></category> <category><![CDATA[null]]></category> <category><![CDATA[open file]]></category> <category><![CDATA[optimize]]></category> <category><![CDATA[ulimit]]></category> <guid
isPermaLink="false">http://beerpla.net/2009/09/21/solr-how-to-fix-java-io-ioexception-directory-foo-exists-and-is-a-directory-but-cannot-be-listed-list-returned-null/</guid> <description><![CDATA[<h2>The Problem</h2><p>I am throwing up a quick post about a relatively cryptic error that Solr started throwing the other day here at Plaxo. After happily running for a few days, I suddenly started getting pages about failed Solr indexing.</p><p>Upon closer examination, I saw the following repeatedly in the log file:</p><div
class="wp_syntax"><div
class="code"><pre>catalina.2009-09-18.log:SEVERE: java.io.IOException: directory 'DATADIR/index'
exists and is a directory, but cannot be listed: list() returned null</pre></div></div><p>I tried to see if sending an <a
href="http://www.google.com/search?q=site:wiki.apache.org+solr+optimize" rel="nofollow">OPTIMIZE</a> command would help but the server returned the same response.</p><h2>Digging Deeper</h2><p>The reason was these errors was quite simple &#8211; Solr was running into the system level limit on allowed number of open files (ulimit). This limit can be seen by running</p><div
class="wp_syntax"><div
class="code"><pre>ulimit </pre></div>...<div
class=clear></div> <a
href="http://beerpla.net/2009/09/21/solr-how-to-fix-java-io-ioexception-directory-foo-exists-and-is-a-directory-but-cannot-be-listed-list-returned-null/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></div>]]></description> <content:encoded><![CDATA[<h2>The Problem</h2><p>I am throwing up a quick post about a relatively cryptic error that Solr started throwing the other day here at Plaxo. After happily running for a few days, I suddenly started getting pages about failed Solr indexing.</p><p>Upon closer examination, I saw the following repeatedly in the log file:</p><div
class="wp_syntax"><div
class="code"><pre>catalina.2009-09-18.log:SEVERE: java.io.IOException: directory 'DATADIR/index'
exists and is a directory, but cannot be listed: list() returned null</pre></div></div><p>I tried to see if sending an <a
href="http://www.google.com/search?q=site:wiki.apache.org+solr+optimize" rel="nofollow">OPTIMIZE</a> command would help but the server returned the same response.</p><h2>Digging Deeper</h2><p>The reason was these errors was quite simple &#8211; Solr was running into the system level limit on allowed number of open files (ulimit). This limit can be seen by running</p><div
class="wp_syntax"><div
class="code"><pre>ulimit -n
1024</pre></div></div><p>or simply</p><div
class="wp_syntax"><div
class="code"><pre>ulimit -a | grep 'open files'
open files                      (-n) 1024</pre></div></div><p>This means that if a process tries to open that many files at the same time, the kernel will prohibit opening any more, which in my case caused the Java IOException.</p><p>In my case, I haven&#039;t been using the Solr OPTIMIZE command for a while, so after a lot of <a
href="http://www.google.com/search?q=site:wiki.apache.org+solr+commit" rel="nofollow">COMMIT</a>s, the Solr data got pretty fragmented, thus hitting the open files limit.</p><h2>The Solution</h2><p>There are 2 things to be done here:</p><ol><li>OPTIMIZE Solr more often. When an OPTIMIZE occurs, multiple index files are merged into 1, thus reducing the number of files that need to be opened. However, before you can OPTIMIZE, you have to raise the allowed number of open files (see the next bullet).</p></li><li>Set a higher open files limit for the user that runs Solr (in my case, the <strong><em>solr</em></strong> user) &#8211; for example to 4096 instead of 1024. One way to do it is by adding a file /etc/security/limits.d/solr.conf with the following contents:<p></p><div
class="wp_syntax"><div
class="code"><pre>solr hard nofile 4096
solr soft nofile 4096</pre></div></div><p>and then logging out and back in. The file should be automatically loaded, which you can verify by running the ulimit commands from the section above.</li></ol><p>Happy Solring!</p><p>By the way, here&#039;s a really good resource for Solr 1.4 that just came out: <a
href="http://www.amazon.com/dp/1847195881/?tag=beepla-20">Solr 1.4 Enterprise Search</a>. I have this book and it&#039;s quite helpful in explaining such topics as multicore setup, search methods, replication, etc.</p><p
align="center"><iframe
style="width: 120px; height: 240px" marginheight="0" src="http://rcm.amazon.com/e/cm?lt1=_blank&amp;bc1=000000&amp;IS2=1&amp;bg1=FFFFFF&amp;fc1=000000&amp;lc1=0000FF&amp;t=beepla-20&amp;o=1&amp;p=8&amp;l=as1&amp;m=amazon&amp;f=ifr&amp;md=10FE9736YVPPT7A0FBG2&amp;asins=1847195881" frameborder="0" marginwidth="0" scrolling="no"></iframe></p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=%5BSolr%5D+How+To+Fix+java.io.IOException%3A+directory+FOO+exists+and+is+a+directory%2C+but+cannot+be+listed%3A+list%28%29+returned+null&amp;link=http://beerpla.net/2009/09/21/solr-how-to-fix-java-io-ioexception-directory-foo-exists-and-is-a-directory-but-cannot-be-listed-list-returned-null/&amp;notes=The%20Problem%20%20I%20am%20throwing%20up%20a%20quick%20post%20about%20a%20relatively%20cryptic%20error%20that%20Solr%20started%20throwing%20the%20other%20day%20here%20at%20Plaxo.%20After%20happily%20running%20for%20a%20few%20days%2C%20I%20suddenly%20started%20getting%20pages%20about%20failed%20Solr%20indexing.%20%20Upon%20closer%20examination%2C%20I%20saw%20the%20following%20repeatedly%20in%20the%20log%20f&amp;short_link=http://bit.ly/dBdAdi&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=%5BSolr%5D+How+To+Fix+java.io.IOException%3A+directory+FOO+exists+and+is+a+directory%2C+but+cannot+be+listed%3A+list%28%29+returned+null&amp;link=http://beerpla.net/2009/09/21/solr-how-to-fix-java-io-ioexception-directory-foo-exists-and-is-a-directory-but-cannot-be-listed-list-returned-null/&amp;notes=The%20Problem%20%20I%20am%20throwing%20up%20a%20quick%20post%20about%20a%20relatively%20cryptic%20error%20that%20Solr%20started%20throwing%20the%20other%20day%20here%20at%20Plaxo.%20After%20happily%20running%20for%20a%20few%20days%2C%20I%20suddenly%20started%20getting%20pages%20about%20failed%20Solr%20indexing.%20%20Upon%20closer%20examination%2C%20I%20saw%20the%20following%20repeatedly%20in%20the%20log%20f&amp;short_link=http://bit.ly/dBdAdi&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=%5BSolr%5D+How+To+Fix+java.io.IOException%3A+directory+FOO+exists+and+is+a+directory%2C+but+cannot+be+listed%3A+list%28%29+returned+null&amp;link=http://beerpla.net/2009/09/21/solr-how-to-fix-java-io-ioexception-directory-foo-exists-and-is-a-directory-but-cannot-be-listed-list-returned-null/&amp;notes=The%20Problem%20%20I%20am%20throwing%20up%20a%20quick%20post%20about%20a%20relatively%20cryptic%20error%20that%20Solr%20started%20throwing%20the%20other%20day%20here%20at%20Plaxo.%20After%20happily%20running%20for%20a%20few%20days%2C%20I%20suddenly%20started%20getting%20pages%20about%20failed%20Solr%20indexing.%20%20Upon%20closer%20examination%2C%20I%20saw%20the%20following%20repeatedly%20in%20the%20log%20f&amp;short_link=http://bit.ly/dBdAdi&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=%5BSolr%5D+How+To+Fix+java.io.IOException%3A+directory+FOO+exists+and+is+a+directory%2C+but+cannot+be+listed%3A+list%28%29+returned+null&amp;link=http://beerpla.net/2009/09/21/solr-how-to-fix-java-io-ioexception-directory-foo-exists-and-is-a-directory-but-cannot-be-listed-list-returned-null/&amp;notes=The%20Problem%20%20I%20am%20throwing%20up%20a%20quick%20post%20about%20a%20relatively%20cryptic%20error%20that%20Solr%20started%20throwing%20the%20other%20day%20here%20at%20Plaxo.%20After%20happily%20running%20for%20a%20few%20days%2C%20I%20suddenly%20started%20getting%20pages%20about%20failed%20Solr%20indexing.%20%20Upon%20closer%20examination%2C%20I%20saw%20the%20following%20repeatedly%20in%20the%20log%20f&amp;short_link=http://bit.ly/dBdAdi&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=%5BSolr%5D+How+To+Fix+java.io.IOException%3A+directory+FOO+exists+and+is+a+directory%2C+but+cannot+be+listed%3A+list%28%29+returned+null&amp;link=http://beerpla.net/2009/09/21/solr-how-to-fix-java-io-ioexception-directory-foo-exists-and-is-a-directory-but-cannot-be-listed-list-returned-null/&amp;notes=The%20Problem%20%20I%20am%20throwing%20up%20a%20quick%20post%20about%20a%20relatively%20cryptic%20error%20that%20Solr%20started%20throwing%20the%20other%20day%20here%20at%20Plaxo.%20After%20happily%20running%20for%20a%20few%20days%2C%20I%20suddenly%20started%20getting%20pages%20about%20failed%20Solr%20indexing.%20%20Upon%20closer%20examination%2C%20I%20saw%20the%20following%20repeatedly%20in%20the%20log%20f&amp;short_link=http://bit.ly/dBdAdi&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=%5BSolr%5D+How+To+Fix+java.io.IOException%3A+directory+FOO+exists+and+is+a+directory%2C+but+cannot+be+listed%3A+list%28%29+returned+null&amp;link=http://beerpla.net/2009/09/21/solr-how-to-fix-java-io-ioexception-directory-foo-exists-and-is-a-directory-but-cannot-be-listed-list-returned-null/&amp;notes=The%20Problem%20%20I%20am%20throwing%20up%20a%20quick%20post%20about%20a%20relatively%20cryptic%20error%20that%20Solr%20started%20throwing%20the%20other%20day%20here%20at%20Plaxo.%20After%20happily%20running%20for%20a%20few%20days%2C%20I%20suddenly%20started%20getting%20pages%20about%20failed%20Solr%20indexing.%20%20Upon%20closer%20examination%2C%20I%20saw%20the%20following%20repeatedly%20in%20the%20log%20f&amp;short_link=http://bit.ly/dBdAdi&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=%5BSolr%5D+How+To+Fix+java.io.IOException%3A+directory+FOO+exists+and+is+a+directory%2C+but+cannot+be+listed%3A+list%28%29+returned+null&amp;link=http://beerpla.net/2009/09/21/solr-how-to-fix-java-io-ioexception-directory-foo-exists-and-is-a-directory-but-cannot-be-listed-list-returned-null/&amp;notes=The%20Problem%20%20I%20am%20throwing%20up%20a%20quick%20post%20about%20a%20relatively%20cryptic%20error%20that%20Solr%20started%20throwing%20the%20other%20day%20here%20at%20Plaxo.%20After%20happily%20running%20for%20a%20few%20days%2C%20I%20suddenly%20started%20getting%20pages%20about%20failed%20Solr%20indexing.%20%20Upon%20closer%20examination%2C%20I%20saw%20the%20following%20repeatedly%20in%20the%20log%20f&amp;short_link=http://bit.ly/dBdAdi&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=%5BSolr%5D%20How%20To%20Fix%20java.io.IOException%3A%20directory%20FOO%20exists%20and%20is%20a%20directory%2C%20but%20cannot%20be%20listed%3A%20list%28%29%20returned%20null&amp;link=http://beerpla.net/2009/09/21/solr-how-to-fix-java-io-ioexception-directory-foo-exists-and-is-a-directory-but-cannot-be-listed-list-returned-null/&amp;notes=The%20Problem%20%20I%20am%20throwing%20up%20a%20quick%20post%20about%20a%20relatively%20cryptic%20error%20that%20Solr%20started%20throwing%20the%20other%20day%20here%20at%20Plaxo.%20After%20happily%20running%20for%20a%20few%20days%2C%20I%20suddenly%20started%20getting%20pages%20about%20failed%20Solr%20indexing.%20%20Upon%20closer%20examination%2C%20I%20saw%20the%20following%20repeatedly%20in%20the%20log%20f&amp;short_link=http://bit.ly/dBdAdi&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2010/03/06/how-to-show-hiddeninvisible-files-in-total-commander-both-locally-and-on-an-ftp-server/" rel="bookmark" title="March 6, 2010">How To Show Hidden/Invisible Files In Total Commander, Both Locally And On An FTP Server</a></li><li><a
href="http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/" rel="bookmark" title="September 3, 2009">Comparison Between Solr And Sphinx Search Servers (Solr Vs Sphinx &#8211; Fight!)</a></li><li><a
href="http://beerpla.net/2007/08/04/watch-a-useful-linux-command-you-may-have-never-heard-of/" rel="bookmark" title="August 4, 2007">Watch &#8211; A Useful Linux Command You May Have Never Heard Of</a></li><li><a
href="http://beerpla.net/2009/04/08/perl-finding-files-the-fun-and-elegant-way/" rel="bookmark" title="April 8, 2009">[Perl] Finding Files, The Fun And Elegant Way</a></li><li><a
href="http://beerpla.net/2008/10/11/how-to-sort-folders-the-same-way-as-files-in-total-commander/" rel="bookmark" title="October 11, 2008">How To Sort Folders The Same Way As Files In Total Commander</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2009%2F09%2F21%2Fsolr-how-to-fix-java-io-ioexception-directory-foo-exists-and-is-a-directory-but-cannot-be-listed-list-returned-null%2F&amp;title=%5BSolr%5D%20How%20To%20Fix%20java.io.IOException%3A%20directory%20FOO%20exists%20and%20is%20a%20directory%2C%20but%20cannot%20be%20listed%3A%20list%28%29%20returned%20null" id="wpa2a_10"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2009/09/21/solr-how-to-fix-java-io-ioexception-directory-foo-exists-and-is-a-directory-but-cannot-be-listed-list-returned-null/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>How To Properly Set SVN svn:externals Property In SVN Command Line</title><link>http://beerpla.net/2009/06/20/how-to-properly-set-svn-svnexternals-property-in-svn-command-line/</link> <comments>http://beerpla.net/2009/06/20/how-to-properly-set-svn-svnexternals-property-in-svn-command-line/#comments</comments> <pubDate>Sun, 21 Jun 2009 02:01:26 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[SVN]]></category> <category><![CDATA[Technology]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Wordpress]]></category> <category><![CDATA[error]]></category> <category><![CDATA[external]]></category> <category><![CDATA[externals]]></category> <category><![CDATA[how]]></category> <category><![CDATA[propget]]></category> <category><![CDATA[propset]]></category> <category><![CDATA[set]]></category> <category><![CDATA[svn:externals]]></category> <guid
isPermaLink="false">http://beerpla.net/2009/06/20/how-to-properly-set-svn-svnexternals-property-in-svn-command-line/</guid> <description><![CDATA[<h2>Introduction</h2><p>Every time I have to deal with <a
href="http://svnbook.red-bean.com/en/1.0/ch07s03.html" rel="nofollow">svn:externals</a> in SVN, I forget the command line syntax. Every single damn time. Normally, I use SVN GUI clients, such as <a
href="http://www.smartsvn.com/" rel="nofollow">SmartSVN</a>, which make it very simple to add an svn:externals property. But for command line, it always takes looking at 25 different sites on google, which are all incredibly unhelpful for this question for some reason. Trying &#34;svn help propset&#34; on the command line was bloated and equally useless.</p><p>So this time I needed to write it down and make sure everyone who needed help with svn:externals would find exactly what they need here. I hope this page will soon come up on top of all the unhelpful results on ...<div
class=clear></div> <a
href="http://beerpla.net/2009/06/20/how-to-properly-set-svn-svnexternals-property-in-svn-command-line/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description> <content:encoded><![CDATA[<h2>Introduction</h2><p>Every time I have to deal with <a
href="http://svnbook.red-bean.com/en/1.0/ch07s03.html" rel="nofollow">svn:externals</a> in SVN, I forget the command line syntax. Every single damn time. Normally, I use SVN GUI clients, such as <a
href="http://www.smartsvn.com/" rel="nofollow">SmartSVN</a>, which make it very simple to add an svn:externals property. But for command line, it always takes looking at 25 different sites on google, which are all incredibly unhelpful for this question for some reason. Trying &quot;svn help propset&quot; on the command line was bloated and equally useless.</p><p>So this time I needed to write it down and make sure everyone who needed help with svn:externals would find exactly what they need here. I hope this page will soon come up on top of all the unhelpful results on google for &quot;propset svn:externals&quot; and other related queries.</p><h2>The Problem</h2><p>I want to set a simple svn:externals property in one of my project&#039;s directories, lets say &#039;plugins&#039; (talking about WordPress here). The outcome would be a directory called &#039;akismet&#039; within &#039;plugins&#039; that points to a remote svn url.</p><p>Various combinations of trying to do it produced pathetic results, like</p><div
class="wp_syntax"><div
class="code"><pre>svn propset svn:externals akismet http://plugins.svn.wordpress.org/akismet/trunk
svn: Setting property on non-local target 'http://plugins.svn.wordpress.org/akismet/trunk' needs a base revision</pre></div></div><div
class="wp_syntax"><div
class="code"><pre>svn propset svn:externals . akismet http://plugins.svn.wordpress.org/akismet/trunk
svn: Error parsing svn:externals property on 'akismet': '.'</pre></div></div><div
class="wp_syntax"><div
class="code"><pre>svn propset svn:externals akismet http://plugins.svn.wordpress.org/akismet/trunk akismet
svn: Setting property on non-local target 'http://plugins.svn.wordpress.org/akismet/trunk' needs a base revision</pre></div></div><h2>The Solution</h2><p>Finally, thanks to <a
href="http://www.nabble.com/svn:externals-example-td16552909.html" rel="nofollow">this post</a>, I found the right command:</p><div
class="wp_syntax"><div
class="code"><pre>svn propset svn:externals 'akismet http://plugins.svn.wordpress.org/akismet/trunk' .
property 'svn:externals' set on '.'</pre></div></div><p>Note that dot at the end of the command and the quotes around the directory name and url.</p><p>Now commit via</p><div
class="wp_syntax"><div
class="code"><pre>svn commit</pre></div></div><p>and then</p><div
class="wp_syntax"><div
class="code"><pre>svn up
Fetching external item into 'akismet'
A    akismet/akismet.gif
A    akismet/akismet.php
A    akismet/readme.txt
Updated external to revision 127962.
&nbsp;
Updated to revision 16.</pre></div></div><p>There, was it that hard, forum gurus and blog fiends?</p><p><strong>Edit</strong>: in order to set multiple directory/url pairs in a single svn:externals property, you should put the individual dir/url pairs into a file (let&#039;s call it &#039;svn.externals&#039;), like so</p><div
class="wp_syntax"><div
class="code"><pre>akismet http://svn.wp-plugins.org/akismet/trunk
all-in-one-seo-pack http://svn.wp-plugins.org/all-in-one-seo-pack/trunk</pre></div></div><p>and then apply the property using</p><div
class="wp_syntax"><div
class="code"><pre>svn propset svn:externals -F svn.externals .</pre></div></div><p>You should also just check in &#039;svn.externals&#039; to easily keep track of it.</p><p.One thing I haven't figured out yet is how to perform the same multi-operation without using a file. How does one do it on a single command line?</p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Properly+Set+SVN+svn%3Aexternals+Property+In+SVN+Command+Line&amp;link=http://beerpla.net/2009/06/20/how-to-properly-set-svn-svnexternals-property-in-svn-command-line/&amp;notes=Introduction%0D%0AEvery%20time%20I%20have%20to%20deal%20with%20svn%3Aexternals%20in%20SVN%2C%20I%20forget%20the%20command%20line%20syntax.%20Every%20single%20damn%20time.%20Normally%2C%20I%20use%20SVN%20GUI%20clients%2C%20such%20as%20SmartSVN%2C%20which%20make%20it%20very%20simple%20to%20add%20an%20svn%3Aexternals%20property.%20But%20for%20command%20line%2C%20it%20always%20takes%20looking%20at%2025%20different%20si&amp;short_link=http://bit.ly/bpA8jU&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Properly+Set+SVN+svn%3Aexternals+Property+In+SVN+Command+Line&amp;link=http://beerpla.net/2009/06/20/how-to-properly-set-svn-svnexternals-property-in-svn-command-line/&amp;notes=Introduction%0D%0AEvery%20time%20I%20have%20to%20deal%20with%20svn%3Aexternals%20in%20SVN%2C%20I%20forget%20the%20command%20line%20syntax.%20Every%20single%20damn%20time.%20Normally%2C%20I%20use%20SVN%20GUI%20clients%2C%20such%20as%20SmartSVN%2C%20which%20make%20it%20very%20simple%20to%20add%20an%20svn%3Aexternals%20property.%20But%20for%20command%20line%2C%20it%20always%20takes%20looking%20at%2025%20different%20si&amp;short_link=http://bit.ly/bpA8jU&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Properly+Set+SVN+svn%3Aexternals+Property+In+SVN+Command+Line&amp;link=http://beerpla.net/2009/06/20/how-to-properly-set-svn-svnexternals-property-in-svn-command-line/&amp;notes=Introduction%0D%0AEvery%20time%20I%20have%20to%20deal%20with%20svn%3Aexternals%20in%20SVN%2C%20I%20forget%20the%20command%20line%20syntax.%20Every%20single%20damn%20time.%20Normally%2C%20I%20use%20SVN%20GUI%20clients%2C%20such%20as%20SmartSVN%2C%20which%20make%20it%20very%20simple%20to%20add%20an%20svn%3Aexternals%20property.%20But%20for%20command%20line%2C%20it%20always%20takes%20looking%20at%2025%20different%20si&amp;short_link=http://bit.ly/bpA8jU&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Properly+Set+SVN+svn%3Aexternals+Property+In+SVN+Command+Line&amp;link=http://beerpla.net/2009/06/20/how-to-properly-set-svn-svnexternals-property-in-svn-command-line/&amp;notes=Introduction%0D%0AEvery%20time%20I%20have%20to%20deal%20with%20svn%3Aexternals%20in%20SVN%2C%20I%20forget%20the%20command%20line%20syntax.%20Every%20single%20damn%20time.%20Normally%2C%20I%20use%20SVN%20GUI%20clients%2C%20such%20as%20SmartSVN%2C%20which%20make%20it%20very%20simple%20to%20add%20an%20svn%3Aexternals%20property.%20But%20for%20command%20line%2C%20it%20always%20takes%20looking%20at%2025%20different%20si&amp;short_link=http://bit.ly/bpA8jU&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Properly+Set+SVN+svn%3Aexternals+Property+In+SVN+Command+Line&amp;link=http://beerpla.net/2009/06/20/how-to-properly-set-svn-svnexternals-property-in-svn-command-line/&amp;notes=Introduction%0D%0AEvery%20time%20I%20have%20to%20deal%20with%20svn%3Aexternals%20in%20SVN%2C%20I%20forget%20the%20command%20line%20syntax.%20Every%20single%20damn%20time.%20Normally%2C%20I%20use%20SVN%20GUI%20clients%2C%20such%20as%20SmartSVN%2C%20which%20make%20it%20very%20simple%20to%20add%20an%20svn%3Aexternals%20property.%20But%20for%20command%20line%2C%20it%20always%20takes%20looking%20at%2025%20different%20si&amp;short_link=http://bit.ly/bpA8jU&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Properly+Set+SVN+svn%3Aexternals+Property+In+SVN+Command+Line&amp;link=http://beerpla.net/2009/06/20/how-to-properly-set-svn-svnexternals-property-in-svn-command-line/&amp;notes=Introduction%0D%0AEvery%20time%20I%20have%20to%20deal%20with%20svn%3Aexternals%20in%20SVN%2C%20I%20forget%20the%20command%20line%20syntax.%20Every%20single%20damn%20time.%20Normally%2C%20I%20use%20SVN%20GUI%20clients%2C%20such%20as%20SmartSVN%2C%20which%20make%20it%20very%20simple%20to%20add%20an%20svn%3Aexternals%20property.%20But%20for%20command%20line%2C%20it%20always%20takes%20looking%20at%2025%20different%20si&amp;short_link=http://bit.ly/bpA8jU&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Properly+Set+SVN+svn%3Aexternals+Property+In+SVN+Command+Line&amp;link=http://beerpla.net/2009/06/20/how-to-properly-set-svn-svnexternals-property-in-svn-command-line/&amp;notes=Introduction%0D%0AEvery%20time%20I%20have%20to%20deal%20with%20svn%3Aexternals%20in%20SVN%2C%20I%20forget%20the%20command%20line%20syntax.%20Every%20single%20damn%20time.%20Normally%2C%20I%20use%20SVN%20GUI%20clients%2C%20such%20as%20SmartSVN%2C%20which%20make%20it%20very%20simple%20to%20add%20an%20svn%3Aexternals%20property.%20But%20for%20command%20line%2C%20it%20always%20takes%20looking%20at%2025%20different%20si&amp;short_link=http://bit.ly/bpA8jU&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=How%20To%20Properly%20Set%20SVN%20svn%3Aexternals%20Property%20In%20SVN%20Command%20Line&amp;link=http://beerpla.net/2009/06/20/how-to-properly-set-svn-svnexternals-property-in-svn-command-line/&amp;notes=Introduction%0D%0AEvery%20time%20I%20have%20to%20deal%20with%20svn%3Aexternals%20in%20SVN%2C%20I%20forget%20the%20command%20line%20syntax.%20Every%20single%20damn%20time.%20Normally%2C%20I%20use%20SVN%20GUI%20clients%2C%20such%20as%20SmartSVN%2C%20which%20make%20it%20very%20simple%20to%20add%20an%20svn%3Aexternals%20property.%20But%20for%20command%20line%2C%20it%20always%20takes%20looking%20at%2025%20different%20si&amp;short_link=http://bit.ly/bpA8jU&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2010/02/20/how-to-view-a-specific-svn-revision-in-your-browser/" rel="bookmark" title="February 20, 2010">How To View A Specific SVN Revision In Your Browser</a></li><li><a
href="http://beerpla.net/2008/06/16/how-to-svn-update-all-your-wordpress-plugins-in-one-go/" rel="bookmark" title="June 16, 2008">How To SVN Update All Your WordPress Plugins In One Go</a></li><li><a
href="http://beerpla.net/2011/11/16/how-to-disableblock-external-http-requests-in-wordpress/" rel="bookmark" title="November 16, 2011">How To: Disable/Block External HTTP Requests In WordPress</a></li><li><a
href="http://beerpla.net/2008/03/29/beer-planet-upgraded-to-wordpress-25/" rel="bookmark" title="March 29, 2008">Beer Planet Upgraded To WordPress 2.5</a></li><li><a
href="http://beerpla.net/2010/03/06/how-to-show-hiddeninvisible-files-in-total-commander-both-locally-and-on-an-ftp-server/" rel="bookmark" title="March 6, 2010">How To Show Hidden/Invisible Files In Total Commander, Both Locally And On An FTP Server</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2009%2F06%2F20%2Fhow-to-properly-set-svn-svnexternals-property-in-svn-command-line%2F&amp;title=How%20To%20Properly%20Set%20SVN%20svn%3Aexternals%20Property%20In%20SVN%20Command%20Line" id="wpa2a_12"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2009/06/20/how-to-properly-set-svn-svnexternals-property-in-svn-command-line/feed/</wfw:commentRss> <slash:comments>27</slash:comments> </item> <item><title>How To Make Your Site Lightning Fast* By Compressing (deflate/gzip) Your HTML, Javascript, CSS, XML, etc In Apache</title><link>http://beerpla.net/2009/06/09/how-to-make-your-site-lightning-fast-by-compressing-deflategzip-your-html-javascript-css-xml-etc-in-apache/</link> <comments>http://beerpla.net/2009/06/09/how-to-make-your-site-lightning-fast-by-compressing-deflategzip-your-html-javascript-css-xml-etc-in-apache/#comments</comments> <pubDate>Tue, 09 Jun 2009 17:02:00 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Technology]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Wordpress]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[compress]]></category> <category><![CDATA[compression]]></category> <category><![CDATA[deflate]]></category> <category><![CDATA[fast]]></category> <category><![CDATA[faster]]></category> <category><![CDATA[gzip]]></category> <category><![CDATA[html]]></category> <category><![CDATA[js]]></category> <category><![CDATA[minify]]></category> <category><![CDATA[mod_deflate]]></category> <category><![CDATA[smaller]]></category> <category><![CDATA[text]]></category> <category><![CDATA[xml]]></category> <guid
isPermaLink="false">http://beerpla.net/?p=982</guid> <description><![CDATA[<p><span
style="font-size: xx-small">* Lightning Fast is a blatant exaggeration. Got you to look though, didn&#039;t it?</span></p><h2>Introduction</h2><p>Whether you are a web developer or a self-hosting business owner, the only excuse for not activating compression capabilities of your web server can be that you didn&#039;t know about it. And now that you are reading this, there is no excuse left at all.</p><p>Here is how big a single page of this blog was before compression was enabled on CSS and Javascript files (computed by <a
href="http://developer.yahoo.com/yslow/" rel="nofollow">YSlow</a>):</p><p><a
href="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_3.png" class="lightview" rel="gallery['982']" title="image"><img
style="display: inline; margin-left: 0px; margin-right: 0px" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_thumb_3.png" width="132" height="24" /></a></p><p>And here it is after compression:</p><p><a
href="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_4.png" class="lightview" rel="gallery['982']" title="image"><img
style="display: inline; margin-left: 0px; margin-right: 0px" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_thumb_4.png" width="136" height="28" /></a></p><p>As you see, the difference is quite substantial &#8211; almost 30% savings.</p><p>Compressing your HTML, XML, Javascript, CSS, etc pages will mean less data transferred between the server and the ...<div
class=clear></div> <a
href="http://beerpla.net/2009/06/09/how-to-make-your-site-lightning-fast-by-compressing-deflategzip-your-html-javascript-css-xml-etc-in-apache/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description> <content:encoded><![CDATA[<p><span
style="font-size: xx-small">* Lightning Fast is a blatant exaggeration. Got you to look though, didn&#039;t it?</span></p><h2>Introduction</h2><p>Whether you are a web developer or a self-hosting business owner, the only excuse for not activating compression capabilities of your web server can be that you didn&#039;t know about it. And now that you are reading this, there is no excuse left at all.</p><p>Here is how big a single page of this blog was before compression was enabled on CSS and Javascript files (computed by <a
href="http://developer.yahoo.com/yslow/" rel="nofollow">YSlow</a>):</p><p><a
href="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_3.png" class="lightview" rel="gallery['982']" title="image"><img
style="display: inline; margin-left: 0px; margin-right: 0px" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_thumb_3.png" width="132" height="24" /></a></p><p>And here it is after compression:</p><p><a
href="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_4.png" class="lightview" rel="gallery['982']" title="image"><img
style="display: inline; margin-left: 0px; margin-right: 0px" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_thumb_4.png" width="136" height="28" /></a></p><p>As you see, the difference is quite substantial &#8211; almost 30% savings.</p><p>Compressing your HTML, XML, Javascript, CSS, etc pages will mean less data transferred between the server and the client which:</p><ul><li>reduces the bandwidth usage.</li><li>provides faster page rendering which in turn leads to less user frustration, higher conversion rates, lower bounce rate, etc etc etc.</li></ul><p>Compression is especially important for users with slow connections as every kilobyte of your code is that much more painful to them.</p><p>Compression can be very effective &#8211; you can easily shrink your text, code (HTML, XML, Javascript, CSS, etc) to 10% of the original size (of course, your mileage may vary). 100KB page that needs only 10KB to transfer? Sign me up!</p><p>So, before I talk about the solution, let me describe what exactly happens when compression is turned on and how it affects older browsers that don&#039;t support it.</p><p><div
class="note"><div
class="notetip"></p><p><a
href="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_17.png" class="lightview" rel="gallery['982']" title="image"><img
style="margin: 0px auto 10px; display: block; float: none" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_thumb_17.png" width="292" height="177" /></a> <strong>Are you using jQuery?</strong></p><p>Did you know that a minified jQuery file is <strong>55KB</strong>? In order to achieve the advertised <strong>19KB</strong>, you would still need to compress the .js file using the methods listed here.</div></div></p><h2>Compression Mechanism Explained</h2><p>In order for compression to work in the first place, the web server (Apache in my example) needs to support it. This is achieved by enabling one of Apache modules called mod_deflate. The server will then be able to compress the data to the DEFLATE standard using either the zlib (also known as deflate) or gzip implementations. Yeah, DEFLATE is both the standard the one of its implementations, for those confused. I know I was. This is best described in <a
href="http://en.wikipedia.org/wiki/Gzip#Other_uses" rel="nofollow">this Wikipedia article</a>.</p><p>The following mechanism is used:</p><ul><li>the server with a compression extension enabled is able to serve either compressed (smaller) or uncompressed (larger) pages, depending on what the client supports.</li><li>the client (that is, your browser) sends a special header called &quot;Accept-Encoding&quot; listing the DEFLATE implementations it&#039;s capable of decompressing. For example &quot;gzip,deflate&quot;.</li><li>the server picks the best compression supported by the client (if any), compresses the files, and sends them over to the client.</li><li>the client receives the compressed files and decompresses them.</li></ul><p><div
class="note"><div
class="notetip"><strong>Are you using a load blancer?</strong></p><p>If you are using a load balancer, it may already be configured to compress pages that pass through it. In that case, there is no need to separately configure compression on your web servers. In fact, it should be off to save CPU.</div></div></p><h2>Are Your Pages Already Compressed? Test Them!</h2><p>If you are not sure whether you are already serving compressed pages or not, test them! My favorite way is by using <a
href="http://www.charlesproxy.com/" rel="nofollow">Charles HTTP Debugger</a>. Another option is by downloading <a
href="http://getfirebug.com/" rel="nofollow">Firebug</a> for Firefox and installing Yahoo&#039;s <a
href="http://developer.yahoo.com/yslow/" rel="nofollow">YSlow</a> or Google&#039;s <a
href="http://code.google.com/speed/page-speed/" rel="nofollow">Page Speed</a>. Just look at the response headers to see if compression is on (look for the Content-Encoding header). Here are some before and after examples:</p><h3>Theme CSS</h3><p><a
href="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_5.png" class="lightview" rel="gallery['982']" title="image"><img
style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_thumb_5.png" width="427" height="36" /></a></p><p>Before:</p><p><a
href="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_6.png" class="lightview" rel="gallery['982']" title="image"><img
style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_thumb_6.png" width="266" height="136" /></a></p><p>After:</p><p><a
href="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_7.png" class="lightview" rel="gallery['982']" title="image"><img
style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_thumb_7.png" width="267" height="161" /></a></p><h3>jQuery</h3><p><a
href="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_8.png" class="lightview" rel="gallery['982']" title="image"><img
style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_thumb_8.png" width="469" height="39" /></a></p><p>Before:</p><p><a
href="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_9.png" class="lightview" rel="gallery['982']" title="image"><img
style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_thumb_9.png" width="263" height="132" /></a></p><p>After:</p><p><a
href="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_10.png" class="lightview" rel="gallery['982']" title="image"><img
style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_thumb_10.png" width="273" height="168" /></a></p><h2>Solution</h2><p>Create a .htaccess file in the top directory of your site with the following contents:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td
class="code"><pre># DEFLATE by type - html, text, css, xml
AddOutputFilterByType DEFLATE text/html text/plain text/css text/xml
&nbsp;
# DEFLATE by type - javascript
AddOutputFilterByType DEFLATE application/x-javascript application/javascript text/javascript text/x-js text/x-javascript
&nbsp;
# DEFLATE by extension
AddOutputFilter DEFLATE js css htm html xml</pre></td></tr></table></div><p>Alternatively, you could put these lines into your Apache config within the Directory directive.</p><p>The <a
href="http://httpd.apache.org/docs/2.2/mod/core.html#addoutputfilterbytype" rel="nofollow">AddOutputFilterByType</a> directive adds DEFLATE filters to certain MIME types. I tried to assemble some of the common ones but feel free to add more, as each server may be configured differently and give out MIME types different from mine.</p><p><div
class="note"><div
class="notetip">You can find your own server&#039;s MIME type definitions in the file that the TypesConfig directive is pointing to (mine is /etc/mime.types).</div></div></p><p>The <a
href="http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addoutputfilter" rel="nofollow">AddOutputFilter</a> directive binds the DEFLATE filter to specific file extensions, just in case they are not served with a proper MIME type. Feel free to add to this list as well.</p><h2>Caveats</h2><p>1. In order to use this whole compression/deflate/gzip business, your Apache server must first have mod_deflate enabled. Without it, you will get the HTTP 500 error (Internal Server error). You can check which mods you already have enabled by checking with the output of phpinfo() function.</p><p><a
href="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_13.png" class="lightview" rel="gallery['982']" title="image"><img
style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_thumb_13.png" width="606" height="97" /></a></p><p>In order to enable mod_deflate, uncomment the line with &quot;deflate_module&quot; in your Apache config file. The location of this config file is highly dependant on your system. Some examples include</p><ul><li>/etc/apache2/httpd.conf</li><li>/etc/httpd/conf/httpd.conf</li><li>c:\wamp\bin\apache\Apache2.2.11\conf\httpd.conf</li><li>some other place where your system stores Apache config files (read the special note below for OpenSUSE).</li></ul><p>Here&#039;s what you should have:</p><div
class="wp_syntax"><div
class="code"><pre>LoadModule deflate_module modules/mod_deflate.so</pre></div></div><p>On OpenSUSE, you actually enable modules a bit differently. Go to /etc/sysconfig/apache2 and look for APACHE_MODULES=. Then add &quot;deflate&quot; to the list, if it&#039;s not already there.</p><p>Now, restart Apache and check the output of phpinfo() again.</p><p>2. Adding AddOutputFilter and AddOutputFilterByType to .htaccess requires such overrides to be authorized by the main Apache configuration for that directory, otherwise it will return error 500 as well. The option you are looking for is called &quot;AllowOverride&quot; and mine was set to &quot;AllowOverride AuthConfig&quot; which wasn&#039;t enough. Changing it to</p><div
class="wp_syntax"><div
class="code"><pre>AllowOverride AuthConfig FileInfo</pre></div></div><p>or just</p><div
class="wp_syntax"><div
class="code"><pre>AllowOverride All</pre></div></div><p>fixes the problem. You can find more info about AllowOverride <a
href="http://httpd.apache.org/docs/1.3/mod/core.html#allowoverride" rel="nofollow">here</a>.</p><p>3. In WordPress, if you are using Google Gears (<a
href="http://en.blog.wordpress.com/2008/07/02/gears/" rel="nofollow">Turbo mode</a>) for caching some core WordPress files, they will not show up compressed. That is because they&#039;re not served by the remote server but rather reside locally (think of it as permanent cache). I was very confused at first when I didn&#039;t see jQuery.js in the HTTP log and YSlow reported it uncompressed.</p><h2>Are you a WordPress user?</h2><p>If you are a WordPress user, don&#039;t assume WordPress is going to automatically compress your pages. In fact, as you install more and more plugins, the payload becomes larger and larger with those additional CSS and Javascript files.</p><p>You owe it to yourself and to your users to immediately enable compression on your blog.</p><p>Here is what happened after I enabled compression on this blog.</p><p>Before:</p><p><a
href="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_11.png" class="lightview" rel="gallery['982']" title="image"><img
style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_thumb_11.png" width="676" height="418" /></a></p><p>After:</p><p><a
href="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_12.png" class="lightview" rel="gallery['982']" title="image"><img
style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_thumb_12.png" width="440" height="115" /></a></p><h2>Bonus &#8211; WP Minify</h2><p>For even better results, I suggest you have a look at my good friend and talented WordPress master Thaya&#039;s plugin called <a
href="http://omninoggin.com/wordpress-plugins/wp-minify-wordpress-plugin/">WP Minify</a>. It preprocesses and aggregates all or most of your CSS and Javascript into just 2 files, thus saving on the number of HTTP requests. It also minifies content to achieve smaller size.</p><p>My blog before WP Minify:</p><p><a
href="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_14.png" class="lightview" rel="gallery['982']" title="image"><img
style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_thumb_14.png" width="413" height="62" /></a></p><p>After WP Minify:</p><p><a
href="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_15.png" class="lightview" rel="gallery['982']" title="image"><img
style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/HowToCompressdeflategzipYourPagesJavascr_11A9F/image_thumb_15.png" width="408" height="59" /></a></p><p>&#160;</p><p>That&#039;s all folks. Let me know if something was unclear and I&#039;ll be glad to clarify it.</p><p>A few references that pointed me in the right direction and allowed me to provide a more complete solution:</p><ul><li><a
title="http://brightscape.net/compress-jquery-even-further/" href="http://brightscape.net/compress-jquery-even-further/">http://brightscape.net/compress-jquery-even-further/</a></li><li><a
title="http://brightscape.net/compress-your-web-pages-with-mod_deflate/" href="http://brightscape.net/compress-your-web-pages-with-mod_deflate/">http://brightscape.net/compress-your-web-pages-with-mod_deflate/</a></li></ul><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Make+Your+Site+Lightning+Fast%2A+By+Compressing+%28deflate%2Fgzip%29+Your+HTML%2C+Javascript%2C+CSS%2C+XML%2C+etc+In+Apache&amp;link=http://beerpla.net/2009/06/09/how-to-make-your-site-lightning-fast-by-compressing-deflategzip-your-html-javascript-css-xml-etc-in-apache/&amp;notes=%2A%20Lightning%20Fast%20is%20a%20blatant%20exaggeration.%20Got%20you%20to%20look%20though%2C%20didn%27t%20it%3F%20%20Introduction%20%20Whether%20you%20are%20a%20web%20developer%20or%20a%20self-hosting%20business%20owner%2C%20the%20only%20excuse%20for%20not%20activating%20compression%20capabilities%20of%20your%20web%20server%20can%20be%20that%20you%20didn%27t%20know%20about%20it.%20And%20now%20that%20you%20are%20re&amp;short_link=http://bit.ly/c6Upm4&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Make+Your+Site+Lightning+Fast%2A+By+Compressing+%28deflate%2Fgzip%29+Your+HTML%2C+Javascript%2C+CSS%2C+XML%2C+etc+In+Apache&amp;link=http://beerpla.net/2009/06/09/how-to-make-your-site-lightning-fast-by-compressing-deflategzip-your-html-javascript-css-xml-etc-in-apache/&amp;notes=%2A%20Lightning%20Fast%20is%20a%20blatant%20exaggeration.%20Got%20you%20to%20look%20though%2C%20didn%27t%20it%3F%20%20Introduction%20%20Whether%20you%20are%20a%20web%20developer%20or%20a%20self-hosting%20business%20owner%2C%20the%20only%20excuse%20for%20not%20activating%20compression%20capabilities%20of%20your%20web%20server%20can%20be%20that%20you%20didn%27t%20know%20about%20it.%20And%20now%20that%20you%20are%20re&amp;short_link=http://bit.ly/c6Upm4&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Make+Your+Site+Lightning+Fast%2A+By+Compressing+%28deflate%2Fgzip%29+Your+HTML%2C+Javascript%2C+CSS%2C+XML%2C+etc+In+Apache&amp;link=http://beerpla.net/2009/06/09/how-to-make-your-site-lightning-fast-by-compressing-deflategzip-your-html-javascript-css-xml-etc-in-apache/&amp;notes=%2A%20Lightning%20Fast%20is%20a%20blatant%20exaggeration.%20Got%20you%20to%20look%20though%2C%20didn%27t%20it%3F%20%20Introduction%20%20Whether%20you%20are%20a%20web%20developer%20or%20a%20self-hosting%20business%20owner%2C%20the%20only%20excuse%20for%20not%20activating%20compression%20capabilities%20of%20your%20web%20server%20can%20be%20that%20you%20didn%27t%20know%20about%20it.%20And%20now%20that%20you%20are%20re&amp;short_link=http://bit.ly/c6Upm4&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Make+Your+Site+Lightning+Fast%2A+By+Compressing+%28deflate%2Fgzip%29+Your+HTML%2C+Javascript%2C+CSS%2C+XML%2C+etc+In+Apache&amp;link=http://beerpla.net/2009/06/09/how-to-make-your-site-lightning-fast-by-compressing-deflategzip-your-html-javascript-css-xml-etc-in-apache/&amp;notes=%2A%20Lightning%20Fast%20is%20a%20blatant%20exaggeration.%20Got%20you%20to%20look%20though%2C%20didn%27t%20it%3F%20%20Introduction%20%20Whether%20you%20are%20a%20web%20developer%20or%20a%20self-hosting%20business%20owner%2C%20the%20only%20excuse%20for%20not%20activating%20compression%20capabilities%20of%20your%20web%20server%20can%20be%20that%20you%20didn%27t%20know%20about%20it.%20And%20now%20that%20you%20are%20re&amp;short_link=http://bit.ly/c6Upm4&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Make+Your+Site+Lightning+Fast%2A+By+Compressing+%28deflate%2Fgzip%29+Your+HTML%2C+Javascript%2C+CSS%2C+XML%2C+etc+In+Apache&amp;link=http://beerpla.net/2009/06/09/how-to-make-your-site-lightning-fast-by-compressing-deflategzip-your-html-javascript-css-xml-etc-in-apache/&amp;notes=%2A%20Lightning%20Fast%20is%20a%20blatant%20exaggeration.%20Got%20you%20to%20look%20though%2C%20didn%27t%20it%3F%20%20Introduction%20%20Whether%20you%20are%20a%20web%20developer%20or%20a%20self-hosting%20business%20owner%2C%20the%20only%20excuse%20for%20not%20activating%20compression%20capabilities%20of%20your%20web%20server%20can%20be%20that%20you%20didn%27t%20know%20about%20it.%20And%20now%20that%20you%20are%20re&amp;short_link=http://bit.ly/c6Upm4&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Make+Your+Site+Lightning+Fast%2A+By+Compressing+%28deflate%2Fgzip%29+Your+HTML%2C+Javascript%2C+CSS%2C+XML%2C+etc+In+Apache&amp;link=http://beerpla.net/2009/06/09/how-to-make-your-site-lightning-fast-by-compressing-deflategzip-your-html-javascript-css-xml-etc-in-apache/&amp;notes=%2A%20Lightning%20Fast%20is%20a%20blatant%20exaggeration.%20Got%20you%20to%20look%20though%2C%20didn%27t%20it%3F%20%20Introduction%20%20Whether%20you%20are%20a%20web%20developer%20or%20a%20self-hosting%20business%20owner%2C%20the%20only%20excuse%20for%20not%20activating%20compression%20capabilities%20of%20your%20web%20server%20can%20be%20that%20you%20didn%27t%20know%20about%20it.%20And%20now%20that%20you%20are%20re&amp;short_link=http://bit.ly/c6Upm4&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Make+Your+Site+Lightning+Fast%2A+By+Compressing+%28deflate%2Fgzip%29+Your+HTML%2C+Javascript%2C+CSS%2C+XML%2C+etc+In+Apache&amp;link=http://beerpla.net/2009/06/09/how-to-make-your-site-lightning-fast-by-compressing-deflategzip-your-html-javascript-css-xml-etc-in-apache/&amp;notes=%2A%20Lightning%20Fast%20is%20a%20blatant%20exaggeration.%20Got%20you%20to%20look%20though%2C%20didn%27t%20it%3F%20%20Introduction%20%20Whether%20you%20are%20a%20web%20developer%20or%20a%20self-hosting%20business%20owner%2C%20the%20only%20excuse%20for%20not%20activating%20compression%20capabilities%20of%20your%20web%20server%20can%20be%20that%20you%20didn%27t%20know%20about%20it.%20And%20now%20that%20you%20are%20re&amp;short_link=http://bit.ly/c6Upm4&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=How%20To%20Make%20Your%20Site%20Lightning%20Fast%2A%20By%20Compressing%20%28deflate%2Fgzip%29%20Your%20HTML%2C%20Javascript%2C%20CSS%2C%20XML%2C%20etc%20In%20Apache&amp;link=http://beerpla.net/2009/06/09/how-to-make-your-site-lightning-fast-by-compressing-deflategzip-your-html-javascript-css-xml-etc-in-apache/&amp;notes=%2A%20Lightning%20Fast%20is%20a%20blatant%20exaggeration.%20Got%20you%20to%20look%20though%2C%20didn%27t%20it%3F%20%20Introduction%20%20Whether%20you%20are%20a%20web%20developer%20or%20a%20self-hosting%20business%20owner%2C%20the%20only%20excuse%20for%20not%20activating%20compression%20capabilities%20of%20your%20web%20server%20can%20be%20that%20you%20didn%27t%20know%20about%20it.%20And%20now%20that%20you%20are%20re&amp;short_link=http://bit.ly/c6Upm4&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2008/03/29/beer-planet-upgraded-to-wordpress-25/" rel="bookmark" title="March 29, 2008">Beer Planet Upgraded To WordPress 2.5</a></li><li><a
href="http://beerpla.net/2010/01/13/wordpress-plugin-development-how-to-include-css-and-javascript-conditionally-and-only-when-needed-by-the-posts/" rel="bookmark" title="January 13, 2010">[WordPress Plugin Development] How To Include CSS and JavaScript Conditionally And Only When Needed By The Posts</a></li><li><a
href="http://beerpla.net/2009/06/21/hidden-features-of-perl-php-javascript-c-c-c-java-ruby-python-and-others-collection-of-incredibly-useful-lists/" rel="bookmark" title="June 21, 2009">Hidden Features Of Perl, PHP, Javascript, C, C++, C#, Java, Ruby, Python, And Others [Collection Of Incredibly Useful Lists]</a></li><li><a
href="http://beerpla.net/2006/06/12/rendr-a-live-awesome-csshtml-rendering-tool/" rel="bookmark" title="June 12, 2006">Rendr &#8211; a Live Awesome CSS/HTML Rendering Tool</a></li><li><a
href="http://beerpla.net/2007/10/12/cpan-the-perl-module-manager/" rel="bookmark" title="October 12, 2007">cpan &#8211; The Perl Module Manager</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2009%2F06%2F09%2Fhow-to-make-your-site-lightning-fast-by-compressing-deflategzip-your-html-javascript-css-xml-etc-in-apache%2F&amp;title=How%20To%20Make%20Your%20Site%20Lightning%20Fast%2A%20By%20Compressing%20%28deflate%2Fgzip%29%20Your%20HTML%2C%20Javascript%2C%20CSS%2C%20XML%2C%20etc%20In%20Apache" id="wpa2a_14"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2009/06/09/how-to-make-your-site-lightning-fast-by-compressing-deflategzip-your-html-javascript-css-xml-etc-in-apache/feed/</wfw:commentRss> <slash:comments>19</slash:comments> </item> <item><title>[Perl] Finding Files, The Fun And Elegant Way</title><link>http://beerpla.net/2009/04/08/perl-finding-files-the-fun-and-elegant-way/</link> <comments>http://beerpla.net/2009/04/08/perl-finding-files-the-fun-and-elegant-way/#comments</comments> <pubDate>Wed, 08 Apr 2009 14:00:00 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Awesomeness]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Perl]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[efficient]]></category> <category><![CDATA[elegant]]></category> <category><![CDATA[file]]></category> <category><![CDATA[find]]></category> <category><![CDATA[follow]]></category> <category><![CDATA[fun]]></category> <category><![CDATA[robust]]></category> <category><![CDATA[search]]></category> <category><![CDATA[skip]]></category> <category><![CDATA[SVN]]></category> <category><![CDATA[symlink]]></category> <guid
isPermaLink="false">http://beerpla.net/2009/04/08/perl-finding-files-the-fun-and-elegant-way/</guid> <description><![CDATA[<p>No matter what programming language you use, there comes a time when you need to search for a file somewhere on the file system. Here, I want to talk about accomplishing this task in Perl. There are many ways of doing so, most of them boring, but I want to discuss the fun and elegant way &#8211; using <a
href="http://search.cpan.org/dist/File-Find-Rule/lib/File/Find/Rule.pm" rel="nofollow">File::Find::Rule</a>.</p><p>Let me briefly discuss some of the other methods first.</p><h2>Limited</h2><p>Using glob() (or &#60;&#62;, TODO verify) you can find files in a single directory, using only the limited shell wildcard support. For example,</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre>my @files = glob(&#34;tmp*&#34;);</pre></td></tr></table></div><p><div
class="note"><div
class="noteclassic">I prefer glob() to &#60;&#62; because glob()&#039;s parameters can be more than just text (for ex functions) while &#60;&#62; treats everything</div></div>...<div
class=clear></div> <a
href="http://beerpla.net/2009/04/08/perl-finding-files-the-fun-and-elegant-way/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description> <content:encoded><![CDATA[<p>No matter what programming language you use, there comes a time when you need to search for a file somewhere on the file system. Here, I want to talk about accomplishing this task in Perl. There are many ways of doing so, most of them boring, but I want to discuss the fun and elegant way &#8211; using <a
href="http://search.cpan.org/dist/File-Find-Rule/lib/File/Find/Rule.pm" rel="nofollow">File::Find::Rule</a>.</p><p>Let me briefly discuss some of the other methods first.</p><h2>Limited</h2><p>Using glob() (or &lt;&gt;, TODO verify) you can find files in a single directory, using only the limited shell wildcard support. For example,</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre>my @files = glob(&quot;tmp*&quot;);</pre></td></tr></table></div><p><div
class="note"><div
class="noteclassic">I prefer glob() to &lt;&gt; because glob()&#039;s parameters can be more than just text (for ex functions) while &lt;&gt; treats everything inside as text.</div></div></p><h2>Boring</h2><p><a
title="http://search.cpan.org/~nwclark/perl-5.8.9/lib/File/Find.pm" href="http://search.cpan.org/~nwclark/perl-5.8.9/lib/File/Find.pm">File::Find</a> is the de facto standard for searching in Perl.</p><p>This method finds files that end in .pl in &quot;.&quot; and &quot;../SomeDir&quot;, following symlinks:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td
class="code"><pre>#!/usr/bin/perl -w
&nbsp;
use File::Find;
use Data::Dumper;
use File::Basename;
my @directories_to_search = (&quot;.&quot;, &quot;../SomeDir&quot;);
my @file_list = ();
&nbsp;
find(
  { wanted =&gt;
    sub {
      if ( basename($File::Find::name) =~ /\.pl$/i )
      {
        push @file_list, $File::Find::name;
      }
    },
    follow =&gt; 1
  },
  @directories_to_search
);
print Dumper @file_list;</pre></td></tr></table></div><p>It works fine, except it&#039;s horribly ugly and boring. Let&#039;s have a look at something more fun.</p><h2>The Fun And Elegant Way</h2><p><a
title="http://search.cpan.org/dist/File-Find-Rule/lib/File/Find/Rule.pm" href="http://search.cpan.org/dist/File-Find-Rule/lib/File/Find/Rule.pm" rel="nofollow">File::Find::Rule</a>. Just have a look at this beauty.</p><p>Just like above, find all .pl files in &quot;.&quot; and &quot;../SomeDir&quot;, following symlinks:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
</pre></td><td
class="code"><pre>print Dumper (File::Find::Rule-&gt;name(&quot;*.pl&quot;)-&gt;file-&gt;extras({ follow =&gt; 1 })-&gt;
in(&quot;.&quot;, &quot;../SomeDir&quot;));</pre></td></tr></table></div><p>Same as above, except bypass .svn directories (shaves off a ton of time with a lot of directories):</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
</pre></td><td
class="code"><pre>print Dumper (File::Find::Rule-&gt;not(File::Find::Rule-&gt;directory-&gt;name('.svn')-&gt;
prune-&gt;discard)-&gt;name(&quot;*.pl&quot;)-&gt;file-&gt;extras({ follow =&gt; 1 })-&gt;in(&quot;.&quot;, &quot;../SomeDir&quot;));</pre></td></tr></table></div><p>Find all .log files that are older than 24 hours in &quot;.&quot;</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
</pre></td><td
class="code"><pre>my $epoch_time_1_day_ago = time() - 60*60*24;
print Dumper (File::Find::Rule-&gt;file-&gt;name(&quot;*.log&quot;)-&gt;
mtime(&quot;&lt;$epoch_time_1_day_ago&quot;)-&gt;in('.'));</pre></td></tr></table></div><p>Be sure to read the <a
href="http://search.cpan.org/dist/File-Find-Rule/lib/File/Find/Rule.pm" rel="nofollow">File::Find::Rule</a> perldoc for more options and remember: have fun with your code!<a
href="http://www.weblocal.ca"></a></p><p>Thanks to <a
href="http://perlbuzz.com/" rel="nofollow">Perlbuzz</a> and Andy Lester for <a
href="http://perlbuzz.com/mechanix/2008/05/optimizing-file-searches-with.html" rel="nofollow">pointing me</a> to this library a few months ago.</p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=%5BPerl%5D+Finding+Files%2C+The+Fun+And+Elegant+Way&amp;link=http://beerpla.net/2009/04/08/perl-finding-files-the-fun-and-elegant-way/&amp;notes=No%20matter%20what%20programming%20language%20you%20use%2C%20there%20comes%20a%20time%20when%20you%20need%20to%20search%20for%20a%20file%20somewhere%20on%20the%20file%20system.%20Here%2C%20I%20want%20to%20talk%20about%20accomplishing%20this%20task%20in%20Perl.%20There%20are%20many%20ways%20of%20doing%20so%2C%20most%20of%20them%20boring%2C%20but%20I%20want%20to%20discuss%20the%20fun%20and%20elegant%20way%20-%20using%20Fil&amp;short_link=http://bit.ly/caZusS&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=%5BPerl%5D+Finding+Files%2C+The+Fun+And+Elegant+Way&amp;link=http://beerpla.net/2009/04/08/perl-finding-files-the-fun-and-elegant-way/&amp;notes=No%20matter%20what%20programming%20language%20you%20use%2C%20there%20comes%20a%20time%20when%20you%20need%20to%20search%20for%20a%20file%20somewhere%20on%20the%20file%20system.%20Here%2C%20I%20want%20to%20talk%20about%20accomplishing%20this%20task%20in%20Perl.%20There%20are%20many%20ways%20of%20doing%20so%2C%20most%20of%20them%20boring%2C%20but%20I%20want%20to%20discuss%20the%20fun%20and%20elegant%20way%20-%20using%20Fil&amp;short_link=http://bit.ly/caZusS&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=%5BPerl%5D+Finding+Files%2C+The+Fun+And+Elegant+Way&amp;link=http://beerpla.net/2009/04/08/perl-finding-files-the-fun-and-elegant-way/&amp;notes=No%20matter%20what%20programming%20language%20you%20use%2C%20there%20comes%20a%20time%20when%20you%20need%20to%20search%20for%20a%20file%20somewhere%20on%20the%20file%20system.%20Here%2C%20I%20want%20to%20talk%20about%20accomplishing%20this%20task%20in%20Perl.%20There%20are%20many%20ways%20of%20doing%20so%2C%20most%20of%20them%20boring%2C%20but%20I%20want%20to%20discuss%20the%20fun%20and%20elegant%20way%20-%20using%20Fil&amp;short_link=http://bit.ly/caZusS&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=%5BPerl%5D+Finding+Files%2C+The+Fun+And+Elegant+Way&amp;link=http://beerpla.net/2009/04/08/perl-finding-files-the-fun-and-elegant-way/&amp;notes=No%20matter%20what%20programming%20language%20you%20use%2C%20there%20comes%20a%20time%20when%20you%20need%20to%20search%20for%20a%20file%20somewhere%20on%20the%20file%20system.%20Here%2C%20I%20want%20to%20talk%20about%20accomplishing%20this%20task%20in%20Perl.%20There%20are%20many%20ways%20of%20doing%20so%2C%20most%20of%20them%20boring%2C%20but%20I%20want%20to%20discuss%20the%20fun%20and%20elegant%20way%20-%20using%20Fil&amp;short_link=http://bit.ly/caZusS&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=%5BPerl%5D+Finding+Files%2C+The+Fun+And+Elegant+Way&amp;link=http://beerpla.net/2009/04/08/perl-finding-files-the-fun-and-elegant-way/&amp;notes=No%20matter%20what%20programming%20language%20you%20use%2C%20there%20comes%20a%20time%20when%20you%20need%20to%20search%20for%20a%20file%20somewhere%20on%20the%20file%20system.%20Here%2C%20I%20want%20to%20talk%20about%20accomplishing%20this%20task%20in%20Perl.%20There%20are%20many%20ways%20of%20doing%20so%2C%20most%20of%20them%20boring%2C%20but%20I%20want%20to%20discuss%20the%20fun%20and%20elegant%20way%20-%20using%20Fil&amp;short_link=http://bit.ly/caZusS&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=%5BPerl%5D+Finding+Files%2C+The+Fun+And+Elegant+Way&amp;link=http://beerpla.net/2009/04/08/perl-finding-files-the-fun-and-elegant-way/&amp;notes=No%20matter%20what%20programming%20language%20you%20use%2C%20there%20comes%20a%20time%20when%20you%20need%20to%20search%20for%20a%20file%20somewhere%20on%20the%20file%20system.%20Here%2C%20I%20want%20to%20talk%20about%20accomplishing%20this%20task%20in%20Perl.%20There%20are%20many%20ways%20of%20doing%20so%2C%20most%20of%20them%20boring%2C%20but%20I%20want%20to%20discuss%20the%20fun%20and%20elegant%20way%20-%20using%20Fil&amp;short_link=http://bit.ly/caZusS&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=%5BPerl%5D+Finding+Files%2C+The+Fun+And+Elegant+Way&amp;link=http://beerpla.net/2009/04/08/perl-finding-files-the-fun-and-elegant-way/&amp;notes=No%20matter%20what%20programming%20language%20you%20use%2C%20there%20comes%20a%20time%20when%20you%20need%20to%20search%20for%20a%20file%20somewhere%20on%20the%20file%20system.%20Here%2C%20I%20want%20to%20talk%20about%20accomplishing%20this%20task%20in%20Perl.%20There%20are%20many%20ways%20of%20doing%20so%2C%20most%20of%20them%20boring%2C%20but%20I%20want%20to%20discuss%20the%20fun%20and%20elegant%20way%20-%20using%20Fil&amp;short_link=http://bit.ly/caZusS&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=%5BPerl%5D%20Finding%20Files%2C%20The%20Fun%20And%20Elegant%20Way&amp;link=http://beerpla.net/2009/04/08/perl-finding-files-the-fun-and-elegant-way/&amp;notes=No%20matter%20what%20programming%20language%20you%20use%2C%20there%20comes%20a%20time%20when%20you%20need%20to%20search%20for%20a%20file%20somewhere%20on%20the%20file%20system.%20Here%2C%20I%20want%20to%20talk%20about%20accomplishing%20this%20task%20in%20Perl.%20There%20are%20many%20ways%20of%20doing%20so%2C%20most%20of%20them%20boring%2C%20but%20I%20want%20to%20discuss%20the%20fun%20and%20elegant%20way%20-%20using%20Fil&amp;short_link=http://bit.ly/caZusS&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2009/03/05/perl-how-to-get-the-path-of-an-included-library-pm-regardless-of-current-directory/" rel="bookmark" title="March 5, 2009">[Perl] How To Get The Path Of An Included Library (.pm), Regardless Of Current Directory</a></li><li><a
href="http://beerpla.net/2007/10/28/ftprush-cleanup-script/" rel="bookmark" title="October 28, 2007">FTPRush Cleanup Script</a></li><li><a
href="http://beerpla.net/2008/03/21/quick-snippet-finding-if-a-file-has-a-media-extension-using-regex/" rel="bookmark" title="March 21, 2008">Quick Perl Snippet: Finding If A File Has A Media Extension Using Regex</a></li><li><a
href="http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/" rel="bookmark" title="July 23, 2008">How To Check If The Local SVN Revision Is Up-To-Date</a></li><li><a
href="http://beerpla.net/2008/10/11/how-to-sort-folders-the-same-way-as-files-in-total-commander/" rel="bookmark" title="October 11, 2008">How To Sort Folders The Same Way As Files In Total Commander</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2009%2F04%2F08%2Fperl-finding-files-the-fun-and-elegant-way%2F&amp;title=%5BPerl%5D%20Finding%20Files%2C%20The%20Fun%20And%20Elegant%20Way" id="wpa2a_16"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2009/04/08/perl-finding-files-the-fun-and-elegant-way/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>MySQL Indexing Considerations Of Implementing A Priority Field In Your Application</title><link>http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/</link> <comments>http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/#comments</comments> <pubDate>Wed, 18 Mar 2009 14:00:00 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Databases]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[asc]]></category> <category><![CDATA[desc]]></category> <category><![CDATA[how]]></category> <category><![CDATA[index]]></category> <category><![CDATA[order]]></category> <category><![CDATA[priority]]></category> <category><![CDATA[problem]]></category> <category><![CDATA[solution]]></category> <guid
isPermaLink="false">http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/</guid> <description><![CDATA[<h2>Introduction</h2><p>If you, like me, are building or thinking of implementing a MySQL-powered application that has any need for prioritizing selecting certain data over other data, this article is for you.</p><h2>Example</h2><p>As a real world example, consider a queue-like video processing system. Your application receives new videos and processes them. The volume of incoming videos can at times be higher than the processing rate because the process is CPU bound, so occasionally a pretty long queue may form. You will try to process them as fast as you can but…</p><p><div
class="note"><div
class="noteclassic">Note that I am using a queue here, so the <strong>the next item to be processed is a result of sorting by some sort of field in a <em>ascending </em></strong></div></div>...<div
class=clear></div> <a
href="http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description> <content:encoded><![CDATA[<h2>Introduction</h2><p>If you, like me, are building or thinking of implementing a MySQL-powered application that has any need for prioritizing selecting certain data over other data, this article is for you.</p><h2>Example</h2><p>As a real world example, consider a queue-like video processing system. Your application receives new videos and processes them. The volume of incoming videos can at times be higher than the processing rate because the process is CPU bound, so occasionally a pretty long queue may form. You will try to process them as fast as you can but…</p><p><div
class="note"><div
class="noteclassic">Note that I am using a queue here, so the <strong>the next item to be processed is a result of sorting by some sort of field in a <em>ascending </em>order</strong>, for example ORDER BY id or ORDER BY upload_date. I’ll pick the id sort here.</div></div></p><p>…suddenly, you need to process a video somewhere in the middle of the queue or an important video enters and needs immediate attention. What do you do?</p><p>An obvious solution is implementing a simple priority system where each item has a numeric priority field. Now you can sort first by priority from highest to lowest and then by id within the highest priority. Important and urgent items get a their priority changed to something higher and get processed first. There is only one problem.</p><h2>Problem</h2><p>The problem is pretty serious – let’s take a look at the SELECT statement. Before selecting, I’ve added 19 random rows to have some data to work on.</p><div
class="wp_syntax"><div
class="code"><pre>SELECT * FROM queue ORDER BY priority DESC, id LIMIT 1;</pre></div></div><p>What kind of index would you put on this table to speed up this query? You do want to add a proper index, don’t you? DO YOU? Ok, good.</p><p>&nbsp;</p><p>Here’s what happens without any indexes:</p><div
class="wp_syntax"><div
class="code"><pre>mysql&gt; EXPLAIN SELECT * FROM queue ORDER BY priority DESC, id LIMIT 1;
+----+-------------+-------+------+---------------+------+---------+------+------+----------------+
| id | select_type | table | type | possible_keys | key  | key_len | ref  | rows | Extra          |
+----+-------------+-------+------+---------------+------+---------+------+------+----------------+
|  1 | SIMPLE      | queue | ALL  | NULL          | NULL | NULL    | NULL |   19 | Using filesort |
+----+-------------+-------+------+---------------+------+---------+------+------+----------------+
1 row in set (0.00 sec)</pre></div></div><p><em>Using filesort</em>, ugh, of course, due to sorting without an index.</p><p>&nbsp;</p><p>Let’s see, how about a combined index on (priority, id)?</p><div
class="wp_syntax"><div
class="code"><pre>mysql&gt; ALTER TABLE `queue` ADD INDEX `priority_id`(`priority`, `id`);
Query OK, 19 rows affected (0.05 sec)
Records: 19  Duplicates: 0  Warnings: 0
&nbsp;
mysql&gt; EXPLAIN SELECT * FROM queue ORDER BY priority DESC, id LIMIT 1;
+----+-------------+-------+-------+---------------+-------------+---------+------+------+-----------------------------+
| id | select_type | table | type  | possible_keys | key         | key_len | ref  | rows | Extra                       |
+----+-------------+-------+-------+---------------+-------------+---------+------+------+-----------------------------+
|  1 | SIMPLE      | queue | index | NULL          | priority_id | 5       | NULL |   19 | Using index; Using filesort |
+----+-------------+-------+-------+---------------+-------------+---------+------+------+-----------------------------+
1 row in set (0.00 sec)</pre></div></div><p>Better because an index is being used but not very good because filesort is still present. “Of course!”, you slap yourself on the forehead. The first ORDER BY uses a DESCENDING order, and our key is in ASCENDING order.</p><p>&nbsp;</p><p>So, let’s add the proper key with the right ordering instead.</p><div
class="wp_syntax"><div
class="code"><pre>mysql&gt; ALTER TABLE `queue` DROP INDEX `priority_id`;
Query OK, 19 rows affected (0.05 sec)
Records: 19  Duplicates: 0  Warnings: 0
&nbsp;
mysql&gt; ALTER TABLE `queue` ADD INDEX `priority_id`(`priority` DESC, `id`);
Query OK, 19 rows affected (0.06 sec)
Records: 19  Duplicates: 0  Warnings: 0</pre></div></div><div
class="wp_syntax"><div
class="code"><pre>mysql&gt; EXPLAIN SELECT * FROM queue ORDER BY priority DESC, id LIMIT 1;
+----+-------------+-------+-------+---------------+-------------+---------+------+------+-----------------------------+
| id | select_type | table | type  | possible_keys | key         | key_len | ref  | rows | Extra                       |
+----+-------------+-------+-------+---------------+-------------+---------+------+------+-----------------------------+
|  1 | SIMPLE      | queue | index | NULL          | priority_id | 5       | NULL |   19 | Using index; Using filesort |
+----+-------------+-------+-------+---------------+-------------+---------+------+------+-----------------------------+
1 row in set (0.00 sec)</pre></div></div><pre></pre><p>What the deuce? This is the same result as with the previous index. Time to dig up the documentation.</p><p>&nbsp;</p><p>Here is what the MySQL manual has to say under the <a
href="http://dev.mysql.com/doc/refman/5.1/en/order-by-optimization.html">ORDER BY optimization</a> section:</p><blockquote><p>MySQL <em>cannot</em> use indexes to resolve the ORDER BY, although it still uses indexes to find the rows that match the WHERE clause … if you mix ASC and DESC:</p></blockquote><blockquote><div
class="wp_syntax"><div
class="code"><pre>SELECT * FROM t1 ORDER BY key_part1 DESC, key_part2 ASC;</pre></div></div></blockquote><p>Moreover, to confuse the user even more, the index creation command accepts the DESC instruction, without actually honoring it, as specified in the <a
href="http://dev.mysql.com/doc/refman/5.1/en/create-index.html" rel="nofollow">CREATE INDEX</a> section:</p><blockquote><p>An <em>index_col_name</em> specification can end with ASC or DESC. These keywords are allowed for future extensions for specifying ascending or descending index value storage. Currently, they are parsed but ignored; index values are always stored in ascending order.</p></blockquote><p>So, after so many years MySQL still doesn’t support such basic functionality – you are either stuck with a query that uses filesort or have to look for a workaround.</p><h2>Solution</h2><p>Since it’s not possible to mix order directions, the solution is then to change the meaning of the priority column to match your needs. Thus, in the new approach priority 1 is higher than priority 10, and the application logic needs to accommodate to that. If you caught this while the application is still young, the code may be easy to change, but otherwise it could be a major pain in the butt.</p><h2>Conclusion</h2><p>The moral here is: plan your queries ahead and don’t mix and match DESC and ASC ordering as MySQL will not be able to use an index to resolve it. Do it even sooner if you’re putting lots and lots of data into your tables.</p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL+Indexing+Considerations+Of+Implementing+A+Priority+Field+In+Your+Application&amp;link=http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/&amp;notes=Introduction%20If%20you%2C%20like%20me%2C%20are%20building%20or%20thinking%20of%20implementing%20a%20MySQL-powered%20application%20that%20has%20any%20need%20for%20prioritizing%20selecting%20certain%20data%20over%20other%20data%2C%20this%20article%20is%20for%20you.%20Example%20As%20a%20real%20world%20example%2C%20consider%20a%20queue-like%20video%20processing%20system.%20Your%20application%20rece&amp;short_link=http://bit.ly/csuKMb&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL+Indexing+Considerations+Of+Implementing+A+Priority+Field+In+Your+Application&amp;link=http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/&amp;notes=Introduction%20If%20you%2C%20like%20me%2C%20are%20building%20or%20thinking%20of%20implementing%20a%20MySQL-powered%20application%20that%20has%20any%20need%20for%20prioritizing%20selecting%20certain%20data%20over%20other%20data%2C%20this%20article%20is%20for%20you.%20Example%20As%20a%20real%20world%20example%2C%20consider%20a%20queue-like%20video%20processing%20system.%20Your%20application%20rece&amp;short_link=http://bit.ly/csuKMb&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL+Indexing+Considerations+Of+Implementing+A+Priority+Field+In+Your+Application&amp;link=http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/&amp;notes=Introduction%20If%20you%2C%20like%20me%2C%20are%20building%20or%20thinking%20of%20implementing%20a%20MySQL-powered%20application%20that%20has%20any%20need%20for%20prioritizing%20selecting%20certain%20data%20over%20other%20data%2C%20this%20article%20is%20for%20you.%20Example%20As%20a%20real%20world%20example%2C%20consider%20a%20queue-like%20video%20processing%20system.%20Your%20application%20rece&amp;short_link=http://bit.ly/csuKMb&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL+Indexing+Considerations+Of+Implementing+A+Priority+Field+In+Your+Application&amp;link=http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/&amp;notes=Introduction%20If%20you%2C%20like%20me%2C%20are%20building%20or%20thinking%20of%20implementing%20a%20MySQL-powered%20application%20that%20has%20any%20need%20for%20prioritizing%20selecting%20certain%20data%20over%20other%20data%2C%20this%20article%20is%20for%20you.%20Example%20As%20a%20real%20world%20example%2C%20consider%20a%20queue-like%20video%20processing%20system.%20Your%20application%20rece&amp;short_link=http://bit.ly/csuKMb&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL+Indexing+Considerations+Of+Implementing+A+Priority+Field+In+Your+Application&amp;link=http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/&amp;notes=Introduction%20If%20you%2C%20like%20me%2C%20are%20building%20or%20thinking%20of%20implementing%20a%20MySQL-powered%20application%20that%20has%20any%20need%20for%20prioritizing%20selecting%20certain%20data%20over%20other%20data%2C%20this%20article%20is%20for%20you.%20Example%20As%20a%20real%20world%20example%2C%20consider%20a%20queue-like%20video%20processing%20system.%20Your%20application%20rece&amp;short_link=http://bit.ly/csuKMb&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL+Indexing+Considerations+Of+Implementing+A+Priority+Field+In+Your+Application&amp;link=http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/&amp;notes=Introduction%20If%20you%2C%20like%20me%2C%20are%20building%20or%20thinking%20of%20implementing%20a%20MySQL-powered%20application%20that%20has%20any%20need%20for%20prioritizing%20selecting%20certain%20data%20over%20other%20data%2C%20this%20article%20is%20for%20you.%20Example%20As%20a%20real%20world%20example%2C%20consider%20a%20queue-like%20video%20processing%20system.%20Your%20application%20rece&amp;short_link=http://bit.ly/csuKMb&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL+Indexing+Considerations+Of+Implementing+A+Priority+Field+In+Your+Application&amp;link=http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/&amp;notes=Introduction%20If%20you%2C%20like%20me%2C%20are%20building%20or%20thinking%20of%20implementing%20a%20MySQL-powered%20application%20that%20has%20any%20need%20for%20prioritizing%20selecting%20certain%20data%20over%20other%20data%2C%20this%20article%20is%20for%20you.%20Example%20As%20a%20real%20world%20example%2C%20consider%20a%20queue-like%20video%20processing%20system.%20Your%20application%20rece&amp;short_link=http://bit.ly/csuKMb&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL%20Indexing%20Considerations%20Of%20Implementing%20A%20Priority%20Field%20In%20Your%20Application&amp;link=http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/&amp;notes=Introduction%20If%20you%2C%20like%20me%2C%20are%20building%20or%20thinking%20of%20implementing%20a%20MySQL-powered%20application%20that%20has%20any%20need%20for%20prioritizing%20selecting%20certain%20data%20over%20other%20data%2C%20this%20article%20is%20for%20you.%20Example%20As%20a%20real%20world%20example%2C%20consider%20a%20queue-like%20video%20processing%20system.%20Your%20application%20rece&amp;short_link=http://bit.ly/csuKMb&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/" rel="bookmark" title="April 15, 2008">MySQL Conference Liveblogging: EXPLAIN Demystified (Tuesday 2:00PM)</a></li><li><a
href="http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/" rel="bookmark" title="February 17, 2009">Swapping Column Values in MySQL</a></li><li><a
href="http://beerpla.net/2009/05/11/mysql-deletingupdating-rows-common-to-2-tables-speed-and-slave-lag-considerations/" rel="bookmark" title="May 11, 2009">[MySQL] Deleting/Updating Rows Common To 2 Tables &#8211; Speed And Slave Lag Considerations</a></li><li><a
href="http://beerpla.net/2008/04/16/mysql-conference-liveblogging-mysql-performance-under-a-microscope-the-tobias-and-jay-show-wednesday-200pm/" rel="bookmark" title="April 16, 2008">MySQL Conference Liveblogging: MySQL Performance Under A Microscope: The Tobias And Jay Show (Wednesday 2:00PM)</a></li><li><a
href="http://beerpla.net/2008/04/17/mysql-conference-liveblogging-optimizing-mysql-for-high-volume-data-logging-applications-thursday-250pm/" rel="bookmark" title="April 17, 2008">MySQL Conference Liveblogging: Optimizing MySQL For High Volume Data Logging Applications (Thursday 2:50PM)</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2009%2F03%2F18%2Fmysql-indexing-considerations-of-implementing-a-priority-field-in-your-application%2F&amp;title=MySQL%20Indexing%20Considerations%20Of%20Implementing%20A%20Priority%20Field%20In%20Your%20Application" id="wpa2a_18"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>[Perl] How To Get The Path Of An Included Library (.pm), Regardless Of Current Directory</title><link>http://beerpla.net/2009/03/05/perl-how-to-get-the-path-of-an-included-library-pm-regardless-of-current-directory/</link> <comments>http://beerpla.net/2009/03/05/perl-how-to-get-the-path-of-an-included-library-pm-regardless-of-current-directory/#comments</comments> <pubDate>Fri, 06 Mar 2009 05:41:02 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Perl]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[dir]]></category> <category><![CDATA[directory]]></category> <category><![CDATA[INC]]></category> <category><![CDATA[include]]></category> <category><![CDATA[library]]></category> <category><![CDATA[path]]></category> <category><![CDATA[script]]></category> <guid
isPermaLink="false">http://beerpla.net/2009/03/05/perl-how-to-get-the-path-of-an-included-library-pm-regardless-of-current-directory/</guid> <description><![CDATA[<h2>Problem</h2><p>While writing a 1093985th Perl script the other day I was facing the following dilemma:</p><ul><li>Let’s say there is a local library, called <em>TheUberLib.pm</em>. It is so uber that most of my scripts, located all over the machine, include it.</li><li>Now, let’s also say that there’s an even more uberly important binary called <em>run_me_now_or_you_will_die</em> but the only way to find it is by using a relative path to the aforementioned <em>TheUberLib.pm</em>, for example <em>../bin</em> (RELATIVE TO <em>TheUberLib.pm)</em>.</li><li>I don’t want to hardcode the path to <em>run_me_now_or_you_will_die </em>because it can be different on multiple machines and the code wouldn’t be robust enough – all I know is that the path is relative to an included library.</li></ul><p>So ...<div
class=clear></div> <a
href="http://beerpla.net/2009/03/05/perl-how-to-get-the-path-of-an-included-library-pm-regardless-of-current-directory/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description> <content:encoded><![CDATA[<h2>Problem</h2><p>While writing a 1093985th Perl script the other day I was facing the following dilemma:</p><ul><li>Let’s say there is a local library, called <em>TheUberLib.pm</em>. It is so uber that most of my scripts, located all over the machine, include it.</li><li>Now, let’s also say that there’s an even more uberly important binary called <em>run_me_now_or_you_will_die</em> but the only way to find it is by using a relative path to the aforementioned <em>TheUberLib.pm</em>, for example <em>../bin</em> (RELATIVE TO <em>TheUberLib.pm)</em>.</li><li>I don’t want to hardcode the path to <em>run_me_now_or_you_will_die </em>because it can be different on multiple machines and the code wouldn’t be robust enough – all I know is that the path is relative to an included library.</li></ul><p>So how does one get the path to an included <em>TheUberLib.pm </em>(in my case to deduce the path to <em>run_me_now_or_you_will_die</em>),<em> </em>regardless of the script location and the current directory?</p><p>I started looking at all possible ways of getting this information.</p><ul><li>At first I looked at $0. $0 returns the path to the Perl script itself (<em>LibraryPath/lib_path.pl</em>) and is completely useless here.</li><li>The <em>FindBin </em>module that I sometimes use was also of no help as it also deals with the caller script path.</li></ul><h2>Solution</h2><p>After digging around for a bit, this is the method I came up with that did exactly what I wanted:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
</pre></td><td
class="code"><pre>use File::Basename;
my $path_to_uber_lib = dirname($INC{'TheUberLib.pm'});</pre></td></tr></table></div><p>and the clean way to get the final path to <em>run_me_now_or_you_will_die</em> is:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
</pre></td><td
class="code"><pre>my $relative_path_to_bin_dir = &quot;../the_path_we_want/run_me_now_or_you_will_die&quot;;
my $path_to_deadly_bin = Cwd::realpath(&quot;$path_to_uber_lib/$relative_path_to_bin_dir&quot;);
print &quot;The path to deadly bin is: $path_to_deadly_bin\n&quot;;</pre></td></tr></table></div><p>which prints <em>/tmp/LibraryPath/some_path1/the_path_we_want/run_me_now_or_you_will_die.</em></p><p>Here is the full program with all directories that you can check out from SVN:</p><div
class="wp_syntax"><div
class="code"><pre>svn co http://beerpla.net/svn/public/Perl/LibraryPath/</pre></div></div><p>or just browse the code here: <a
href="http://beerpla.net/svn/public/Perl/LibraryPath/">http://beerpla.net/svn/public/Perl/LibraryPath/</a></p><h2>Explanation</h2><p>The <em>%INC</em> hash contains all included libraries, with library names as keys and full paths as values.</p><p>The <em>dirname()</em> function is part of <a
href="http://perldoc.perl.org/File/Basename.html" rel="nofollow">File::Basename</a><em></em> and returns just the directory part of the path.</p><p>Finally, <a
href="http://perldoc.perl.org/Cwd.html" rel="nofollow">Cwd::realpath()</a><em></em> is a function that resolves relative and symbolic links to canonical absolute ones.</p><p>And there you have it.</p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=%5BPerl%5D+How+To+Get+The+Path+Of+An+Included+Library+%28.pm%29%2C+Regardless+Of+Current+Directory&amp;link=http://beerpla.net/2009/03/05/perl-how-to-get-the-path-of-an-included-library-pm-regardless-of-current-directory/&amp;notes=Problem%20%20While%20writing%20a%201093985th%20Perl%20script%20the%20other%20day%20I%20was%20facing%20the%20following%20dilemma%3A%20%20%20%20%20Let%E2%80%99s%20say%20there%20is%20a%20local%20library%2C%20called%20TheUberLib.pm.%20It%20is%20so%20uber%20that%20most%20of%20my%20scripts%2C%20located%20all%20over%20the%20machine%2C%20include%20it.%20%20%20%20%20Now%2C%20let%E2%80%99s%20also%20say%20that%20there%E2%80%99s%20an%20even%20more%20uber&amp;short_link=http://bit.ly/cVf4Vf&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=%5BPerl%5D+How+To+Get+The+Path+Of+An+Included+Library+%28.pm%29%2C+Regardless+Of+Current+Directory&amp;link=http://beerpla.net/2009/03/05/perl-how-to-get-the-path-of-an-included-library-pm-regardless-of-current-directory/&amp;notes=Problem%20%20While%20writing%20a%201093985th%20Perl%20script%20the%20other%20day%20I%20was%20facing%20the%20following%20dilemma%3A%20%20%20%20%20Let%E2%80%99s%20say%20there%20is%20a%20local%20library%2C%20called%20TheUberLib.pm.%20It%20is%20so%20uber%20that%20most%20of%20my%20scripts%2C%20located%20all%20over%20the%20machine%2C%20include%20it.%20%20%20%20%20Now%2C%20let%E2%80%99s%20also%20say%20that%20there%E2%80%99s%20an%20even%20more%20uber&amp;short_link=http://bit.ly/cVf4Vf&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=%5BPerl%5D+How+To+Get+The+Path+Of+An+Included+Library+%28.pm%29%2C+Regardless+Of+Current+Directory&amp;link=http://beerpla.net/2009/03/05/perl-how-to-get-the-path-of-an-included-library-pm-regardless-of-current-directory/&amp;notes=Problem%20%20While%20writing%20a%201093985th%20Perl%20script%20the%20other%20day%20I%20was%20facing%20the%20following%20dilemma%3A%20%20%20%20%20Let%E2%80%99s%20say%20there%20is%20a%20local%20library%2C%20called%20TheUberLib.pm.%20It%20is%20so%20uber%20that%20most%20of%20my%20scripts%2C%20located%20all%20over%20the%20machine%2C%20include%20it.%20%20%20%20%20Now%2C%20let%E2%80%99s%20also%20say%20that%20there%E2%80%99s%20an%20even%20more%20uber&amp;short_link=http://bit.ly/cVf4Vf&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=%5BPerl%5D+How+To+Get+The+Path+Of+An+Included+Library+%28.pm%29%2C+Regardless+Of+Current+Directory&amp;link=http://beerpla.net/2009/03/05/perl-how-to-get-the-path-of-an-included-library-pm-regardless-of-current-directory/&amp;notes=Problem%20%20While%20writing%20a%201093985th%20Perl%20script%20the%20other%20day%20I%20was%20facing%20the%20following%20dilemma%3A%20%20%20%20%20Let%E2%80%99s%20say%20there%20is%20a%20local%20library%2C%20called%20TheUberLib.pm.%20It%20is%20so%20uber%20that%20most%20of%20my%20scripts%2C%20located%20all%20over%20the%20machine%2C%20include%20it.%20%20%20%20%20Now%2C%20let%E2%80%99s%20also%20say%20that%20there%E2%80%99s%20an%20even%20more%20uber&amp;short_link=http://bit.ly/cVf4Vf&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=%5BPerl%5D+How+To+Get+The+Path+Of+An+Included+Library+%28.pm%29%2C+Regardless+Of+Current+Directory&amp;link=http://beerpla.net/2009/03/05/perl-how-to-get-the-path-of-an-included-library-pm-regardless-of-current-directory/&amp;notes=Problem%20%20While%20writing%20a%201093985th%20Perl%20script%20the%20other%20day%20I%20was%20facing%20the%20following%20dilemma%3A%20%20%20%20%20Let%E2%80%99s%20say%20there%20is%20a%20local%20library%2C%20called%20TheUberLib.pm.%20It%20is%20so%20uber%20that%20most%20of%20my%20scripts%2C%20located%20all%20over%20the%20machine%2C%20include%20it.%20%20%20%20%20Now%2C%20let%E2%80%99s%20also%20say%20that%20there%E2%80%99s%20an%20even%20more%20uber&amp;short_link=http://bit.ly/cVf4Vf&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=%5BPerl%5D+How+To+Get+The+Path+Of+An+Included+Library+%28.pm%29%2C+Regardless+Of+Current+Directory&amp;link=http://beerpla.net/2009/03/05/perl-how-to-get-the-path-of-an-included-library-pm-regardless-of-current-directory/&amp;notes=Problem%20%20While%20writing%20a%201093985th%20Perl%20script%20the%20other%20day%20I%20was%20facing%20the%20following%20dilemma%3A%20%20%20%20%20Let%E2%80%99s%20say%20there%20is%20a%20local%20library%2C%20called%20TheUberLib.pm.%20It%20is%20so%20uber%20that%20most%20of%20my%20scripts%2C%20located%20all%20over%20the%20machine%2C%20include%20it.%20%20%20%20%20Now%2C%20let%E2%80%99s%20also%20say%20that%20there%E2%80%99s%20an%20even%20more%20uber&amp;short_link=http://bit.ly/cVf4Vf&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=%5BPerl%5D+How+To+Get+The+Path+Of+An+Included+Library+%28.pm%29%2C+Regardless+Of+Current+Directory&amp;link=http://beerpla.net/2009/03/05/perl-how-to-get-the-path-of-an-included-library-pm-regardless-of-current-directory/&amp;notes=Problem%20%20While%20writing%20a%201093985th%20Perl%20script%20the%20other%20day%20I%20was%20facing%20the%20following%20dilemma%3A%20%20%20%20%20Let%E2%80%99s%20say%20there%20is%20a%20local%20library%2C%20called%20TheUberLib.pm.%20It%20is%20so%20uber%20that%20most%20of%20my%20scripts%2C%20located%20all%20over%20the%20machine%2C%20include%20it.%20%20%20%20%20Now%2C%20let%E2%80%99s%20also%20say%20that%20there%E2%80%99s%20an%20even%20more%20uber&amp;short_link=http://bit.ly/cVf4Vf&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=%5BPerl%5D%20How%20To%20Get%20The%20Path%20Of%20An%20Included%20Library%20%28.pm%29%2C%20Regardless%20Of%20Current%20Directory&amp;link=http://beerpla.net/2009/03/05/perl-how-to-get-the-path-of-an-included-library-pm-regardless-of-current-directory/&amp;notes=Problem%20%20While%20writing%20a%201093985th%20Perl%20script%20the%20other%20day%20I%20was%20facing%20the%20following%20dilemma%3A%20%20%20%20%20Let%E2%80%99s%20say%20there%20is%20a%20local%20library%2C%20called%20TheUberLib.pm.%20It%20is%20so%20uber%20that%20most%20of%20my%20scripts%2C%20located%20all%20over%20the%20machine%2C%20include%20it.%20%20%20%20%20Now%2C%20let%E2%80%99s%20also%20say%20that%20there%E2%80%99s%20an%20even%20more%20uber&amp;short_link=http://bit.ly/cVf4Vf&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2007/10/28/ftprush-cleanup-script/" rel="bookmark" title="October 28, 2007">FTPRush Cleanup Script</a></li><li><a
href="http://beerpla.net/2008/04/29/how-do-i-get-both-the-return-value-and-text-in-perl-backticks-vs-system-perl-510/" rel="bookmark" title="April 29, 2008">How Do I Get Both The Return Value And Text In Perl? Backticks vs. System() (Perl 5.10)</a></li><li><a
href="http://beerpla.net/2009/04/08/perl-finding-files-the-fun-and-elegant-way/" rel="bookmark" title="April 8, 2009">[Perl] Finding Files, The Fun And Elegant Way</a></li><li><a
href="http://beerpla.net/2008/03/27/parsing-json-in-perl-by-example-southparkstudioscom-south-park-episodes/" rel="bookmark" title="March 27, 2008">Parsing JSON In Perl By Example &#8211; SouthParkStudios.com South Park Episodes</a></li><li><a
href="http://beerpla.net/2010/01/13/wordpress-plugin-development-how-to-include-css-and-javascript-conditionally-and-only-when-needed-by-the-posts/" rel="bookmark" title="January 13, 2010">[WordPress Plugin Development] How To Include CSS and JavaScript Conditionally And Only When Needed By The Posts</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2009%2F03%2F05%2Fperl-how-to-get-the-path-of-an-included-library-pm-regardless-of-current-directory%2F&amp;title=%5BPerl%5D%20How%20To%20Get%20The%20Path%20Of%20An%20Included%20Library%20%28.pm%29%2C%20Regardless%20Of%20Current%20Directory" id="wpa2a_20"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2009/03/05/perl-how-to-get-the-path-of-an-included-library-pm-regardless-of-current-directory/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Swapping Column Values in MySQL</title><link>http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/</link> <comments>http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/#comments</comments> <pubDate>Wed, 18 Feb 2009 00:53:47 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Databases]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[column]]></category> <category><![CDATA[database]]></category> <category><![CDATA[swap]]></category> <category><![CDATA[value]]></category> <guid
isPermaLink="false">http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/</guid> <description><![CDATA[<p>Today I had to swap 2 columns in one of my MySQL tables. The task, which seems easily accomplishable by a temp variable, proved to be a bit harder to complete. But only just a bit.</p><p>Here are my findings:</p><ol><li><p>The</p><div
class="wp_syntax"><div
class="code"><pre>UPDATE swap_test SET x=y, y=x;</pre></div></div><p>approach doesn&#039;t work, as it&#039;ll just set both values to y.</p><p><div
class="note"><div
class="notetip">PostgreSQL seems to handle this query differently, as it apparently uses the old values throughout the whole query. [<a
href="http://www.postgresql.org/docs/8.3/static/sql-update.html">Reference</a>]</div></div></p></li><li><p>Here&#039;s a method that uses a temporary variable. Thanks to Antony from the comments for the &#34;IS NOT NULL&#34; tweak. Without it, the query works unpredictably. See the table schema at the end of the post. This method doesn&#039;t swap the values</p></li>...<div
class=clear></div> <a
href="http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></ol>]]></description> <content:encoded><![CDATA[<p>Today I had to swap 2 columns in one of my MySQL tables. The task, which seems easily accomplishable by a temp variable, proved to be a bit harder to complete. But only just a bit.</p><p>Here are my findings:</p><ol><li><p>The</p><div
class="wp_syntax"><div
class="code"><pre>UPDATE swap_test SET x=y, y=x;</pre></div></div><p>approach doesn&#039;t work, as it&#039;ll just set both values to y.</p><p><div
class="note"><div
class="notetip">PostgreSQL seems to handle this query differently, as it apparently uses the old values throughout the whole query. [<a
href="http://www.postgresql.org/docs/8.3/static/sql-update.html">Reference</a>]</div></div></p></li><li><p>Here&#039;s a method that uses a temporary variable. Thanks to Antony from the comments for the &quot;IS NOT NULL&quot; tweak. Without it, the query works unpredictably. See the table schema at the end of the post. This method doesn&#039;t swap the values if one of them is NULL. Use method #3 that doesn&#039;t have this limitation.</p><div
class="wp_syntax"><div
class="code"><pre>UPDATE swap_test SET x=y, y=@temp WHERE (@temp:=x) IS NOT NULL;</pre></div></div><p><div
class="note"><div
class="notewarning">The parentheses around @temp:=x are critical. Omitting them will cause data corruption.</div></div></p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
</pre></td><td
class="code"><pre>mysql&amp;gt; UPDATE swap_test SET x=y, y=@temp WHERE (@temp:=x) IS NOT NULL;
Query OK, 3 rows affected
Rows matched: 3  Changed: 3  Warnings: 0</pre></td></tr></table></div></li><li><p>This method was offered by Dipin in the comments. I think it’s the most elegant and clean solution. It works with both NULL and non-NULL values.</p><div
class="wp_syntax"><div
class="code"><pre>UPDATE swap_test SET x=(@temp:=x), x = y, y = @temp;</pre></div></div></li><li><p>Another approach I came up with that seems to work:</p><div
class="wp_syntax"><div
class="code"><pre>UPDATE swaptest s1, swaptest s2 SET s1.x=s1.y, s1.y=s2.x WHERE s1.id=s2.id;</pre></div></div><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
</pre></td><td
class="code"><pre>mysql&amp;gt; update swap_test s1, swap_test s2 set s1.x=s1.y, s1.y=s2.x where s1.id=s2.id;
Query OK, 3 rows affected
Rows matched: 3  Changed: 3  Warnings: 0</pre></td></tr></table></div></li></ol><p>Essentially, the 1st table is the one getting updated and the 2nd one is used to pull the old data from.<div
class="note"><div
class="noteclassic">Note that this approach requires a primary key to be present.</div></div></p><p>Test schema used:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td
class="code"><pre>CREATE TABLE `swap_test` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `x` varchar(255) DEFAULT NULL,
  `y` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB;
&nbsp;
INSERT INTO `swap_test` VALUES ('1', 'a', '10');
INSERT INTO `swap_test` VALUES ('2', NULL, '20');
INSERT INTO `swap_test` VALUES ('3', 'c', NULL);</pre></td></tr></table></div><p>Do you have a better approach? If so, please share in the comments.</p><p>Some references:</p><ul><li><a
title="http://stackoverflow.com/questions/37649/swapping-column-values-in-mysql/" href="http://stackoverflow.com/questions/37649/swapping-column-values-in-mysql/">http://stackoverflow.com/questions/37649/swapping-column-values-in-mysql/</a> – some discussion on various methods, which eventually prompted me to start this post</li><li><a
title="http://www.marcworrell.com/article-3026-en.html" href="http://www.marcworrell.com/article-3026-en.html">http://www.marcworrell.com/article-3026-en.html</a> – discussion on the 2nd approach, which doesn’t work</li></ul><div
class='post_blob_1'>Pass your <a
href="http://www.test-king.com/exams/642-524.htm">642-524</a> exam with highest score using latest <a
href="http://www.test-king.com/exams/642-373.htm">642-373</a> practice questions and <a
href="http://www.test-king.com/exams/642-446.htm">642-446</a> sample exams.</div><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=Swapping+Column+Values+in+MySQL&amp;link=http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/&amp;notes=Today%20I%20had%20to%20swap%202%20columns%20in%20one%20of%20my%20MySQL%20tables.%20The%20task%2C%20which%20seems%20easily%20accomplishable%20by%20a%20temp%20variable%2C%20proved%20to%20be%20a%20bit%20harder%20to%20complete.%20But%20only%20just%20a%20bit.%0D%0AHere%20are%20my%20findings%3A%0D%0A%0D%0A%0D%0AThe%0D%0AUPDATE%20swap_test%20SET%20x%3Dy%2C%20y%3Dx%3Bapproach%20doesn%27t%20work%2C%20as%20it%27ll%20just%20set%20both%20values%20to%20&amp;short_link=http://bit.ly/9F5oZC&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=Swapping+Column+Values+in+MySQL&amp;link=http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/&amp;notes=Today%20I%20had%20to%20swap%202%20columns%20in%20one%20of%20my%20MySQL%20tables.%20The%20task%2C%20which%20seems%20easily%20accomplishable%20by%20a%20temp%20variable%2C%20proved%20to%20be%20a%20bit%20harder%20to%20complete.%20But%20only%20just%20a%20bit.%0D%0AHere%20are%20my%20findings%3A%0D%0A%0D%0A%0D%0AThe%0D%0AUPDATE%20swap_test%20SET%20x%3Dy%2C%20y%3Dx%3Bapproach%20doesn%27t%20work%2C%20as%20it%27ll%20just%20set%20both%20values%20to%20&amp;short_link=http://bit.ly/9F5oZC&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=Swapping+Column+Values+in+MySQL&amp;link=http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/&amp;notes=Today%20I%20had%20to%20swap%202%20columns%20in%20one%20of%20my%20MySQL%20tables.%20The%20task%2C%20which%20seems%20easily%20accomplishable%20by%20a%20temp%20variable%2C%20proved%20to%20be%20a%20bit%20harder%20to%20complete.%20But%20only%20just%20a%20bit.%0D%0AHere%20are%20my%20findings%3A%0D%0A%0D%0A%0D%0AThe%0D%0AUPDATE%20swap_test%20SET%20x%3Dy%2C%20y%3Dx%3Bapproach%20doesn%27t%20work%2C%20as%20it%27ll%20just%20set%20both%20values%20to%20&amp;short_link=http://bit.ly/9F5oZC&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=Swapping+Column+Values+in+MySQL&amp;link=http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/&amp;notes=Today%20I%20had%20to%20swap%202%20columns%20in%20one%20of%20my%20MySQL%20tables.%20The%20task%2C%20which%20seems%20easily%20accomplishable%20by%20a%20temp%20variable%2C%20proved%20to%20be%20a%20bit%20harder%20to%20complete.%20But%20only%20just%20a%20bit.%0D%0AHere%20are%20my%20findings%3A%0D%0A%0D%0A%0D%0AThe%0D%0AUPDATE%20swap_test%20SET%20x%3Dy%2C%20y%3Dx%3Bapproach%20doesn%27t%20work%2C%20as%20it%27ll%20just%20set%20both%20values%20to%20&amp;short_link=http://bit.ly/9F5oZC&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=Swapping+Column+Values+in+MySQL&amp;link=http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/&amp;notes=Today%20I%20had%20to%20swap%202%20columns%20in%20one%20of%20my%20MySQL%20tables.%20The%20task%2C%20which%20seems%20easily%20accomplishable%20by%20a%20temp%20variable%2C%20proved%20to%20be%20a%20bit%20harder%20to%20complete.%20But%20only%20just%20a%20bit.%0D%0AHere%20are%20my%20findings%3A%0D%0A%0D%0A%0D%0AThe%0D%0AUPDATE%20swap_test%20SET%20x%3Dy%2C%20y%3Dx%3Bapproach%20doesn%27t%20work%2C%20as%20it%27ll%20just%20set%20both%20values%20to%20&amp;short_link=http://bit.ly/9F5oZC&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=Swapping+Column+Values+in+MySQL&amp;link=http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/&amp;notes=Today%20I%20had%20to%20swap%202%20columns%20in%20one%20of%20my%20MySQL%20tables.%20The%20task%2C%20which%20seems%20easily%20accomplishable%20by%20a%20temp%20variable%2C%20proved%20to%20be%20a%20bit%20harder%20to%20complete.%20But%20only%20just%20a%20bit.%0D%0AHere%20are%20my%20findings%3A%0D%0A%0D%0A%0D%0AThe%0D%0AUPDATE%20swap_test%20SET%20x%3Dy%2C%20y%3Dx%3Bapproach%20doesn%27t%20work%2C%20as%20it%27ll%20just%20set%20both%20values%20to%20&amp;short_link=http://bit.ly/9F5oZC&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=Swapping+Column+Values+in+MySQL&amp;link=http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/&amp;notes=Today%20I%20had%20to%20swap%202%20columns%20in%20one%20of%20my%20MySQL%20tables.%20The%20task%2C%20which%20seems%20easily%20accomplishable%20by%20a%20temp%20variable%2C%20proved%20to%20be%20a%20bit%20harder%20to%20complete.%20But%20only%20just%20a%20bit.%0D%0AHere%20are%20my%20findings%3A%0D%0A%0D%0A%0D%0AThe%0D%0AUPDATE%20swap_test%20SET%20x%3Dy%2C%20y%3Dx%3Bapproach%20doesn%27t%20work%2C%20as%20it%27ll%20just%20set%20both%20values%20to%20&amp;short_link=http://bit.ly/9F5oZC&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=Swapping%20Column%20Values%20in%20MySQL&amp;link=http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/&amp;notes=Today%20I%20had%20to%20swap%202%20columns%20in%20one%20of%20my%20MySQL%20tables.%20The%20task%2C%20which%20seems%20easily%20accomplishable%20by%20a%20temp%20variable%2C%20proved%20to%20be%20a%20bit%20harder%20to%20complete.%20But%20only%20just%20a%20bit.%0D%0AHere%20are%20my%20findings%3A%0D%0A%0D%0A%0D%0AThe%0D%0AUPDATE%20swap_test%20SET%20x%3Dy%2C%20y%3Dx%3Bapproach%20doesn%27t%20work%2C%20as%20it%27ll%20just%20set%20both%20values%20to%20&amp;short_link=http://bit.ly/9F5oZC&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/" rel="bookmark" title="March 18, 2009">MySQL Indexing Considerations Of Implementing A Priority Field In Your Application</a></li><li><a
href="http://beerpla.net/2008/04/17/mysql-conference-liveblogging-optimizing-mysql-for-high-volume-data-logging-applications-thursday-250pm/" rel="bookmark" title="April 17, 2008">MySQL Conference Liveblogging: Optimizing MySQL For High Volume Data Logging Applications (Thursday 2:50PM)</a></li><li><a
href="http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/" rel="bookmark" title="April 15, 2008">MySQL Conference Liveblogging: EXPLAIN Demystified (Tuesday 2:00PM)</a></li><li><a
href="http://beerpla.net/2010/03/21/how-to-diagnose-and-fix-incorrect-post-comment-counts-in-wordpress/" rel="bookmark" title="March 21, 2010">How To Diagnose And Fix Incorrect Post Comment Counts In WordPress</a></li><li><a
href="http://beerpla.net/2009/05/11/mysql-deletingupdating-rows-common-to-2-tables-speed-and-slave-lag-considerations/" rel="bookmark" title="May 11, 2009">[MySQL] Deleting/Updating Rows Common To 2 Tables &#8211; Speed And Slave Lag Considerations</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2009%2F02%2F17%2Fswapping-column-values-in-mysql%2F&amp;title=Swapping%20Column%20Values%20in%20MySQL" id="wpa2a_22"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/feed/</wfw:commentRss> <slash:comments>27</slash:comments> </item> <item><title>Artem&#8217;s Top 10 Tech Predictions And Ideas For 2009 And Beyond</title><link>http://beerpla.net/2009/01/10/artems-top-10-tech-predictions-and-ideas-for-2009-and-beyond/</link> <comments>http://beerpla.net/2009/01/10/artems-top-10-tech-predictions-and-ideas-for-2009-and-beyond/#comments</comments> <pubDate>Sat, 10 Jan 2009 08:05:39 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Awesomeness]]></category> <category><![CDATA[Databases]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Stuff]]></category> <category><![CDATA[Technology]]></category> <category><![CDATA[2009]]></category> <category><![CDATA[2010]]></category> <category><![CDATA[geek]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[open source]]></category> <category><![CDATA[predictions]]></category> <category><![CDATA[tech]]></category> <category><![CDATA[twitter]]></category> <category><![CDATA[youtube]]></category> <guid
isPermaLink="false">http://beerpla.net/?p=699</guid> <description><![CDATA[<p><img
title="image" style="display: inline; margin: 0px 10px 10px 0px" height="105" alt="image" src="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_8.png" width="115" align="left" />Everyone and their mother are throwing out their predictions for 2009 nowadays, it’s a new fad. It’s like you’re not cool anymore if you don’t have twitter, a Mac, and a set of random predictions for the next 12 joyous months.</p><p>So I decided to throw in a few ideas of my own to be part of the cool crowd again (how much cooler can I be already, you might think, and I wouldn’t blame you).</p><p>&#160;</p><h3 align="center"><strong></strong></h3><h2 align="center"><strong>Disclaimer (read it, tough guy)</strong></h2><p>What this post is:</p><ul><li>about the future of technology and the Internet, 2009 and beyond.</li><li><strong><u>my</u></strong> ideas on what is going to happen or should happen. If they happen to match someone else’s ideas – it doesn’t mean</li>...<div
class=clear></div> <a
href="http://beerpla.net/2009/01/10/artems-top-10-tech-predictions-and-ideas-for-2009-and-beyond/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></ul>]]></description> <content:encoded><![CDATA[</p><p><img
title="image" style="display: inline; margin: 0px 10px 10px 0px" height="105" alt="image" src="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_8.png" width="115" align="left" />Everyone and their mother are throwing out their predictions for 2009 nowadays, it’s a new fad. It’s like you’re not cool anymore if you don’t have twitter, a Mac, and a set of random predictions for the next 12 joyous months.</p><p>So I decided to throw in a few ideas of my own to be part of the cool crowd again (how much cooler can I be already, you might think, and I wouldn’t blame you).</p><p>&#160;</p><h3 align="center"><strong></strong></h3><h2 align="center"><strong>Disclaimer (read it, tough guy)</strong></h2><p>What this post is:</p><ul><li>about the future of technology and the Internet, 2009 and beyond.</li><li><strong><u>my</u></strong> ideas on what is going to happen or should happen. If they happen to match someone else’s ideas – it doesn’t mean I ripped them off, it just means we share the same opinions and they’re more likely to come true.</li><li>awesome.</li></ul><p>What this post is not:</p><ul><li>predictions I pulled out of my ass, like “the market will bounce in August 2009” because some random douche said so.</li><li>a collection of stolen ideas. I have reserved a separate post for that purpose.</li><li><a
href="http://xkcd.com/526/">a raptor on hoverboard</a>.</li></ul><p>&#160;</p><h2 align="center"><strong>Things That Need To Happen</strong></h2><p><strong><font
size="4">1. Socially Editable Maps</font></strong></p><p><a
href="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image.png" class="lightview" rel="gallery['699']" title="image"><img
title="image" style="display: inline; margin: 0px 10px 10px 0px" height="150" alt="image" src="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_thumb.png" width="150" align="left" /></a>With the advent of the GPS technology in the last couple of years and GPS prices falling (my originally $800 <a
href="http://www.amazon.com/dp/B000H49LXQ/?tag=beepla-20">Garmin Nuvi 660</a> now costs about $200), the biggest frustration I have now is the accuracy of information. In the world of Google Maps and Wikipedia, why is it that I have to wait a whole year for map updates that are obsolete by the time they come out? The Bay Bridge repairs change the roads on an almost monthly basis, for example.</p><p><strong>I want to know about road changes as soon as they occur.</strong></p><p>The next big thing will be a company, either existing, like Google, or a startup, that will introduce the social aspect into the mapping technology. It will do for maps and GPS what Wikipedia did for text, using the same approach. The details are of course to be worked out.</p><p>After this concept becomes successful, GPS companies, will need to support such updates over the air, with a push of a button. This ties in closely with prediction #2 and #4.</p><p>&#160;</p><p><font
size="4"><strong>2. Open Source GPS Goes Mainstream</strong></font></p><p><a
href="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_9.png" class="lightview" rel="gallery['699']" title="image"><img
title="image" style="display: inline; margin: 0px 10px 10px 0px" height="150" alt="image" src="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_thumb_6.png" width="150" align="left" /></a>Google, the father of Android, needs to get behind this one as well. In fact, an open source GPS device would really be a subset of Android’s functionality, in a dedicated device, so it shouldn’t be that hard. In the far future, it will be built into automobile dashboards but I don’t foresee that happening in the near future.</p><p>Combined with prediction #1, this will be a killer device. I really believe that free, open source software is the wave of the future, the natural direction of where software development is heading. Look at Linux in the past few years. Look at Android now. Release one and I’m be #1 in line for one. Those who know me IRL know that I can’t go anywhere without a GPS anymore. I once forgot a GPS at home and ended up in Chili.</p><p>&#160;</p><p><strong><font
size="4">3. Photo and Video Cameras Will Go Wireless, Anywhere You Go</font></strong></p><p><a
href="http://www.amazon.com/dp/B000B8UOV6/?tag=beepla-20"><img
title="image" style="display: inline; margin: 0px 10px 10px 0px" height="112" alt="image" src="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_4.png" width="150" align="left" /></a>Photo and video cameras will be able to post pictures and videos to your home computer, sites like Flickr and YouTube, or email themselves directly to your friends… as soon as you record them, over cellular and Wifi networks.</p><p>Cell phones with cameras? Think cameras with cell phones. Some Wifi enabled cameras already came out, like this <a
href="http://www.amazon.com/dp/B000B8UOV6/?tag=beepla-20">Canon SD430</a> (DP review <a
href="http://www.dpreview.com/news/0510/05102501canonsd430wifi.asp">here</a>), and this freshly announced at CES 2009 <a
href="http://i.gizmodo.com/5126097/sony-cybershot-g3-worlds-first-camera-you-can-surf-the-web-on">Sony G3</a>, and now it’s time to go cellular.</p><p>The next prediction is a generalization of this concept.</p><p>&#160;</p><p><strong><font
size="4">4. Wireless Connectivity Everywhere, In Every Device, Anywhere You Go</font></strong></p><p><a
href="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_5.png" class="lightview" rel="gallery['699']" title="image"><img
title="image" style="display: inline; margin: 0px 10px 10px 0px" height="101" alt="image" src="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_thumb_4.png" width="150" align="left" /></a>Cell phone carriers will sign an increasing amount of deals with companies that want to build devices which connect to the Internet or private networks anywhere you go: GPSes, cameras, digital picture frames, cars, fridges.</p><p>The future is completely wireless. People are sick and tired of cords, clutter, and Rick Astley – I know that for a fact and digg says so.</p><p>&#160;</p><p><strong><font
size="4">5. Android Will Become Hugely Successful</font></strong></p><p><strong><font
size="4"><a
href="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_6.png" class="lightview" rel="gallery['699']" title="image"><img
title="image" style="display: inline; margin: 0px 10px 10px 0px" height="150" alt="image" src="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_thumb_5.png" width="150" align="left" /></a></font></strong>Alright, I’m dead tired of <a
href="http://www.google.com/search?q=android+flop&amp;sourceid=navclient-ff&amp;ie=UTF-8&amp;rlz=1B3GGGL_en___US269">all the posts</a> about how <a
href="http://www.android.com/">Google’s Android</a> is going to <strong>flop</strong> in 2009. I sincerely feel that people with that point of view have never experienced Google and open source, played with Android itself, or realized what exactly an open source phone OS means to developers, manufacturers, and consumers.</p><p>Android will become a platform of choice in the next couple of years as everyone starts to realize its limitless possibilities, the OS matures, thousands of new apps get written for it, and new Android phones flood the market. The only Android phone released so far, HTC’s G1, has already <a
href="http://reviews.cnet.com/smartphones/t-mobile-g1-black/4505-6452_7-33283585.html">received praise from consumers</a>, as well as my friends (even the females ones are excited. And yes, I have female friends).</p><p>Motorola <a
href="http://www.redherring.com/Home/25383">announced</a> a few months ago that its new phones are going to run Android and Windows Mobile exclusively. If a company with an R&amp;D department as big as Moto’s stands behind something, you bet your ass they’ve done they’re homework. And what’s not to like? They can now:</p><ul><li>take something that’s supported by the biggest Internet company in the world and the community, for free.</li><li>stop worrying about writing and maintaining their own OS – BAM, tons of money saved.</li><li>concentrate R&amp;D on the hardware.</li><li>if need be, freely develop the features they want that Android doesn’t support yet and contribute them back. Everyone wins, except maybe Symbian developers that don’t have a job anymore.</li></ul><p>Android is going to be a revolution. Apple and Android fighting it out will be the best thing that happened to us since the invention of sushi.</p><p><div
class="note"><div
class="notetip"><strong>Update:</strong> An <a
href="http://www.intomobile.com/2009/01/09/ces-2009-nimble-android-desktop-phone.html">Android desktop phone</a> was just released at CES. By end of 2009 we will be flooded with Androidness.</div></div></p><p>&#160;</p><p><strong><font
size="4">6. Open Source HDTVs</font></strong></p><p><a
href="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_11.png" class="lightview" rel="gallery['699']" title="image"><img
title="image" style="display: inline; margin: 0px 10px 10px 0px" height="109" alt="image" src="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_thumb_8.png" width="150" align="left" /></a> The open source revolution will continue and start penetrating the HDTV market.</p><p>Personally, I think set top boxes are a waste of effort, time, and money but give me an HDTV that can run Youtube, Vimeo, LastFM, Pandora, and any other site through some sort of a plugin or browser, with a build in Media Center that connects to my computers and goes Wifi, that uses open source, upgradeable software (most likely Linux based), and I will buy it in a heartbeat.</p><p>Yes, what I’m saying is if my TV and HTPC did something dirty, I would totally dig their offspring, and so would millions of other people who don’t want/need/care/understand HTPC. TV in general holds a special place in my heart, and make it an even better experience, people.</p><p><div
class="note"><div
class="notetip"><strong>Update: </strong>In fact, Vizio just made <a
href="http://www.engadget.com/2009/01/07/vizio-takes-the-cover-off-connected-hdtv-netflix-blockbuster/">an announcement</a> at CES 2009 that their TVs will have built-in support for <a
href="http://www.engadgethd.com/2009/01/07/vizio-connected-hdtv-directly-streams-netflix-movies/">Netflix</a>, Blockbuster, Amazon, Yahoo, and more.</div></div></p><p>&#160;</p><p><strong><font
size="4">7. Twitter’s Popularity Will Explode</font></strong></p><p><a
href="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_10.png" class="lightview" rel="gallery['699']" title="image"><img
title="image" style="display: inline; margin: 0px 10px 10px 0px" height="119" alt="image" src="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_thumb_7.png" width="150" align="left" /></a>Now for some social media. Twitter will continue dominating the microblogging arena, similar to YouTube dominating the video space. The site will grow extremely fast, much faster than now.</p><p>Competitors, like <a
href="http://plurk.com/ArtemR">plurk</a>, will probably secure certain small niches but nobody will be close to touch twitter.</p><p><div
class="note"><div
class="notetip">Twitter’s Google PageRank (PR) today is <strong>8</strong> out of <strong>10</strong>, which is considered very high.</p><p>It has the Alexa 3 month average rank of <strong>599</strong>, 1 week average of <strong>414</strong>, and 1 day average of <strong>351</strong>.</p><p><em>I predict that by the end of <strong>2009</strong>, Twitter will move into the <strong>top 50 </strong>Alexa.</em></div></div></p><p>Twitter’s significance in the business world for will be revolutionary. It will become second nature for every company to have one or many twitter accounts as means of connecting to consumers on a personal level. Think an opportunity for mini press releases, many of them, daily, not boring ones, the ones people are actually going to read.</p><p><div
class="note"><div
class="noteclassic">Twitter is already being used by some companies, like Comcast (<a
href="http://twitter.com/comcastcares">@comcastcares</a>), for monitoring and responding to customer comments.</div></div></p><p>&#160;</p><p><strong><font
size="4">8. Social Media Jobs Will Be In Increasing Demand</font></strong></p><p> <a
href="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_12.png" class="lightview" rel="gallery['699']" title="image"><img
title="image" style="display: inline; margin: 0px 10px 10px 0px" height="115" alt="image" src="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_thumb_9.png" width="150" align="left" /></a> SEO, social marketing, and viral campaigns are very cost effective ways of brand promotion, and every company will want to jump on board.<p>As more and more of them realize this, they will start needing more people with marketing skills of <a
href="http://www.johnchow.com">John Chow</a>, <a
href="http://www.chrisbrogan.com/">Chris Brogan</a>, <a
href="http://www.nickycakes.com">Nicky Cakes</a> (this dude is hilarious), <a
href="http://www.shoemoney.com/">Jeremy Schoemaker</a>, and the like.</p><p>&#160;</p><p><strong><font
size="4">9. YouTube Will Continue To Dominate</font></strong></p><p><a
href="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_13.png" class="lightview" rel="gallery['699']" title="image"><img
title="image" style="display: inline; margin: 0px 20px 10px 0px" height="112" alt="image" src="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_thumb_10.png" width="150" align="left" /></a> This one is easy:</p><ul><li>Biggest user base.</li><li>HD. My favorite greasemonkey plugin <a
href="http://userscripts.org/scripts/show/13333">YousableTubeFix</a> exposes hi/lo FLVs, MP4, and HD MP4 options. Better quality equals better user experience.</li><li>Chromeless player. YouTube is the only company I know of that has a Javascript controlled chromeless player, which can be embedded in any other flash player. Combined with already existing millions of embeds all over the Internet, YouTube’s popularity isn’t going anywhere any time soon.</li><li>Google backed. Anything is possible when you Google owns you. Competition releases a good feature? YouTube has the resources to one-up it in no time. Need for more servers? YouTube will just buy a few thousand more with the $1.65Bln Google gave it. Traffic explosion? No problem &#8211; YouTube has been mooching off the Google CDN for months now.</li></ul><p>At the end of 2007, I predicted that in a year we will experience unprecedented HD quality online video. This prediction came true when <a
href="http://www.hulu.com">Hulu</a> and fueled by its success CBS, ABC, NBC, and pretty much every other TV network released their free online TV sites. YouTube <a
href="http://news.cnet.com/8301-1023_3-10126837-93.html">launched HD</a> a few months later.</p><p>So, my YouTube prediction for 2009 is it will sign deals with major TV and movie networks to finally start showing legal TV episodes and movies. It will become the biggest legal TV and movie hub on the Internet.</p><p>&#160;</p><p><strong><font
size="4">10. PostgreSQL Will Gain Popularity</font></strong></p><p><a
href="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_14.png" class="lightview" rel="gallery['699']" title="image"><img
title="image" style="display: inline; margin: 0px 20px 10px 0px" height="119" alt="image" src="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_thumb_11.png" width="150" align="left" /></a> Sun’s buyout of MySQL in 2008 surely sent some shockwaves around. However, I predict that the following factors will contribute to <a
href="http://www.postgresql.org/">PostgreSQL</a> gaining momentum:</p><ul><li>certain features of MySQL were moved to Enterprise only. Open source enthusiasts don’t appreciate an open source project going partially closed source, so they will be looking for alternative software, like PostgreSQL.</li><li>having spent years with MySQL, I am incredibly frustrated with certain quirks that should have been worked out a long time ago. As software architects look for stable, mature, cost effective, and easy to maintain databases, they will find PostgreSQL increasingly attractive.</li></ul><p>Don’t take my word for it. I highly suggest taking a look at <a
href="http://downloads.enterprisedb.com/whitepapers/PGvsMySQL_LowRes.pdf">this whitepaper comparing MySQL and PostgreSQL</a>. here are some highlights:</p><ul><li>Online operations and reorganization. This is my biggest beef with MySQL. Almost any ALTER table command will prevent writes to the table while it’s being altered. This operation requires double the table size because an ALTER simply makes a copy of the table, a rename, and then drop of the old one. This takes FOREVERRRR. PostgreSQL, on the other hand, supports <a
href="http://www.postgresql.org/docs/8.0/interactive/sql-altertable.html">a lot more</a> online operations that will not take down the table. MySQL promised to support <a
href="http://beerpla.net/2008/04/15/mysql-conference-liveblogging-the-future-of-mysql-tuesday-1155am-2/">online ALTER TABLE by 2009</a>. Will they keep their word? I highly doubt it.</li><li>PostgreSQL supports function based and partial indexes.</li><li>PostgreSQL supports nested triggers.</li><li>PostgreSQL supports user defined datatypes.</li><li>PostgreSQL has an IP address datatype (woot!).</li><li>MySQL’s default engine doesn’t support online backup and recovery (*cough*, MyISAM, *cough*). Don’t even get me started on MyISAM, which doesn’t support referential integrity, transactions, of any other ACID properties. Yes, I know, there&#039;s InnoDB. It’s a lot better. But it’s still not good enough.</li></ul><p>If you have spent time interfacing with both MySQL and PostgreSQL, I’d like to hear from you. Everyone I talked to so far who had used both, preferred PostgreSQL.</p><p>For all the MySQL fanboys, I was and still am one of you, I use MySQL every day. I’m only trying to open your eyes so you can see the rest of the world.</p><p><div
class="note"><div
class="noteclassic">Did you know PostgreSQL was a lot more mature than MySQL? Postgres <a
href="http://www.postgresql.org/about/history">was started in 1986</a> (or 1977 if you count its predecessor Ingres), while MySQL was initially released in 1995.</div></div></p><p>In fact, I think the only reason MySQL is so much more popular than Postgresql nowadays is luck and marketing by MySQL AB (hey, it sure paid off, I’m not saying anything).</p><p>So, here’s to PostgreSQL having a bright future.</p><p>&#160;</p></p></p><h2 align="center"><strong>Bonus</strong></h2><p>As a bonus, here is a collection of links to other interesting predictions for 2009:</p><ul><li><a
title="http://www.pr-squared.com/2008/12/social_media_predictions_2009.html" href="http://www.pr-squared.com/2008/12/social_media_predictions_2009.html">http://www.pr-squared.com/2008/12/social_media_predictions_2009.html</a> – a great list of social media predictions.</li><li><a
title="http://battellemedia.com/archives/004772.php" href="http://battellemedia.com/archives/004772.php">http://battellemedia.com/archives/004772.php</a> – 14 online predictions as well as analysis of past years’ predictions.</li><li><a
title="http://news.cnet.com/5-predictions-for-2009/" href="http://news.cnet.com/5-predictions-for-2009/">http://news.cnet.com/5-predictions-for-2009/</a> – 5 CNET Digital Home predictions.</li><li><a
title="http://www.engadget.com/2009/01/01/predictions-for-2009/" href="http://www.engadget.com/2009/01/01/predictions-for-2009/">http://www.engadget.com/2009/01/01/predictions-for-2009/</a> – Engadget’s predictions.</li><li><a
title="http://www.freedom-to-tinker.com/blog/felten/predictions-2009" href="http://www.freedom-to-tinker.com/blog/felten/predictions-2009">http://www.freedom-to-tinker.com/blog/felten/predictions-2009</a> – 38 predictions freedom and technology related predictions.</li><li><a
title="http://www.readwriteweb.com/archives/2009_predictions_across_the_we.php" href="http://www.readwriteweb.com/archives/2009_predictions_across_the_we.php">http://www.readwriteweb.com/archives/2009_predictions_across_the_we.php</a> – ReadWriteWeb’s predictions across the web.</li></ul><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=Artem%26rsquo%3Bs+Top+10+Tech+Predictions+And+Ideas+For+2009+And+Beyond&amp;link=http://beerpla.net/2009/01/10/artems-top-10-tech-predictions-and-ideas-for-2009-and-beyond/&amp;notes=%20%20%20%20Everyone%20and%20their%20mother%20are%20throwing%20out%20their%20predictions%20for%202009%20nowadays%2C%20it%E2%80%99s%20a%20new%20fad.%20It%E2%80%99s%20like%20you%E2%80%99re%20not%20cool%20anymore%20if%20you%20don%E2%80%99t%20have%20twitter%2C%20a%20Mac%2C%20and%20a%20set%20of%20random%20predictions%20for%20the%20next%2012%20joyous%20months.%20%20So%20I%20decided%20to%20throw%20in%20a%20few%20ideas%20of%20my%20own%20to%20be%20part%20of&amp;short_link=http://bit.ly/9Xlipo&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=Artem%26rsquo%3Bs+Top+10+Tech+Predictions+And+Ideas+For+2009+And+Beyond&amp;link=http://beerpla.net/2009/01/10/artems-top-10-tech-predictions-and-ideas-for-2009-and-beyond/&amp;notes=%20%20%20%20Everyone%20and%20their%20mother%20are%20throwing%20out%20their%20predictions%20for%202009%20nowadays%2C%20it%E2%80%99s%20a%20new%20fad.%20It%E2%80%99s%20like%20you%E2%80%99re%20not%20cool%20anymore%20if%20you%20don%E2%80%99t%20have%20twitter%2C%20a%20Mac%2C%20and%20a%20set%20of%20random%20predictions%20for%20the%20next%2012%20joyous%20months.%20%20So%20I%20decided%20to%20throw%20in%20a%20few%20ideas%20of%20my%20own%20to%20be%20part%20of&amp;short_link=http://bit.ly/9Xlipo&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=Artem%26rsquo%3Bs+Top+10+Tech+Predictions+And+Ideas+For+2009+And+Beyond&amp;link=http://beerpla.net/2009/01/10/artems-top-10-tech-predictions-and-ideas-for-2009-and-beyond/&amp;notes=%20%20%20%20Everyone%20and%20their%20mother%20are%20throwing%20out%20their%20predictions%20for%202009%20nowadays%2C%20it%E2%80%99s%20a%20new%20fad.%20It%E2%80%99s%20like%20you%E2%80%99re%20not%20cool%20anymore%20if%20you%20don%E2%80%99t%20have%20twitter%2C%20a%20Mac%2C%20and%20a%20set%20of%20random%20predictions%20for%20the%20next%2012%20joyous%20months.%20%20So%20I%20decided%20to%20throw%20in%20a%20few%20ideas%20of%20my%20own%20to%20be%20part%20of&amp;short_link=http://bit.ly/9Xlipo&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=Artem%26rsquo%3Bs+Top+10+Tech+Predictions+And+Ideas+For+2009+And+Beyond&amp;link=http://beerpla.net/2009/01/10/artems-top-10-tech-predictions-and-ideas-for-2009-and-beyond/&amp;notes=%20%20%20%20Everyone%20and%20their%20mother%20are%20throwing%20out%20their%20predictions%20for%202009%20nowadays%2C%20it%E2%80%99s%20a%20new%20fad.%20It%E2%80%99s%20like%20you%E2%80%99re%20not%20cool%20anymore%20if%20you%20don%E2%80%99t%20have%20twitter%2C%20a%20Mac%2C%20and%20a%20set%20of%20random%20predictions%20for%20the%20next%2012%20joyous%20months.%20%20So%20I%20decided%20to%20throw%20in%20a%20few%20ideas%20of%20my%20own%20to%20be%20part%20of&amp;short_link=http://bit.ly/9Xlipo&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=Artem%26rsquo%3Bs+Top+10+Tech+Predictions+And+Ideas+For+2009+And+Beyond&amp;link=http://beerpla.net/2009/01/10/artems-top-10-tech-predictions-and-ideas-for-2009-and-beyond/&amp;notes=%20%20%20%20Everyone%20and%20their%20mother%20are%20throwing%20out%20their%20predictions%20for%202009%20nowadays%2C%20it%E2%80%99s%20a%20new%20fad.%20It%E2%80%99s%20like%20you%E2%80%99re%20not%20cool%20anymore%20if%20you%20don%E2%80%99t%20have%20twitter%2C%20a%20Mac%2C%20and%20a%20set%20of%20random%20predictions%20for%20the%20next%2012%20joyous%20months.%20%20So%20I%20decided%20to%20throw%20in%20a%20few%20ideas%20of%20my%20own%20to%20be%20part%20of&amp;short_link=http://bit.ly/9Xlipo&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=Artem%26rsquo%3Bs+Top+10+Tech+Predictions+And+Ideas+For+2009+And+Beyond&amp;link=http://beerpla.net/2009/01/10/artems-top-10-tech-predictions-and-ideas-for-2009-and-beyond/&amp;notes=%20%20%20%20Everyone%20and%20their%20mother%20are%20throwing%20out%20their%20predictions%20for%202009%20nowadays%2C%20it%E2%80%99s%20a%20new%20fad.%20It%E2%80%99s%20like%20you%E2%80%99re%20not%20cool%20anymore%20if%20you%20don%E2%80%99t%20have%20twitter%2C%20a%20Mac%2C%20and%20a%20set%20of%20random%20predictions%20for%20the%20next%2012%20joyous%20months.%20%20So%20I%20decided%20to%20throw%20in%20a%20few%20ideas%20of%20my%20own%20to%20be%20part%20of&amp;short_link=http://bit.ly/9Xlipo&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=Artem%26rsquo%3Bs+Top+10+Tech+Predictions+And+Ideas+For+2009+And+Beyond&amp;link=http://beerpla.net/2009/01/10/artems-top-10-tech-predictions-and-ideas-for-2009-and-beyond/&amp;notes=%20%20%20%20Everyone%20and%20their%20mother%20are%20throwing%20out%20their%20predictions%20for%202009%20nowadays%2C%20it%E2%80%99s%20a%20new%20fad.%20It%E2%80%99s%20like%20you%E2%80%99re%20not%20cool%20anymore%20if%20you%20don%E2%80%99t%20have%20twitter%2C%20a%20Mac%2C%20and%20a%20set%20of%20random%20predictions%20for%20the%20next%2012%20joyous%20months.%20%20So%20I%20decided%20to%20throw%20in%20a%20few%20ideas%20of%20my%20own%20to%20be%20part%20of&amp;short_link=http://bit.ly/9Xlipo&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=Artem%26rsquo%3Bs%20Top%2010%20Tech%20Predictions%20And%20Ideas%20For%202009%20And%20Beyond&amp;link=http://beerpla.net/2009/01/10/artems-top-10-tech-predictions-and-ideas-for-2009-and-beyond/&amp;notes=%20%20%20%20Everyone%20and%20their%20mother%20are%20throwing%20out%20their%20predictions%20for%202009%20nowadays%2C%20it%E2%80%99s%20a%20new%20fad.%20It%E2%80%99s%20like%20you%E2%80%99re%20not%20cool%20anymore%20if%20you%20don%E2%80%99t%20have%20twitter%2C%20a%20Mac%2C%20and%20a%20set%20of%20random%20predictions%20for%20the%20next%2012%20joyous%20months.%20%20So%20I%20decided%20to%20throw%20in%20a%20few%20ideas%20of%20my%20own%20to%20be%20part%20of&amp;short_link=http://bit.ly/9Xlipo&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2009/09/03/htc-hero-coming-to-sprint-october-11th-179-99-powerful-and-sexy-here-is-why-you-need-to-own-it/" rel="bookmark" title="September 3, 2009">HTC Hero Coming To Sprint October 11th! $179.99, Powerful, And Sexy. Here Is Why You Need To Own It</a></li><li><a
href="http://beerpla.net/2008/04/21/sun-definitely-developing-a-phone/" rel="bookmark" title="April 21, 2008">Sun Definitely Developing A Phone This Year</a></li><li><a
href="http://beerpla.net/2009/04/09/the-real-reasons-to-use-twitter-get-over-your-prejudice-already/" rel="bookmark" title="April 9, 2009">The Real Reasons To Use Twitter (Get Over Your Prejudice Already)</a></li><li><a
href="http://beerpla.net/2010/01/18/wordpress-developers-how-do-you-make-a-living-poll-discussion/" rel="bookmark" title="January 18, 2010">WordPress Developers &#8211; How Do You Make A Living [Poll + Discussion]?</a></li><li><a
href="http://beerpla.net/2009/11/21/meet-firefox-for-mobile-video-feature-highlights-more-info/" rel="bookmark" title="November 21, 2009">Meet Firefox For Mobile [Video + Feature Highlights + More Info]</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2009%2F01%2F10%2Fartems-top-10-tech-predictions-and-ideas-for-2009-and-beyond%2F&amp;title=Artem%26rsquo%3Bs%20Top%2010%20Tech%20Predictions%20And%20Ideas%20For%202009%20And%20Beyond" id="wpa2a_24"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2009/01/10/artems-top-10-tech-predictions-and-ideas-for-2009-and-beyond/feed/</wfw:commentRss> <slash:comments>17</slash:comments> </item> <item><title>Mastering The Linux Shell &#8211; Bash Shortcuts Explained (Now With Cheat Sheets)</title><link>http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/</link> <comments>http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/#comments</comments> <pubDate>Mon, 22 Dec 2008 19:46:05 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[bash]]></category> <category><![CDATA[cheat sheet]]></category> <category><![CDATA[cheatsheet]]></category> <category><![CDATA[combination]]></category> <category><![CDATA[featured]]></category> <category><![CDATA[key]]></category> <category><![CDATA[keyboard]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[pdf]]></category> <category><![CDATA[shortcut]]></category> <guid
isPermaLink="false">http://beerpla.net/2008/12/22/getting-around-bash-bash-shortcuts/</guid> <description><![CDATA[<p><img
style="margin: 0px 10px 10px 0px; display: inline" title="image" alt="image" align="left" src="http://beerpla.net/wp-content/uploads/GettingAroundBashBashShortcuts_BFF6/image_thumb_3.png" width="234" height="114" />During my day-to-day activities, I use the Bash shell a lot. My #1 policy is to optimize the most frequently used activities as much as possible, so I’ve compiled these handy bash shortcuts and hints (tested in SecureCRT on Windows and Konsole on Linux). The article only touches on the default bash mode – emacs, not vi. If you haven’t specifically assigned your shell mode to vi (set –o vi), you’re almost certainly using the emacs mode. Learn these and your shell productivity will skyrocket, I guarantee it.</p><p><div
class="note"><div
class="noteimportant"><strong>Update #1: </strong>In response to a few people saying this list is too short and “[he] could&#039;ve added something to it, to atleast make it look longer” (quote from one of <a
href="http://www.stumbleupon.com/url/beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/">Stumbleupon</a></div></div>...<div
class=clear></div> <a
href="http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description> <content:encoded><![CDATA[<p><img
style="margin: 0px 10px 10px 0px; display: inline" title="image" alt="image" align="left" src="http://beerpla.net/wp-content/uploads/GettingAroundBashBashShortcuts_BFF6/image_thumb_3.png" width="234" height="114" />During my day-to-day activities, I use the Bash shell a lot. My #1 policy is to optimize the most frequently used activities as much as possible, so I’ve compiled these handy bash shortcuts and hints (tested in SecureCRT on Windows and Konsole on Linux). The article only touches on the default bash mode – emacs, not vi. If you haven’t specifically assigned your shell mode to vi (set –o vi), you’re almost certainly using the emacs mode. Learn these and your shell productivity will skyrocket, I guarantee it.</p><p><div
class="note"><div
class="noteimportant"><strong>Update #1: </strong>In response to a few people saying this list is too short and “[he] could&#039;ve added something to it, to atleast make it look longer” (quote from one of <a
href="http://www.stumbleupon.com/url/beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/">Stumbleupon</a> reviewers), I want to clarify something. <strong>I deliberately did not include every single bash shortcut there is.</strong> I included what I personally thought were the best and most useful commands. I did not want to make the list too cluttered and wanted the cheat sheet to fit on one page without going to a smaller font size.</div></div></p><p><a
href="http://beerpla.net/downloads/Bash.Shortcuts.pdf" target="_blank"><img
style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/GettingAroundBashBashShortcuts_BFF6/image_6.png" width="640" height="248" /></a>&#160;</p><p><font
size="5"><strong>Download Version 1.3 (03/22/12):</strong></font></p><ul><li><a
href="http://beerpla.net/downloads/Bash.Shortcuts.pdf">Bash.Shortcuts.pdf for Adobe Acrobat</a> (305.8 kB) downloaded 7308 times</li><li><a
href="http://beerpla.net/downloads/Bash.Shortcuts.docx">Bash.Shortcuts.docx for Word 2007+</a> (22.5 kB) downloaded 2733 times</li><li><a
href="http://beerpla.net/downloads/Bash.Shortcuts.doc">Bash.Shortcuts.doc for Word 97-2003</a> (52.5 kB) downloaded 1928 times</li></ul><p>And, for quick reference, here&#039;s the ugly html version:</p><p><center><br
/><table
border="1" cellspacing="0" cellpadding="2" width="600"><tbody><tr><td
width="186"><p
align="center"><b>Keyboard shortcut</b></p></td><td
width="564"><p
align="center"><b>Action</b></p></td></tr><tr><td
width="750" colspan="2"><p
align="center"><strong>Navigation</strong></p></td></tr><tr><td
width="186"><p><b>Ctrl-A</b></p></td><td
width="564"><p><i>Go </i>to the beginning of the line (note that if you use GNU screen, you can use the Home button to do this, especially considering that Ctrl-A is a special control character in screen).</p></td></tr><tr><td
width="186"><p><b>Ctrl-E</b></p></td><td
width="564"><p><i>Go </i>to the end of the line (note that if you use GNU screen, you can use the End button to do this).</p></td></tr><tr><td
width="186"><p><b>Alt-B (or ESC, left arrow)</b></p></td><td
width="564"><p><i>Jump </i>back one word using a non-alphanumeric character as delimiter.</p></td></tr><tr><td
width="186"><p><b>Alt-F (or ESC, right arrow)</b></p></td><td
width="564"><p><i>Jump </i>forward one word using a non-alphanumeric character as delimiter.</p></td></tr><tr><td
width="186"><p><b>Ctrl-PGUP or Shift-PGUP</b></p></td><td
width="564"><p>This may or may not work, and it works differently on different console apps. It will either <i>scroll</i> up one line at a time, 1 page at a time, or it may not work at all. I&#039;m inclined to think it&#039;s not a bash shortcut at all.</p></td></tr><tr><td
width="186"><p><b>Ctrl-PGDN or Shift-PGDN</b></p></td><td
width="564"><p>Same as the above but <i>scrolling</i> is done in the opposite direction.</p></td></tr><tr><td
width="186"><p><b>Up/Down</b></p></td><td
width="564"><p><i>Previous/Next</i> command in history. This one is way too obvious but I&#039;m including it for completeness.</p></td></tr><tr><td
width="186"><p><b>Ctrl-R</b></p></td><td
width="564"><p>History <i>search</i>. For example, Ctrl-R svn Ctrl-R Ctrl-R … will cycle through all recently run commands with the ‘svn’ in them. It is one of the most useful shortcuts in bash.</p></td></tr><tr><td
width="186"><p><b>Ctrl-O</b></p></td><td
width="564"><p>Takes whatever line was after the line you selected with Ctrl-R and makes it your next command.</p></td></tr><tr><td
width="750" colspan="2"><p
align="center"><strong>Command Line Manipulation</strong></p></td></tr><tr><td
width="186"><p><b>Ctrl-W</b></p></td><td
width="564"><p><i>Cut </i>one word backwards<i> </i>using white space as delimiter.</p></td></tr><tr><td
width="186"><p><b>Alt-BACKSPACE</b></p></td><td
width="564"><p><i>Cut</i> one word backwards using a non-alphanumeric character as delimiter (different from Ctrl-W, for example, abc;bcd will cut to abc;).</p></td></tr><tr><td
width="186"><p><b>Ctrl-K</b></p></td><td
width="564"><p><i>Cut </i>everything forward<i> </i>to end of line.</p></td></tr><tr><td
width="186"><p><b>Ctrl-U</b></p></td><td
width="564"><p><i>Cut </i>everything backwards<i> </i>to beginning of line.</p></td></tr><tr><td
width="186"><p><b>Ctrl-T</b></p></td><td
width="564"><p><i>Transpose </i>the current character with the previous one. I almost never use this. Never mind, I never use it, but someone might find it useful.</p></td></tr><tr><td
width="186"><p><b>Alt-T</b></p></td><td
width="564"><p><i>Transpose</i> the word at cursor with the one before cursor. In other words, swap them around.</p></td></tr><tr><td
width="186"><p><b>Ctrl-Y</b></p></td><td
width="564"><p><i>Paste</i> whatever was cut by the last cut command.</p></td></tr><tr><td
width="186"><p><b>Ctrl-V</b></p></td><td
width="564"><p><i>Insert</i> the next character <i>literally</i>. For example, Ctrl-V TAB inserts the actual TAB character. This shortcut is often misunderstood because of mistyping Ctrl-V and not realizing what it does.</p></td></tr><tr><td
width="186"><p><b>Ctrl-_</b></p></td><td
width="564"><p><i>Undo </i>the last command. Don’t forget – it’s Ctrl-Shift-MINUS, not Ctrl-MINUS.</p></td></tr><tr><td
width="186"><p><b>Alt-R</b></p></td><td
width="564"><p><i>Revert </i>all changes to current line. Very useful if you accidentally modify a command in history.<i></i></p></td></tr><tr><td
width="186"><p><b>Alt-U/Alt-L/Alt-C</b></p></td><td
width="564"><p><i>Uppercase/lowercase/capitalize </i>from cursor to end of word and move cursor past end of word.</p></td></tr><tr><td
width="750" colspan="2"><p
align="center"><strong>Terminal control</strong></p></td></tr><tr><td
width="186"><p><b>Ctrl-L</b></p></td><td
width="564"><p><i>Clear</i> screen while keeping whatever is already typed in the command line intact.</p></td></tr><tr><td
width="186"><p><b>Ctrl-S</b></p></td><td
width="564"><p><i>Suspend</i> currently running terminal.</p></td></tr><tr><td
width="186"><p><b>Ctrl-Q</b></p></td><td
width="564"><p><i>Unsuspend</i> the terminal suspended by Ctrl-S. You need to be aware of this shortcut because 99% of the time you’ve accidentally pressed Ctrl-S and need to undo its effects.</p></td></tr><tr><td
width="186"><p><b>Ctrl-Z</b></p></td><td
width="564"><p><i>Suspend </i>the currently running process (usually followed by <i>bg</i> to resume it in the background or <i>fg</i> to resume in the foreground).</p></td></tr><tr><td
width="186"><p><b>TAB</b></p></td><td
width="564"><p><i>Autocomplete</i>. Start typing, then hit TAB. You will either get a list of possible completion values (2 TABs needed) or the only choice will be filled in (only 1 TAB is needed). This shortcut is quite obvious and well known, so I put it at the bottom of the list.</p></td></tr></tbody></table><p></center><p><div
class="note"><div
class="notetip"><strong>Tip:</strong> By the way, as duly noted in the comments, all of these tricks work on the mysql command line, so you can, for example, ctrl-R through your previously executed mysql commands.</div></div></p><p>Hope you guys will find this list helpful. I think it is relatively complete, but feel free to add any omissions.</p><p><center><iframe
style="width: 120px; height: 240px" marginheight="0" src="http://rcm.amazon.com/e/cm?t=beepla-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=B001GIOFNI&amp;md=10FE9736YVPPT7A0FBG2&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" frameborder="0" marginwidth="0" scrolling="no"></iframe><iframe
style="width: 120px; height: 240px" marginheight="0" src="http://rcm.amazon.com/e/cm?t=beepla-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=0596009658&amp;md=10FE9736YVPPT7A0FBG2&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" frameborder="0" marginwidth="0" scrolling="no"></iframe><iframe
style="width: 120px; height: 240px" marginheight="0" src="http://rcm.amazon.com/e/cm?t=beepla-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=0596526784&amp;md=10FE9736YVPPT7A0FBG2&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" frameborder="0" marginwidth="0" scrolling="no"></iframe><iframe
style="width: 120px; height: 240px" marginheight="0" src="http://rcm.amazon.com/e/cm?t=beepla-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=0596005954&amp;md=10FE9736YVPPT7A0FBG2&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" frameborder="0" marginwidth="0" scrolling="no"></iframe><iframe
style="width: 120px; height: 240px" marginheight="0" src="http://rcm.amazon.com/e/cm?t=beepla-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=1565922255&amp;md=10FE9736YVPPT7A0FBG2&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" frameborder="0" marginwidth="0" scrolling="no"></iframe></center><div
class="post_blob_1">Get guaranteed <a
href="http://www.test-king.com/exams/70-270.htm">70-270</a> exam success with up to date <a
href="http://www.test-king.com/exams/642-982.htm">642-982</a> questions and <a
href="http://www.test-king.com/exams/642-504.htm">642-504</a> practice test.</div><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=Mastering+The+Linux+Shell+-+Bash+Shortcuts+Explained+%28Now+With+Cheat+Sheets%29&amp;link=http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/&amp;notes=During%20my%20day-to-day%20activities%2C%20I%20use%20the%20Bash%20shell%20a%20lot.%20My%20%231%20policy%20is%20to%20optimize%20the%20most%20frequently%20used%20activities%20as%20much%20as%20possible%2C%20so%20I%E2%80%99ve%20compiled%20these%20handy%20bash%20shortcuts%20and%20hints%20%28tested%20in%20SecureCRT%20on%20Windows%20and%20Konsole%20on%20Linux%29.%20The%20article%20only%20touches%20on%20the%20default%20bas&amp;short_link=http://bit.ly/bGubfn&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=Mastering+The+Linux+Shell+-+Bash+Shortcuts+Explained+%28Now+With+Cheat+Sheets%29&amp;link=http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/&amp;notes=During%20my%20day-to-day%20activities%2C%20I%20use%20the%20Bash%20shell%20a%20lot.%20My%20%231%20policy%20is%20to%20optimize%20the%20most%20frequently%20used%20activities%20as%20much%20as%20possible%2C%20so%20I%E2%80%99ve%20compiled%20these%20handy%20bash%20shortcuts%20and%20hints%20%28tested%20in%20SecureCRT%20on%20Windows%20and%20Konsole%20on%20Linux%29.%20The%20article%20only%20touches%20on%20the%20default%20bas&amp;short_link=http://bit.ly/bGubfn&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=Mastering+The+Linux+Shell+-+Bash+Shortcuts+Explained+%28Now+With+Cheat+Sheets%29&amp;link=http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/&amp;notes=During%20my%20day-to-day%20activities%2C%20I%20use%20the%20Bash%20shell%20a%20lot.%20My%20%231%20policy%20is%20to%20optimize%20the%20most%20frequently%20used%20activities%20as%20much%20as%20possible%2C%20so%20I%E2%80%99ve%20compiled%20these%20handy%20bash%20shortcuts%20and%20hints%20%28tested%20in%20SecureCRT%20on%20Windows%20and%20Konsole%20on%20Linux%29.%20The%20article%20only%20touches%20on%20the%20default%20bas&amp;short_link=http://bit.ly/bGubfn&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=Mastering+The+Linux+Shell+-+Bash+Shortcuts+Explained+%28Now+With+Cheat+Sheets%29&amp;link=http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/&amp;notes=During%20my%20day-to-day%20activities%2C%20I%20use%20the%20Bash%20shell%20a%20lot.%20My%20%231%20policy%20is%20to%20optimize%20the%20most%20frequently%20used%20activities%20as%20much%20as%20possible%2C%20so%20I%E2%80%99ve%20compiled%20these%20handy%20bash%20shortcuts%20and%20hints%20%28tested%20in%20SecureCRT%20on%20Windows%20and%20Konsole%20on%20Linux%29.%20The%20article%20only%20touches%20on%20the%20default%20bas&amp;short_link=http://bit.ly/bGubfn&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=Mastering+The+Linux+Shell+-+Bash+Shortcuts+Explained+%28Now+With+Cheat+Sheets%29&amp;link=http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/&amp;notes=During%20my%20day-to-day%20activities%2C%20I%20use%20the%20Bash%20shell%20a%20lot.%20My%20%231%20policy%20is%20to%20optimize%20the%20most%20frequently%20used%20activities%20as%20much%20as%20possible%2C%20so%20I%E2%80%99ve%20compiled%20these%20handy%20bash%20shortcuts%20and%20hints%20%28tested%20in%20SecureCRT%20on%20Windows%20and%20Konsole%20on%20Linux%29.%20The%20article%20only%20touches%20on%20the%20default%20bas&amp;short_link=http://bit.ly/bGubfn&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=Mastering+The+Linux+Shell+-+Bash+Shortcuts+Explained+%28Now+With+Cheat+Sheets%29&amp;link=http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/&amp;notes=During%20my%20day-to-day%20activities%2C%20I%20use%20the%20Bash%20shell%20a%20lot.%20My%20%231%20policy%20is%20to%20optimize%20the%20most%20frequently%20used%20activities%20as%20much%20as%20possible%2C%20so%20I%E2%80%99ve%20compiled%20these%20handy%20bash%20shortcuts%20and%20hints%20%28tested%20in%20SecureCRT%20on%20Windows%20and%20Konsole%20on%20Linux%29.%20The%20article%20only%20touches%20on%20the%20default%20bas&amp;short_link=http://bit.ly/bGubfn&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=Mastering+The+Linux+Shell+-+Bash+Shortcuts+Explained+%28Now+With+Cheat+Sheets%29&amp;link=http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/&amp;notes=During%20my%20day-to-day%20activities%2C%20I%20use%20the%20Bash%20shell%20a%20lot.%20My%20%231%20policy%20is%20to%20optimize%20the%20most%20frequently%20used%20activities%20as%20much%20as%20possible%2C%20so%20I%E2%80%99ve%20compiled%20these%20handy%20bash%20shortcuts%20and%20hints%20%28tested%20in%20SecureCRT%20on%20Windows%20and%20Konsole%20on%20Linux%29.%20The%20article%20only%20touches%20on%20the%20default%20bas&amp;short_link=http://bit.ly/bGubfn&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=Mastering%20The%20Linux%20Shell%20-%20Bash%20Shortcuts%20Explained%20%28Now%20With%20Cheat%20Sheets%29&amp;link=http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/&amp;notes=During%20my%20day-to-day%20activities%2C%20I%20use%20the%20Bash%20shell%20a%20lot.%20My%20%231%20policy%20is%20to%20optimize%20the%20most%20frequently%20used%20activities%20as%20much%20as%20possible%2C%20so%20I%E2%80%99ve%20compiled%20these%20handy%20bash%20shortcuts%20and%20hints%20%28tested%20in%20SecureCRT%20on%20Windows%20and%20Konsole%20on%20Linux%29.%20The%20article%20only%20touches%20on%20the%20default%20bas&amp;short_link=http://bit.ly/bGubfn&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2008/04/09/some-useful-vim-commands-my-vim-cheatsheet/" rel="bookmark" title="April 9, 2008">Some Useful vim Commands &#8211; My vim Cheatsheet</a></li><li><a
href="http://beerpla.net/2009/04/11/essential-firefox-extensions-plugins-add-ons-and-tips-a-comprehensive-guide-part-1-tips/" rel="bookmark" title="April 11, 2009">Essential Firefox Extensions (Plugins, Add-Ons) And Tips &ndash; A Comprehensive Guide :: Part 1 :: Tips</a></li><li><a
href="http://beerpla.net/2009/10/06/supercharge-your-gnu-screen-with-a-power-taskbar-and-never-feel-lost-again/" rel="bookmark" title="October 6, 2009">Supercharge Your GNU Screen With A Power &quot;Taskbar&quot; And Never Feel Lost Again</a></li><li><a
href="http://beerpla.net/2009/11/04/android-auto-formatting-android-xml-files-with-eclipse/" rel="bookmark" title="November 4, 2009">[Android] Auto Formatting Android XML Files With Eclipse</a></li><li><a
href="http://beerpla.net/2008/03/12/mass-renaming-directories-and-files-using-total-commander/" rel="bookmark" title="March 12, 2008">Mass Renaming Directories And Files Using Total Commander</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2008%2F12%2F22%2Fmastering-the-linux-shell-bash-shortcuts-explained%2F&amp;title=Mastering%20The%20Linux%20Shell%20%26%238211%3B%20Bash%20Shortcuts%20Explained%20%28Now%20With%20Cheat%20Sheets%29" id="wpa2a_26"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/feed/</wfw:commentRss> <slash:comments>32</slash:comments> </item> <item><title>A Detailed Depiction Of The Job Interview Process At Google (by Peteris Krumins)</title><link>http://beerpla.net/2008/12/11/a-detailed-depiction-of-the-job-interview-process-at-google-by-peteris-krumins/</link> <comments>http://beerpla.net/2008/12/11/a-detailed-depiction-of-the-job-interview-process-at-google-by-peteris-krumins/#comments</comments> <pubDate>Thu, 11 Dec 2008 22:51:31 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[algorithm]]></category> <category><![CDATA[apply]]></category> <category><![CDATA[book]]></category> <category><![CDATA[C]]></category> <category><![CDATA[data structure]]></category> <category><![CDATA[get ready]]></category> <category><![CDATA[Google]]></category> <category><![CDATA[interview]]></category> <category><![CDATA[job]]></category> <category><![CDATA[prepare]]></category> <category><![CDATA[process]]></category> <category><![CDATA[Python]]></category> <guid
isPermaLink="false">http://beerpla.net/2008/12/11/a-detailed-depiction-of-the-job-interview-process-at-google-by-peteris-krumins/</guid> <description><![CDATA[<p><a
href="http://beerpla.net/wp-content/uploads/ADetailedDepictionOfTheJobInterviewProce_7C2C/image_3.png" class="lightview" rel="gallery['526']" title="image"><img
title="image" style="display: inline; margin: 0px 10px 10px 0px" height="100" alt="image" src="http://beerpla.net/wp-content/uploads/ADetailedDepictionOfTheJobInterviewProce_7C2C/image_thumb_3.png" width="240" align="left" /></a> Peteris Krumins is nothing short of a technical genius. Every single one of his blog posts is so detailed, one can write a book about it. He blogs about Linux, programming, and other tech stuff on his blog <a
href="http://www.catonmat.net/">http://www.catonmat.net/</a>.</p><p>A short while ago, Peteris posted his very thorough experience interviewing at Google. Needless to say, the level of detail is astounding. Unfortunately, he didn’t get the job but the post is very positive and informative. Here is the gist and a short excerpt:</p><ul><li>There were 3 phone interviews and 5 on-site interviews.</li><li>Peteris flew in all the way from Latvia, fully sponsored by Google. They paid for his flight, hotel, transportation, and food – brilliant!</li><li>The interviews were very</li>...<div
class=clear></div> <a
href="http://beerpla.net/2008/12/11/a-detailed-depiction-of-the-job-interview-process-at-google-by-peteris-krumins/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></ul>]]></description> <content:encoded><![CDATA[<p><a
href="http://beerpla.net/wp-content/uploads/ADetailedDepictionOfTheJobInterviewProce_7C2C/image_3.png" class="lightview" rel="gallery['526']" title="image"><img
title="image" style="display: inline; margin: 0px 10px 10px 0px" height="100" alt="image" src="http://beerpla.net/wp-content/uploads/ADetailedDepictionOfTheJobInterviewProce_7C2C/image_thumb_3.png" width="240" align="left" /></a> Peteris Krumins is nothing short of a technical genius. Every single one of his blog posts is so detailed, one can write a book about it. He blogs about Linux, programming, and other tech stuff on his blog <a
href="http://www.catonmat.net/">http://www.catonmat.net/</a>.</p><p>A short while ago, Peteris posted his very thorough experience interviewing at Google. Needless to say, the level of detail is astounding. Unfortunately, he didn’t get the job but the post is very positive and informative. Here is the gist and a short excerpt:</p><ul><li>There were 3 phone interviews and 5 on-site interviews.</li><li>Peteris flew in all the way from Latvia, fully sponsored by Google. They paid for his flight, hotel, transportation, and food – brilliant!</li><li>The interviews were very technical, with an emphasis on algorithms.</li><li>Google’s preferred language seems to be C/C++, though I know they use Python extensively as well.</li><li>If you’re interviewing, you better be very solid in computer science theory and data structures. At the same time, they treat every error in code very seriously, so even memory leaks are not acceptable. In fact, it looks like a few such mistakes cost Peteris his potential job.</li><li>The questions included data structures, networking, OS/filesystem, algorithms, and past work experience.</li><li>Google, of course, treated Peteris to a great lunch.</li></ul><p>In order to prepare for his interviews, Peteris reviewed lots of both theoretical and practical problems. He posted a great list of books:</p><ul><li><a
href="http://www.amazon.com/exec/obidos/ISBN=0201633469/">TCP/IP Illustrated</a></li><li><a
href="http://www.amazon.com/dp/0262032937/?tag=beepla-20">MIT’s Introduction to Algorithms</a> + <a
href="http://www.catonmat.net/blog/mit-introduction-to-algorithms-part-one/">his notes on algorithms</a></li><li><a
href="http://www.amazon.com/dp/0596102356/?tag=beepla-20">Building Scalable Web Sites</a></li><li><a
href="http://www.amazon.com/dp/0596007612/?tag=beepla-20">C++ Cookbook</a></li><li><a
href="http://www.amazon.com/dp/0596007973/?tag=beepla-20">Python Cookbook</a></li><li><a
href="http://www.amazon.com/dp/0596003137/?tag=beepla-20">Perl Cookbook</a></li></ul><p>to which I can myself add</p><ul><li><a
href="http://www.amazon.com/dp/0201379260/?tag=beepla-20">The C++ Standard Library: A Tutorial and Reference</a></li></ul><p>and articles</p><ul><li><a
href="http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml">Google C++ Style Guide</a> &lt;—excellent style guide, every C++ programmer needs to read it</li><li><a
href="http://research.google.com/archive/googlecluster.html">Web Search for a Planet: The Google Cluster Architecture</a></li><li><a
href="http://www.topcoder.com/tc?module=Static&amp;d1=tutorials&amp;d2=alg_index">Algorithm Tutorials on TopCoder</a></li><li><a
href="http://ifdefined.com/blog/post/2008/03/Google-interview.aspx">Corey Trager’s Google Interview</a></li><li><a
href="http://www.nomachetejuggling.com/2006/12/30/my-interview-with-google/">Rod Hilton’s Google Interview</a></li><li><a
href="http://www.philosophicalgeek.com/2007/08/12/my-interview-experience-with-google/">Ben Watson’s Google Interview</a></li><li><a
href="http://www.lifereboot.com/2008/my-interview-at-google/">Shaun Boyd’s Google Interview</a></li><li><a
href="http://www.alleyinsider.com/2008/3/how_i_blew_my_interview_with_google">How I Blew My Google Interview by Henry Blodget</a></li><li><a
href="http://steve-yegge.blogspot.com/2008/03/get-that-job-at-google.html">Get That Job at Google by Steve Yegge</a></li><li><a
href="http://www.theregister.co.uk/2007/01/05/google_interview_tales/">Tales from the Google’s interview room</a></li><li><a
href="http://www.drizzle.com/%7Ejpaint/google.html">Google Interview Questions</a></li><li><a
href="http://jhorna.wordpress.com/2007/09/08/google-interview-questions-fun-brain-teasers/">Google Interview Questions — Fun Brain Teasers!</a></li><li><a
href="http://research.google.com/archive/gfs.html">The Google File System</a></li><li><a
href="http://research.google.com/archive/bigtable.html">Bigtable: A Distributed Storage System for Structured Data</a></li><li><a
href="http://research.google.com/archive/mapreduce.html">MapReduce: Simplified Data Processing on Large Clusters</a></li><li><a
href="http://research.google.com/archive/disk_failures.html">Failure Trends in a Large Disk Drive Population</a></li></ul><p>Read the full experience at <a
href="http://www.catonmat.net/blog/my-job-interview-at-google">http://www.catonmat.net/blog/my-job-interview-at-google</a>.</p><p>Thanks, Peteris and good luck on your next interview.</p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=A+Detailed+Depiction+Of+The+Job+Interview+Process+At+Google+%28by+Peteris+Krumins%29&amp;link=http://beerpla.net/2008/12/11/a-detailed-depiction-of-the-job-interview-process-at-google-by-peteris-krumins/&amp;notes=%20Peteris%20Krumins%20is%20nothing%20short%20of%20a%20technical%20genius.%20Every%20single%20one%20of%20his%20blog%20posts%20is%20so%20detailed%2C%20one%20can%20write%20a%20book%20about%20it.%20He%20blogs%20about%20Linux%2C%20programming%2C%20and%20other%20tech%20stuff%20on%20his%20blog%20http%3A%2F%2Fwww.catonmat.net%2F.%20%20A%20short%20while%20ago%2C%20Peteris%20posted%20his%20very%20thorough%20experience%20int&amp;short_link=http://bit.ly/cRf9lu&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=A+Detailed+Depiction+Of+The+Job+Interview+Process+At+Google+%28by+Peteris+Krumins%29&amp;link=http://beerpla.net/2008/12/11/a-detailed-depiction-of-the-job-interview-process-at-google-by-peteris-krumins/&amp;notes=%20Peteris%20Krumins%20is%20nothing%20short%20of%20a%20technical%20genius.%20Every%20single%20one%20of%20his%20blog%20posts%20is%20so%20detailed%2C%20one%20can%20write%20a%20book%20about%20it.%20He%20blogs%20about%20Linux%2C%20programming%2C%20and%20other%20tech%20stuff%20on%20his%20blog%20http%3A%2F%2Fwww.catonmat.net%2F.%20%20A%20short%20while%20ago%2C%20Peteris%20posted%20his%20very%20thorough%20experience%20int&amp;short_link=http://bit.ly/cRf9lu&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=A+Detailed+Depiction+Of+The+Job+Interview+Process+At+Google+%28by+Peteris+Krumins%29&amp;link=http://beerpla.net/2008/12/11/a-detailed-depiction-of-the-job-interview-process-at-google-by-peteris-krumins/&amp;notes=%20Peteris%20Krumins%20is%20nothing%20short%20of%20a%20technical%20genius.%20Every%20single%20one%20of%20his%20blog%20posts%20is%20so%20detailed%2C%20one%20can%20write%20a%20book%20about%20it.%20He%20blogs%20about%20Linux%2C%20programming%2C%20and%20other%20tech%20stuff%20on%20his%20blog%20http%3A%2F%2Fwww.catonmat.net%2F.%20%20A%20short%20while%20ago%2C%20Peteris%20posted%20his%20very%20thorough%20experience%20int&amp;short_link=http://bit.ly/cRf9lu&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=A+Detailed+Depiction+Of+The+Job+Interview+Process+At+Google+%28by+Peteris+Krumins%29&amp;link=http://beerpla.net/2008/12/11/a-detailed-depiction-of-the-job-interview-process-at-google-by-peteris-krumins/&amp;notes=%20Peteris%20Krumins%20is%20nothing%20short%20of%20a%20technical%20genius.%20Every%20single%20one%20of%20his%20blog%20posts%20is%20so%20detailed%2C%20one%20can%20write%20a%20book%20about%20it.%20He%20blogs%20about%20Linux%2C%20programming%2C%20and%20other%20tech%20stuff%20on%20his%20blog%20http%3A%2F%2Fwww.catonmat.net%2F.%20%20A%20short%20while%20ago%2C%20Peteris%20posted%20his%20very%20thorough%20experience%20int&amp;short_link=http://bit.ly/cRf9lu&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=A+Detailed+Depiction+Of+The+Job+Interview+Process+At+Google+%28by+Peteris+Krumins%29&amp;link=http://beerpla.net/2008/12/11/a-detailed-depiction-of-the-job-interview-process-at-google-by-peteris-krumins/&amp;notes=%20Peteris%20Krumins%20is%20nothing%20short%20of%20a%20technical%20genius.%20Every%20single%20one%20of%20his%20blog%20posts%20is%20so%20detailed%2C%20one%20can%20write%20a%20book%20about%20it.%20He%20blogs%20about%20Linux%2C%20programming%2C%20and%20other%20tech%20stuff%20on%20his%20blog%20http%3A%2F%2Fwww.catonmat.net%2F.%20%20A%20short%20while%20ago%2C%20Peteris%20posted%20his%20very%20thorough%20experience%20int&amp;short_link=http://bit.ly/cRf9lu&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=A+Detailed+Depiction+Of+The+Job+Interview+Process+At+Google+%28by+Peteris+Krumins%29&amp;link=http://beerpla.net/2008/12/11/a-detailed-depiction-of-the-job-interview-process-at-google-by-peteris-krumins/&amp;notes=%20Peteris%20Krumins%20is%20nothing%20short%20of%20a%20technical%20genius.%20Every%20single%20one%20of%20his%20blog%20posts%20is%20so%20detailed%2C%20one%20can%20write%20a%20book%20about%20it.%20He%20blogs%20about%20Linux%2C%20programming%2C%20and%20other%20tech%20stuff%20on%20his%20blog%20http%3A%2F%2Fwww.catonmat.net%2F.%20%20A%20short%20while%20ago%2C%20Peteris%20posted%20his%20very%20thorough%20experience%20int&amp;short_link=http://bit.ly/cRf9lu&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=A+Detailed+Depiction+Of+The+Job+Interview+Process+At+Google+%28by+Peteris+Krumins%29&amp;link=http://beerpla.net/2008/12/11/a-detailed-depiction-of-the-job-interview-process-at-google-by-peteris-krumins/&amp;notes=%20Peteris%20Krumins%20is%20nothing%20short%20of%20a%20technical%20genius.%20Every%20single%20one%20of%20his%20blog%20posts%20is%20so%20detailed%2C%20one%20can%20write%20a%20book%20about%20it.%20He%20blogs%20about%20Linux%2C%20programming%2C%20and%20other%20tech%20stuff%20on%20his%20blog%20http%3A%2F%2Fwww.catonmat.net%2F.%20%20A%20short%20while%20ago%2C%20Peteris%20posted%20his%20very%20thorough%20experience%20int&amp;short_link=http://bit.ly/cRf9lu&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=A%20Detailed%20Depiction%20Of%20The%20Job%20Interview%20Process%20At%20Google%20%28by%20Peteris%20Krumins%29&amp;link=http://beerpla.net/2008/12/11/a-detailed-depiction-of-the-job-interview-process-at-google-by-peteris-krumins/&amp;notes=%20Peteris%20Krumins%20is%20nothing%20short%20of%20a%20technical%20genius.%20Every%20single%20one%20of%20his%20blog%20posts%20is%20so%20detailed%2C%20one%20can%20write%20a%20book%20about%20it.%20He%20blogs%20about%20Linux%2C%20programming%2C%20and%20other%20tech%20stuff%20on%20his%20blog%20http%3A%2F%2Fwww.catonmat.net%2F.%20%20A%20short%20while%20ago%2C%20Peteris%20posted%20his%20very%20thorough%20experience%20int&amp;short_link=http://bit.ly/cRf9lu&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2008/10/20/hadoop-primer-yet-another-hadoop-introduction/" rel="bookmark" title="October 20, 2008">Hadoop Primer &ndash; Yet Another Hadoop Introduction</a></li><li><a
href="http://beerpla.net/2009/10/19/impressions-from-the-stackoverflows-devdays-conference-in-san-francisco/" rel="bookmark" title="October 19, 2009">Impressions From The StackOverflow&#039;s DevDays Conference In San Francisco</a></li><li><a
href="http://beerpla.net/2008/03/26/setting-up-a-mysql-cluster/" rel="bookmark" title="March 26, 2008">Setting Up A MySQL Cluster</a></li><li><a
href="http://beerpla.net/2008/04/15/mysql-conference-liveblogging-performance-guide-for-mysql-cluster-tuesday-1050am/" rel="bookmark" title="April 15, 2008">MySQL Conference Liveblogging: Performance Guide For MySQL Cluster (Tuesday 10:50AM)</a></li><li><a
href="http://beerpla.net/2008/04/16/mysql-conference-liveblogging-introduction-to-the-blob-streaming-project-wednesday-300pm/" rel="bookmark" title="April 16, 2008">MySQL Conference Liveblogging: Introduction To The BLOB Streaming Project (Wednesday 3:00PM)</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2008%2F12%2F11%2Fa-detailed-depiction-of-the-job-interview-process-at-google-by-peteris-krumins%2F&amp;title=A%20Detailed%20Depiction%20Of%20The%20Job%20Interview%20Process%20At%20Google%20%28by%20Peteris%20Krumins%29" id="wpa2a_28"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2008/12/11/a-detailed-depiction-of-the-job-interview-process-at-google-by-peteris-krumins/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Debugging Weird sshd Connection Problems + What Happens When You Stop sshd</title><link>http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/</link> <comments>http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/#comments</comments> <pubDate>Fri, 15 Aug 2008 16:14:53 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[connection]]></category> <category><![CDATA[debug]]></category> <category><![CDATA[key]]></category> <category><![CDATA[keyboard interactive]]></category> <category><![CDATA[problem]]></category> <category><![CDATA[refuse]]></category> <category><![CDATA[sshd]]></category> <category><![CDATA[stop]]></category> <guid
isPermaLink="false">http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/</guid> <description><![CDATA[<p>So the other day I was setting up public key authentication for one of my users, which is usually very straightforward: generate a private/public key pair, stick the private key into user&#039;s .ssh dir, set dir permissions to 0700, private key permissions to 0600, stick the public key into the authorized_keys file on the server, and the job&#039;s done. However, this time, no matter what I was doing, the public key was being rejected or ignored and the system was moving on to the keyboard-interactive authentication.</p><p>Debugging on the client side with -v didn&#039;t help much:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td
class="code"><pre>artem@DeathStar:~/svn/b2/Fetch/LinkChecker&#62; ssh -v </pre></td></tr></table>...<div
class=clear></div> <a
href="http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></div>]]></description> <content:encoded><![CDATA[<p>So the other day I was setting up public key authentication for one of my users, which is usually very straightforward: generate a private/public key pair, stick the private key into user&#039;s .ssh dir, set dir permissions to 0700, private key permissions to 0600, stick the public key into the authorized_keys file on the server, and the job&#039;s done. However, this time, no matter what I was doing, the public key was being rejected or ignored and the system was moving on to the keyboard-interactive authentication.</p><p>Debugging on the client side with -v didn&#039;t help much:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td
class="code"><pre>artem@DeathStar:~/svn/b2/Fetch/LinkChecker&gt; ssh -v monkey@192.168.1.30
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
...
lots of boring shit
...
debug1: Found key in /home/artem/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
...
more boring shit
...
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering public key:
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Offering public key:
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Offering public key: /home/artem/.ssh/id_rsa
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Trying private key: /home/artem/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
Password:</pre></td></tr></table></div><p>After breaking my head over possible reasons why the pile of junk that thinks it&#039;s smarter than me next to my feet doesn&#039;t work, kicking it a few times, and observing the same result, I turned to debugging the ssh daemon itself &#8211; sshd.</p><ul><li>The -d option disables the daemon mode and enables debug mode, in which only 1 connection is accepted for the lifetime of the server, after which it simply quits.</li><li>-dd simply enables a more detailed output.</li><li>-e switches this debug output from a log file to STDOUT.</li></ul><p>However, to free up port 22, I had to stop the daemon that was already running, or else a &#034;Bind to port 22 on 0.0.0.0 failed: Address already in use.&#034; error appeared (duh). An interesting question though, especially for people doing this to remote boxes, what happens when one stops sshd? Ever thought of doing that but instead ran over to your mommy crying like a little girl? Well, fear no more, because I&#039;ll tell you exactly what happens:</p><ol><li>New users will have their connection refused.</li><li>Your own connection will not be interrrupted. sshd works by spawning a new instance of itself for every incoming connection, so your own sshd process will stay in memory.</li></ol><p> So where was I?</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre>/usr/sbin/sshd -dd -e</pre></td></tr></table></div><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
</pre></td><td
class="code"><pre>...
Authentication refused: bad ownership or modes for directory /home/monkey
...
Failed publickey for monkey from 192.168.1.30 port 56287 ssh2</pre></td></tr></table></div><p>AhA!! (emphasis on the last &#039;a&#039;). What have we here?</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td
class="code"><pre>artem@DeathStar:~&gt; cd /home/
artem@DeathStar:/home/&gt; l
drwxrwx--- 29 monkey  users 4096 2008-08-06 23:14 monkey/
&nbsp;
DeathStar:/home/ # chmod 755 monkey
drwxr-xr-x 29 monkey  users 4096 2008-08-06 23:14 monkey/
&nbsp;
artem@DeathStar:~/svn/b2/Fetch/LinkChecker&gt; ssh -v monkey@192.168.1.30
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 192.168.1.30 [192.168.1.30] port 22.
debug1: Connection established.
debug1: identity file /home/artem/.ssh/id_rsa type 1
debug1: identity file /home/artem/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.6
debug1: match: OpenSSH_4.6 pat OpenSSH*
...</pre></td></tr></table></div><p>Connection established, all systems are go, the key has been accepted.</p><p>Inspired by <a
href="http://linux.derkeiler.com/Mailing-Lists/Fedora/2005-08/1105.html">http://linux.derkeiler.com/Mailing-Lists/Fedora/2005-08/1105.html</a></p><p>P.S. Don&#039;t forget to /etc/init.d/sshd start. <img
src='http://beerpla.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=Debugging+Weird+sshd+Connection+Problems+%2B+What+Happens+When+You+Stop+sshd&amp;link=http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/&amp;notes=So%20the%20other%20day%20I%20was%20setting%20up%20public%20key%20authentication%20for%20one%20of%20my%20users%2C%20which%20is%20usually%20very%20straightforward%3A%20generate%20a%20private%2Fpublic%20key%20pair%2C%20stick%20the%20private%20key%20into%20user%27s%20.ssh%20dir%2C%20set%20dir%20permissions%20to%200700%2C%20private%20key%20permissions%20to%200600%2C%20stick%20the%20public%20key%20into%20the%20authoriz&amp;short_link=http://bit.ly/cy1sPs&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=Debugging+Weird+sshd+Connection+Problems+%2B+What+Happens+When+You+Stop+sshd&amp;link=http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/&amp;notes=So%20the%20other%20day%20I%20was%20setting%20up%20public%20key%20authentication%20for%20one%20of%20my%20users%2C%20which%20is%20usually%20very%20straightforward%3A%20generate%20a%20private%2Fpublic%20key%20pair%2C%20stick%20the%20private%20key%20into%20user%27s%20.ssh%20dir%2C%20set%20dir%20permissions%20to%200700%2C%20private%20key%20permissions%20to%200600%2C%20stick%20the%20public%20key%20into%20the%20authoriz&amp;short_link=http://bit.ly/cy1sPs&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=Debugging+Weird+sshd+Connection+Problems+%2B+What+Happens+When+You+Stop+sshd&amp;link=http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/&amp;notes=So%20the%20other%20day%20I%20was%20setting%20up%20public%20key%20authentication%20for%20one%20of%20my%20users%2C%20which%20is%20usually%20very%20straightforward%3A%20generate%20a%20private%2Fpublic%20key%20pair%2C%20stick%20the%20private%20key%20into%20user%27s%20.ssh%20dir%2C%20set%20dir%20permissions%20to%200700%2C%20private%20key%20permissions%20to%200600%2C%20stick%20the%20public%20key%20into%20the%20authoriz&amp;short_link=http://bit.ly/cy1sPs&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=Debugging+Weird+sshd+Connection+Problems+%2B+What+Happens+When+You+Stop+sshd&amp;link=http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/&amp;notes=So%20the%20other%20day%20I%20was%20setting%20up%20public%20key%20authentication%20for%20one%20of%20my%20users%2C%20which%20is%20usually%20very%20straightforward%3A%20generate%20a%20private%2Fpublic%20key%20pair%2C%20stick%20the%20private%20key%20into%20user%27s%20.ssh%20dir%2C%20set%20dir%20permissions%20to%200700%2C%20private%20key%20permissions%20to%200600%2C%20stick%20the%20public%20key%20into%20the%20authoriz&amp;short_link=http://bit.ly/cy1sPs&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=Debugging+Weird+sshd+Connection+Problems+%2B+What+Happens+When+You+Stop+sshd&amp;link=http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/&amp;notes=So%20the%20other%20day%20I%20was%20setting%20up%20public%20key%20authentication%20for%20one%20of%20my%20users%2C%20which%20is%20usually%20very%20straightforward%3A%20generate%20a%20private%2Fpublic%20key%20pair%2C%20stick%20the%20private%20key%20into%20user%27s%20.ssh%20dir%2C%20set%20dir%20permissions%20to%200700%2C%20private%20key%20permissions%20to%200600%2C%20stick%20the%20public%20key%20into%20the%20authoriz&amp;short_link=http://bit.ly/cy1sPs&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=Debugging+Weird+sshd+Connection+Problems+%2B+What+Happens+When+You+Stop+sshd&amp;link=http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/&amp;notes=So%20the%20other%20day%20I%20was%20setting%20up%20public%20key%20authentication%20for%20one%20of%20my%20users%2C%20which%20is%20usually%20very%20straightforward%3A%20generate%20a%20private%2Fpublic%20key%20pair%2C%20stick%20the%20private%20key%20into%20user%27s%20.ssh%20dir%2C%20set%20dir%20permissions%20to%200700%2C%20private%20key%20permissions%20to%200600%2C%20stick%20the%20public%20key%20into%20the%20authoriz&amp;short_link=http://bit.ly/cy1sPs&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=Debugging+Weird+sshd+Connection+Problems+%2B+What+Happens+When+You+Stop+sshd&amp;link=http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/&amp;notes=So%20the%20other%20day%20I%20was%20setting%20up%20public%20key%20authentication%20for%20one%20of%20my%20users%2C%20which%20is%20usually%20very%20straightforward%3A%20generate%20a%20private%2Fpublic%20key%20pair%2C%20stick%20the%20private%20key%20into%20user%27s%20.ssh%20dir%2C%20set%20dir%20permissions%20to%200700%2C%20private%20key%20permissions%20to%200600%2C%20stick%20the%20public%20key%20into%20the%20authoriz&amp;short_link=http://bit.ly/cy1sPs&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=Debugging%20Weird%20sshd%20Connection%20Problems%20%2B%20What%20Happens%20When%20You%20Stop%20sshd&amp;link=http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/&amp;notes=So%20the%20other%20day%20I%20was%20setting%20up%20public%20key%20authentication%20for%20one%20of%20my%20users%2C%20which%20is%20usually%20very%20straightforward%3A%20generate%20a%20private%2Fpublic%20key%20pair%2C%20stick%20the%20private%20key%20into%20user%27s%20.ssh%20dir%2C%20set%20dir%20permissions%20to%200700%2C%20private%20key%20permissions%20to%200600%2C%20stick%20the%20public%20key%20into%20the%20authoriz&amp;short_link=http://bit.ly/cy1sPs&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2010/03/01/the-most-awesome-vpn-tip-how-to-make-windows-automatically-use-your-local-wifilan-connection-directly-for-requests-that-dont-need-to-go-through-vpn/" rel="bookmark" title="March 1, 2010">The Most Awesome VPN Tip: How To Make Windows Automatically Use Your Local WiFi/LAN Connection Directly For Requests That Don&#039;t Need To Go Through VPN</a></li><li><a
href="http://beerpla.net/2010/01/09/how-to-exportimport-your-expandrivesftpdrive-drives-and-settings/" rel="bookmark" title="January 9, 2010">How To Export/Import Your ExpanDrive/SFTPDrive Drives And Settings</a></li><li><a
href="http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/" rel="bookmark" title="May 12, 2008">A Better diff Or What To Do When GNU diff Runs Out Of Memory (&quot;diff: memory exhausted&quot;)</a></li><li><a
href="http://beerpla.net/2007/03/24/beer-planet-hosting-moved-away-from-dreamhost-thank-god-finally/" rel="bookmark" title="March 24, 2007">Beer Planet Hosting Moved Away From Dreamhost (Thank God, Finally!)</a></li><li><a
href="http://beerpla.net/2006/10/03/youtube-custom-rss-search-results/" rel="bookmark" title="October 3, 2006">Youtube Custom RSS Search Results</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2008%2F08%2F15%2Fdebugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd%2F&amp;title=Debugging%20Weird%20sshd%20Connection%20Problems%20%2B%20What%20Happens%20When%20You%20Stop%20sshd" id="wpa2a_30"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>How To Fix symbol lookup error: /usr/sbin/httpd2-prefork: undefined symbol: apr_ldap_ssl_init</title><link>http://beerpla.net/2008/07/29/how-to-fix-symbol-lookup-error-usrsbinhttpd2-prefork-undefined-symbol-apr_ldap_ssl_init-2/</link> <comments>http://beerpla.net/2008/07/29/how-to-fix-symbol-lookup-error-usrsbinhttpd2-prefork-undefined-symbol-apr_ldap_ssl_init-2/#comments</comments> <pubDate>Wed, 30 Jul 2008 00:44:56 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[error]]></category> <category><![CDATA[http2]]></category> <category><![CDATA[undefined symbol]]></category> <guid
isPermaLink="false">http://beerpla.net/2008/07/29/how-to-fix-symbol-lookup-error-usrsbinhttpd2-prefork-undefined-symbol-apr_ldap_ssl_init-2/</guid> <description><![CDATA[<p>Apache stopped starting today for no apparent reason.</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td
class="code"><pre>rcapache2 restart
/usr/sbin/httpd2-prefork: symbol lookup error: /usr/sbin/httpd2-prefork: undefined symbol: apr_ldap_ssl_init
Starting httpd2 (prefork) /usr/sbin/httpd2-prefork: symbol lookup error: /usr/sbin/httpd2-prefork: undefined symbol: apr_ldap_ssl_init
&#160;
The command line was:
/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -DSSL
                                                                      failed</pre></td></tr></table></div><p> So I tried reinstalling libapr and apache2-utils related stuff with no luck. ldconfig didn&#039;t help either. It&#039;s not until I looked at /usr/lib and relinked a few things that it started working. What the hell, SUSE?</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
</pre></td><td
class="code"><pre>/usr/lib # l </pre></td></tr></table>...<div
class=clear></div> <a
href="http://beerpla.net/2008/07/29/how-to-fix-symbol-lookup-error-usrsbinhttpd2-prefork-undefined-symbol-apr_ldap_ssl_init-2/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></div>]]></description> <content:encoded><![CDATA[<p>Apache stopped starting today for no apparent reason.</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td
class="code"><pre>rcapache2 restart
/usr/sbin/httpd2-prefork: symbol lookup error: /usr/sbin/httpd2-prefork: undefined symbol: apr_ldap_ssl_init
Starting httpd2 (prefork) /usr/sbin/httpd2-prefork: symbol lookup error: /usr/sbin/httpd2-prefork: undefined symbol: apr_ldap_ssl_init
&nbsp;
The command line was:
/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -DSSL
                                                                      failed</pre></td></tr></table></div><p> So I tried reinstalling libapr and apache2-utils related stuff with no luck. ldconfig didn&#039;t help either. It&#039;s not until I looked at /usr/lib and relinked a few things that it started working. What the hell, SUSE?</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
</pre></td><td
class="code"><pre>/usr/lib # l libapr*
-rw-r--r-- 1 root root 239306 2007-09-21 23:41 libapr-1.a
-rw-r--r-- 1 root root    821 2007-09-21 23:41 libapr-1.la
lrwxrwxrwx 1 root root     17 2008-07-30 00:21 libapr-1.so -&gt; libapr-1.so.0.2.9*
lrwxrwxrwx 1 root root     18 2008-07-30 00:21 libapr-1.so.0 -&gt; libapr-1.so.0.2.12*
-rwxr-xr-x 1 root root 543841 2008-07-29 23:47 libapr-1.so.0.2.12*
-rwxr-xr-x 1 root root 148372 2007-09-21 23:41 libapr-1.so.0.2.9*
-rw-r--r-- 1 root root 156300 2007-09-23 13:33 libaprutil-1.a
-rw-r--r-- 1 root root    912 2007-09-23 13:33 libaprutil-1.la
lrwxrwxrwx 1 root root     21 2008-07-30 00:22 libaprutil-1.so -&gt; libaprutil-1.so.0.2.9*
lrwxrwxrwx 1 root root     22 2008-07-30 00:21 libaprutil-1.so.0 -&gt; libaprutil-1.so.0.2.12*
-rwxr-xr-x 1 root root 291520 2008-07-29 23:47 libaprutil-1.so.0.2.12*
-rwxr-xr-x 1 root root  98148 2007-09-23 13:33 libaprutil-1.so.0.2.9*
&nbsp;
/usr/lib # ln -sf libaprutil-1.so.0.2.9 libaprutil-1.so.0
/usr/lib # ln -sf libapr-1.so.0.2.9 libapr-1.so.0
&nbsp;
/usr/lib # l libapr*
-rw-r--r-- 1 root root 239306 2007-09-21 23:41 libapr-1.a
-rw-r--r-- 1 root root    821 2007-09-21 23:41 libapr-1.la
lrwxrwxrwx 1 root root     18 2008-07-30 00:34 libapr-1.so -&gt; libapr-1.so.0.2.9*
lrwxrwxrwx 1 root root     18 2008-07-30 00:21 libapr-1.so.0 -&gt; libapr-1.so.0.2.9*
-rwxr-xr-x 1 root root 543841 2008-07-29 23:47 libapr-1.so.0.2.12*
-rwxr-xr-x 1 root root 148372 2007-09-21 23:41 libapr-1.so.0.2.9*
-rw-r--r-- 1 root root 156300 2007-09-23 13:33 libaprutil-1.a
-rw-r--r-- 1 root root    912 2007-09-23 13:33 libaprutil-1.la
lrwxrwxrwx 1 root root     21 2008-07-30 00:35 libaprutil-1.so -&gt; libaprutil-1.so.0.2.9*
lrwxrwxrwx 1 root root     21 2008-07-30 00:35 libaprutil-1.so.0 -&gt; libaprutil-1.so.0.2.9*
-rwxr-xr-x 1 root root 291520 2008-07-29 23:47 libaprutil-1.so.0.2.12*
-rwxr-xr-x 1 root root  98148 2007-09-23 13:33 libaprutil-1.so.0.2.9*
&nbsp;
/usr/lib # rcapache2 restart
Syntax OK
Shutting down httpd2 (waiting for all children to terminate)          done
Starting httpd2 (prefork)                                             done</pre></td></tr></table></div><p>Voila, apache starts now. Grrr, why linker, why??</p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Fix+symbol+lookup+error%3A+%2Fusr%2Fsbin%2Fhttpd2-prefork%3A+undefined+symbol%3A+apr_ldap_ssl_init&amp;link=http://beerpla.net/2008/07/29/how-to-fix-symbol-lookup-error-usrsbinhttpd2-prefork-undefined-symbol-apr_ldap_ssl_init-2/&amp;notes=Apache%20stopped%20starting%20today%20for%20no%20apparent%20reason.%20%20%0Arcapache2%20restart%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20symbol%20lookup%20error%3A%20%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20undefined%20symbol%3A%20apr_ldap_ssl_init%0AStarting%20httpd2%20%28prefork%29%20%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20symbol%20lookup%20error%3A%20%2Fusr%2Fsbin%2Fhttpd2&amp;short_link=http://bit.ly/cB3i7o&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Fix+symbol+lookup+error%3A+%2Fusr%2Fsbin%2Fhttpd2-prefork%3A+undefined+symbol%3A+apr_ldap_ssl_init&amp;link=http://beerpla.net/2008/07/29/how-to-fix-symbol-lookup-error-usrsbinhttpd2-prefork-undefined-symbol-apr_ldap_ssl_init-2/&amp;notes=Apache%20stopped%20starting%20today%20for%20no%20apparent%20reason.%20%20%0Arcapache2%20restart%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20symbol%20lookup%20error%3A%20%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20undefined%20symbol%3A%20apr_ldap_ssl_init%0AStarting%20httpd2%20%28prefork%29%20%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20symbol%20lookup%20error%3A%20%2Fusr%2Fsbin%2Fhttpd2&amp;short_link=http://bit.ly/cB3i7o&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Fix+symbol+lookup+error%3A+%2Fusr%2Fsbin%2Fhttpd2-prefork%3A+undefined+symbol%3A+apr_ldap_ssl_init&amp;link=http://beerpla.net/2008/07/29/how-to-fix-symbol-lookup-error-usrsbinhttpd2-prefork-undefined-symbol-apr_ldap_ssl_init-2/&amp;notes=Apache%20stopped%20starting%20today%20for%20no%20apparent%20reason.%20%20%0Arcapache2%20restart%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20symbol%20lookup%20error%3A%20%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20undefined%20symbol%3A%20apr_ldap_ssl_init%0AStarting%20httpd2%20%28prefork%29%20%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20symbol%20lookup%20error%3A%20%2Fusr%2Fsbin%2Fhttpd2&amp;short_link=http://bit.ly/cB3i7o&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Fix+symbol+lookup+error%3A+%2Fusr%2Fsbin%2Fhttpd2-prefork%3A+undefined+symbol%3A+apr_ldap_ssl_init&amp;link=http://beerpla.net/2008/07/29/how-to-fix-symbol-lookup-error-usrsbinhttpd2-prefork-undefined-symbol-apr_ldap_ssl_init-2/&amp;notes=Apache%20stopped%20starting%20today%20for%20no%20apparent%20reason.%20%20%0Arcapache2%20restart%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20symbol%20lookup%20error%3A%20%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20undefined%20symbol%3A%20apr_ldap_ssl_init%0AStarting%20httpd2%20%28prefork%29%20%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20symbol%20lookup%20error%3A%20%2Fusr%2Fsbin%2Fhttpd2&amp;short_link=http://bit.ly/cB3i7o&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Fix+symbol+lookup+error%3A+%2Fusr%2Fsbin%2Fhttpd2-prefork%3A+undefined+symbol%3A+apr_ldap_ssl_init&amp;link=http://beerpla.net/2008/07/29/how-to-fix-symbol-lookup-error-usrsbinhttpd2-prefork-undefined-symbol-apr_ldap_ssl_init-2/&amp;notes=Apache%20stopped%20starting%20today%20for%20no%20apparent%20reason.%20%20%0Arcapache2%20restart%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20symbol%20lookup%20error%3A%20%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20undefined%20symbol%3A%20apr_ldap_ssl_init%0AStarting%20httpd2%20%28prefork%29%20%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20symbol%20lookup%20error%3A%20%2Fusr%2Fsbin%2Fhttpd2&amp;short_link=http://bit.ly/cB3i7o&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Fix+symbol+lookup+error%3A+%2Fusr%2Fsbin%2Fhttpd2-prefork%3A+undefined+symbol%3A+apr_ldap_ssl_init&amp;link=http://beerpla.net/2008/07/29/how-to-fix-symbol-lookup-error-usrsbinhttpd2-prefork-undefined-symbol-apr_ldap_ssl_init-2/&amp;notes=Apache%20stopped%20starting%20today%20for%20no%20apparent%20reason.%20%20%0Arcapache2%20restart%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20symbol%20lookup%20error%3A%20%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20undefined%20symbol%3A%20apr_ldap_ssl_init%0AStarting%20httpd2%20%28prefork%29%20%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20symbol%20lookup%20error%3A%20%2Fusr%2Fsbin%2Fhttpd2&amp;short_link=http://bit.ly/cB3i7o&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Fix+symbol+lookup+error%3A+%2Fusr%2Fsbin%2Fhttpd2-prefork%3A+undefined+symbol%3A+apr_ldap_ssl_init&amp;link=http://beerpla.net/2008/07/29/how-to-fix-symbol-lookup-error-usrsbinhttpd2-prefork-undefined-symbol-apr_ldap_ssl_init-2/&amp;notes=Apache%20stopped%20starting%20today%20for%20no%20apparent%20reason.%20%20%0Arcapache2%20restart%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20symbol%20lookup%20error%3A%20%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20undefined%20symbol%3A%20apr_ldap_ssl_init%0AStarting%20httpd2%20%28prefork%29%20%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20symbol%20lookup%20error%3A%20%2Fusr%2Fsbin%2Fhttpd2&amp;short_link=http://bit.ly/cB3i7o&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=How%20To%20Fix%20symbol%20lookup%20error%3A%20%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20undefined%20symbol%3A%20apr_ldap_ssl_init&amp;link=http://beerpla.net/2008/07/29/how-to-fix-symbol-lookup-error-usrsbinhttpd2-prefork-undefined-symbol-apr_ldap_ssl_init-2/&amp;notes=Apache%20stopped%20starting%20today%20for%20no%20apparent%20reason.%20%20%0Arcapache2%20restart%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20symbol%20lookup%20error%3A%20%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20undefined%20symbol%3A%20apr_ldap_ssl_init%0AStarting%20httpd2%20%28prefork%29%20%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20symbol%20lookup%20error%3A%20%2Fusr%2Fsbin%2Fhttpd2&amp;short_link=http://bit.ly/cB3i7o&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2009/06/09/how-to-make-your-site-lightning-fast-by-compressing-deflategzip-your-html-javascript-css-xml-etc-in-apache/" rel="bookmark" title="June 9, 2009">How To Make Your Site Lightning Fast* By Compressing (deflate/gzip) Your HTML, Javascript, CSS, XML, etc In Apache</a></li><li><a
href="http://beerpla.net/2007/08/10/how-to-resizegrow-vmware-linux-disks-and-partitions/" rel="bookmark" title="August 10, 2007">How To Resize/Grow VMware Linux Disks and Partitions</a></li><li><a
href="http://beerpla.net/2008/04/30/how-to-install-the-latest-soaplite-using-perl-cpan/" rel="bookmark" title="April 30, 2008">How To Install The Latest SOAP::Lite Using Perl CPAN</a></li><li><a
href="http://beerpla.net/2008/10/20/hadoop-primer-yet-another-hadoop-introduction/" rel="bookmark" title="October 20, 2008">Hadoop Primer &ndash; Yet Another Hadoop Introduction</a></li><li><a
href="http://beerpla.net/2010/02/20/how-to-view-a-specific-svn-revision-in-your-browser/" rel="bookmark" title="February 20, 2010">How To View A Specific SVN Revision In Your Browser</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2008%2F07%2F29%2Fhow-to-fix-symbol-lookup-error-usrsbinhttpd2-prefork-undefined-symbol-apr_ldap_ssl_init-2%2F&amp;title=How%20To%20Fix%20symbol%20lookup%20error%3A%20%2Fusr%2Fsbin%2Fhttpd2-prefork%3A%20undefined%20symbol%3A%20apr_ldap_ssl_init" id="wpa2a_32"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2008/07/29/how-to-fix-symbol-lookup-error-usrsbinhttpd2-prefork-undefined-symbol-apr_ldap_ssl_init-2/feed/</wfw:commentRss> <slash:comments>12</slash:comments> </item> <item><title>How To Check If The Local SVN Revision Is Up-To-Date</title><link>http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/</link> <comments>http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/#comments</comments> <pubDate>Thu, 24 Jul 2008 05:46:15 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[checkout]]></category> <category><![CDATA[co]]></category> <category><![CDATA[compare]]></category> <category><![CDATA[dry run]]></category> <category><![CDATA[revision]]></category> <category><![CDATA[SVN]]></category> <category><![CDATA[up]]></category> <category><![CDATA[up-to-date]]></category> <category><![CDATA[update]]></category> <guid
isPermaLink="false">http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/</guid> <description><![CDATA[<p>I&#039;ve encountered a problem recently where I had to figure out if some checked out code is up-to-date with the svn repository, without actually running svn update. Unfortunately, svn update doesn&#039;t have a dry-run option, so I had to find another solution.</p><p>I came up with 2, depending on how detailed the information needs to be, which I&#039;m about to share in this post.</p><p><strong>1. If you want exact file and directory names, you can run:</strong></p><p><div
class="wp_syntax"><div
class="code"><pre>svn status -u</pre></div></div></p><p>If any files need updating, you will see a * before the file name.</p><p><font
face="consolas"></font></p><div
class="wp_syntax"><div
class="code"><pre>svn status wc
M     wc/bar.c
A  +   wc/qax.c</pre></div></div><p></p><p><font
face="consolas"></font></p><div
class="wp_syntax"><div
class="code"><pre>svn status -u wc
M            965    wc/bar.c
       *     965    wc/foo.c
A  +         965    wc/qax.c
Status against revision:   981</pre></div></div><p></p><p><font
face="consolas">Or </font>...<div
class=clear></div> <a
href="http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description> <content:encoded><![CDATA[<p>I&#039;ve encountered a problem recently where I had to figure out if some checked out code is up-to-date with the svn repository, without actually running svn update. Unfortunately, svn update doesn&#039;t have a dry-run option, so I had to find another solution.</p><p>I came up with 2, depending on how detailed the information needs to be, which I&#039;m about to share in this post.</p><p><strong>1. If you want exact file and directory names, you can run:</strong></p><p><div
class="wp_syntax"><div
class="code"><pre>svn status -u</pre></div></div></p><p>If any files need updating, you will see a * before the file name.</p><p><font
face="consolas"></p><div
class="wp_syntax"><div
class="code"><pre>svn status wc
M     wc/bar.c
A  +   wc/qax.c</pre></div></div><p></font></p><p><font
face="consolas"></p><div
class="wp_syntax"><div
class="code"><pre>svn status -u wc
M            965    wc/bar.c
       *     965    wc/foo.c
A  +         965    wc/qax.c
Status against revision:   981</pre></div></div><p></font></p><p><font
face="consolas">Or more verbose</font></p><p><font
face="consolas"></p><div
class="wp_syntax"><div
class="code"><pre>svn status --show-updates --verbose wc
M            965       938 kfogel       wc/bar.c
       *     965       922 sussman      wc/foo.c
A  +         965       687 joe          wc/qax.c
             965       687 joe          wc/zig.c
Status against revision:   981</pre></div></div><p></font></p><p>Parsing the output in Perl, for instance, should be trivial. A connection to the repository is established for this check, so be sure to catch in your code the times when such connection is not available.</p><p><strong>2. If you only care about whether a specific directory needs to be updated or not, here&#039;s a quicker method:</strong></p><p>svn info vs svn info -rHEAD</p><p><div
class="wp_syntax"><div
class="code"><pre>cd somedir;
svn info -r HEAD | grep -i &quot;Last Changed Rev&quot;
Last Changed Rev: 8544
svn info | grep -i &quot;Last Changed Rev&quot;
Last Changed Rev: 8531</pre></div></div></p><p>If these numbers are not the same, an update is needed.</p><p>What can I be missing? Are there any other creative ways, or is svn update going to support dry-run? Feel free to leave a comment if you know something I don&#039;t.</p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Check+If+The+Local+SVN+Revision+Is+Up-To-Date&amp;link=http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/&amp;notes=I%27ve%20encountered%20a%20problem%20recently%20where%20I%20had%20to%20figure%20out%20if%20some%20checked%20out%20code%20is%20up-to-date%20with%20the%20svn%20repository%2C%20without%20actually%20running%20svn%20update.%20Unfortunately%2C%20svn%20update%20doesn%27t%20have%20a%20dry-run%20option%2C%20so%20I%20had%20to%20find%20another%20solution.%20I%20came%20up%20with%202%2C%20depending%20on%20how%20detailed%20t&amp;short_link=http://bit.ly/bpdXJa&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Check+If+The+Local+SVN+Revision+Is+Up-To-Date&amp;link=http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/&amp;notes=I%27ve%20encountered%20a%20problem%20recently%20where%20I%20had%20to%20figure%20out%20if%20some%20checked%20out%20code%20is%20up-to-date%20with%20the%20svn%20repository%2C%20without%20actually%20running%20svn%20update.%20Unfortunately%2C%20svn%20update%20doesn%27t%20have%20a%20dry-run%20option%2C%20so%20I%20had%20to%20find%20another%20solution.%20I%20came%20up%20with%202%2C%20depending%20on%20how%20detailed%20t&amp;short_link=http://bit.ly/bpdXJa&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Check+If+The+Local+SVN+Revision+Is+Up-To-Date&amp;link=http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/&amp;notes=I%27ve%20encountered%20a%20problem%20recently%20where%20I%20had%20to%20figure%20out%20if%20some%20checked%20out%20code%20is%20up-to-date%20with%20the%20svn%20repository%2C%20without%20actually%20running%20svn%20update.%20Unfortunately%2C%20svn%20update%20doesn%27t%20have%20a%20dry-run%20option%2C%20so%20I%20had%20to%20find%20another%20solution.%20I%20came%20up%20with%202%2C%20depending%20on%20how%20detailed%20t&amp;short_link=http://bit.ly/bpdXJa&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Check+If+The+Local+SVN+Revision+Is+Up-To-Date&amp;link=http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/&amp;notes=I%27ve%20encountered%20a%20problem%20recently%20where%20I%20had%20to%20figure%20out%20if%20some%20checked%20out%20code%20is%20up-to-date%20with%20the%20svn%20repository%2C%20without%20actually%20running%20svn%20update.%20Unfortunately%2C%20svn%20update%20doesn%27t%20have%20a%20dry-run%20option%2C%20so%20I%20had%20to%20find%20another%20solution.%20I%20came%20up%20with%202%2C%20depending%20on%20how%20detailed%20t&amp;short_link=http://bit.ly/bpdXJa&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Check+If+The+Local+SVN+Revision+Is+Up-To-Date&amp;link=http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/&amp;notes=I%27ve%20encountered%20a%20problem%20recently%20where%20I%20had%20to%20figure%20out%20if%20some%20checked%20out%20code%20is%20up-to-date%20with%20the%20svn%20repository%2C%20without%20actually%20running%20svn%20update.%20Unfortunately%2C%20svn%20update%20doesn%27t%20have%20a%20dry-run%20option%2C%20so%20I%20had%20to%20find%20another%20solution.%20I%20came%20up%20with%202%2C%20depending%20on%20how%20detailed%20t&amp;short_link=http://bit.ly/bpdXJa&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Check+If+The+Local+SVN+Revision+Is+Up-To-Date&amp;link=http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/&amp;notes=I%27ve%20encountered%20a%20problem%20recently%20where%20I%20had%20to%20figure%20out%20if%20some%20checked%20out%20code%20is%20up-to-date%20with%20the%20svn%20repository%2C%20without%20actually%20running%20svn%20update.%20Unfortunately%2C%20svn%20update%20doesn%27t%20have%20a%20dry-run%20option%2C%20so%20I%20had%20to%20find%20another%20solution.%20I%20came%20up%20with%202%2C%20depending%20on%20how%20detailed%20t&amp;short_link=http://bit.ly/bpdXJa&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Check+If+The+Local+SVN+Revision+Is+Up-To-Date&amp;link=http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/&amp;notes=I%27ve%20encountered%20a%20problem%20recently%20where%20I%20had%20to%20figure%20out%20if%20some%20checked%20out%20code%20is%20up-to-date%20with%20the%20svn%20repository%2C%20without%20actually%20running%20svn%20update.%20Unfortunately%2C%20svn%20update%20doesn%27t%20have%20a%20dry-run%20option%2C%20so%20I%20had%20to%20find%20another%20solution.%20I%20came%20up%20with%202%2C%20depending%20on%20how%20detailed%20t&amp;short_link=http://bit.ly/bpdXJa&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=How%20To%20Check%20If%20The%20Local%20SVN%20Revision%20Is%20Up-To-Date&amp;link=http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/&amp;notes=I%27ve%20encountered%20a%20problem%20recently%20where%20I%20had%20to%20figure%20out%20if%20some%20checked%20out%20code%20is%20up-to-date%20with%20the%20svn%20repository%2C%20without%20actually%20running%20svn%20update.%20Unfortunately%2C%20svn%20update%20doesn%27t%20have%20a%20dry-run%20option%2C%20so%20I%20had%20to%20find%20another%20solution.%20I%20came%20up%20with%202%2C%20depending%20on%20how%20detailed%20t&amp;short_link=http://bit.ly/bpdXJa&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2010/02/20/how-to-view-a-specific-svn-revision-in-your-browser/" rel="bookmark" title="February 20, 2010">How To View A Specific SVN Revision In Your Browser</a></li><li><a
href="http://beerpla.net/2008/06/16/how-to-svn-update-all-your-wordpress-plugins-in-one-go/" rel="bookmark" title="June 16, 2008">How To SVN Update All Your WordPress Plugins In One Go</a></li><li><a
href="http://beerpla.net/2006/07/15/converting-from-cvs-to-svn-developers-notes-and-why-svn-is-better/" rel="bookmark" title="July 15, 2006">Converting from CVS to SVN: Developer&#039;s Notes And Why SVN Is Better</a></li><li><a
href="http://beerpla.net/2010/03/06/how-to-show-hiddeninvisible-files-in-total-commander-both-locally-and-on-an-ftp-server/" rel="bookmark" title="March 6, 2010">How To Show Hidden/Invisible Files In Total Commander, Both Locally And On An FTP Server</a></li><li><a
href="http://beerpla.net/2009/06/20/how-to-properly-set-svn-svnexternals-property-in-svn-command-line/" rel="bookmark" title="June 20, 2009">How To Properly Set SVN svn:externals Property In SVN Command Line</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2008%2F07%2F23%2Fhow-to-check-if-the-local-svn-revision-is-up-to-date%2F&amp;title=How%20To%20Check%20If%20The%20Local%20SVN%20Revision%20Is%20Up-To-Date" id="wpa2a_34"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>A Better diff Or What To Do When GNU diff Runs Out Of Memory (&quot;diff: memory exhausted&quot;)</title><link>http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/</link> <comments>http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/#comments</comments> <pubDate>Mon, 12 May 2008 15:57:01 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Databases]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[comparison]]></category> <category><![CDATA[delta]]></category> <category><![CDATA[diff]]></category> <category><![CDATA[memory exhausted]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[out of memory]]></category> <category><![CDATA[rdiff]]></category> <category><![CDATA[rsync]]></category> <guid
isPermaLink="false">http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/</guid> <description><![CDATA[<p>Recently I ran into major problems using GNU diff. It would crash with &#034;diff: memory exhausted&#034; after only a few minutes trying to process the differences between a couple 4.5GB files. Even a beefy box with 9GB of RAM would run out of it in minutes.</p><p>There is a different solution, however, that is not dependent on file sizes. Enter <strong>rdiff</strong> &#8211; rsync&#039;s backbone. You can read about it here: <a
href="http://en.wikipedia.org/wiki/Rsync">http://en.wikipedia.org/wiki/Rsync</a> (search for rdiff).</p><p><strong>The upsides of rdiff are:</strong><ul><li>with the same 4.5GB files, rdiff only ate about 66MB of RAM and scaled very well. It never crashed to date.</li><li>it is also MUCH faster than diff.</li><li>rdiff itself combines both diff and patch capabilities, so you can create deltas</li></ul>...<div
class=clear></div> <a
href="http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description> <content:encoded><![CDATA[<p>Recently I ran into major problems using GNU diff. It would crash with &#034;diff: memory exhausted&#034; after only a few minutes trying to process the differences between a couple 4.5GB files. Even a beefy box with 9GB of RAM would run out of it in minutes.<p>There is a different solution, however, that is not dependent on file sizes. Enter <strong>rdiff</strong> &#8211; rsync&#039;s backbone. You can read about it here: <a
href="http://en.wikipedia.org/wiki/Rsync">http://en.wikipedia.org/wiki/Rsync</a> (search for rdiff).<p><strong>The upsides of rdiff are:</strong><ul><li>with the same 4.5GB files, rdiff only ate about 66MB of RAM and scaled very well. It never crashed to date.<li>it is also MUCH faster than diff.<li>rdiff itself combines both diff and patch capabilities, so you can create deltas and apply them using the same program</li></ul><p><strong>The downsides of rdiff are:</strong><ul><li>it&#039;s not part of standard Linux/UNIX distribution &#8211; you have to install the librsync package.<li>delta files rdiff produces have a slightly different format than diff&#039;s.<li>delta files are slightly larger (but not significantly enough to care).<li>a slightly different approach is used when generating a delta with rdiff, which is both good and bad &#8211; 2 steps are required. The first one produces a special signature file. In the second step, a delta is created using another rdiff call (all shown below). While the 2-step process may seem annoying, it has the benefits of providing faster deltas than when using diff. In fact, you can pipe the first step into the second one without any trouble if you want, which is what I ended up doing).</li></ul><p><strong>Usage:</strong></p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td
class="code"><pre>$ rdiff signature ORIGINAL.txt SIGNATURE.sig
&nbsp;
$ l -h SIGNATURE.sig
-rw-r--r-- 1 user users 25M 2008-04-23 22:32 SIGNATURE.sig
&nbsp;
$ rdiff delta SIGNATURE.sig MODIFIED.txt DELTA.rdiff
&nbsp;
$ l -h DELTA.rdiff
-rw-r--r-- 1 user users 82M 2008-04-23 22:36 DELTA.rdiff</pre></td></tr></table></div><p>And here&#039;s what you would do to reassemble MODIFIED.txt:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td
class="code"><pre>$ rdiff patch ORIGINAL.txt DELTA.rdiff MODIFIED_REASSEMBLED.txt
&nbsp;
$ l *.txt
-rw-r--r-- 1 user users 4,471,493,588 2008-04-23 20:24 MODIFIED.txt
-rw-r--r-- 1 user users 4,471,493,588 2008-04-23 22:44 MODIFIED_REASSEMBLED.txt
-rw-r--r-- 1 user users 4,403,302,981 2008-04-23 20:20 ORIGINAL.txt</pre></td></tr></table></div><p>Just as expected &#8211; everything matches.</p><p>Now, all of this could have been done in one go like this:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre>rdiff signature ORIGINAL.txt | rdiff delta -- - MODIFIED.txt DELTA.rdiff</pre></td></tr></table></div><p><p>As far as my usage of such a useful diff program, I was doing CSV dumps of certain fields from a MySQL database, like so:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre>SELECT * FROM table WHERE some_condition='1' ORDER BY id DESC INTO OUTFILE '/home/dump/dump.csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '&quot;';</pre></td></tr></table></div><p>and then applying rdiff to get the [quite small] daily deltas.</p><p>That&#039;s all folks!</p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=A+Better+diff+Or+What+To+Do+When+GNU+diff+Runs+Out+Of+Memory+%28%26quot%3Bdiff%3A+memory+exhausted%26quot%3B%29&amp;link=http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/&amp;notes=Recently%20I%20ran%20into%20major%20problems%20using%20GNU%20diff.%20It%20would%20crash%20with%20%22diff%3A%20memory%20exhausted%22%20after%20only%20a%20few%20minutes%20trying%20to%20process%20the%20differences%20between%20a%20couple%204.5GB%20files.%20Even%20a%20beefy%20box%20with%209GB%20of%20RAM%20would%20run%20out%20of%20it%20in%20minutes.%20%20There%20is%20a%20different%20solution%2C%20however%2C%20that%20is%20n&amp;short_link=http://bit.ly/cpIVIu&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=A+Better+diff+Or+What+To+Do+When+GNU+diff+Runs+Out+Of+Memory+%28%26quot%3Bdiff%3A+memory+exhausted%26quot%3B%29&amp;link=http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/&amp;notes=Recently%20I%20ran%20into%20major%20problems%20using%20GNU%20diff.%20It%20would%20crash%20with%20%22diff%3A%20memory%20exhausted%22%20after%20only%20a%20few%20minutes%20trying%20to%20process%20the%20differences%20between%20a%20couple%204.5GB%20files.%20Even%20a%20beefy%20box%20with%209GB%20of%20RAM%20would%20run%20out%20of%20it%20in%20minutes.%20%20There%20is%20a%20different%20solution%2C%20however%2C%20that%20is%20n&amp;short_link=http://bit.ly/cpIVIu&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=A+Better+diff+Or+What+To+Do+When+GNU+diff+Runs+Out+Of+Memory+%28%26quot%3Bdiff%3A+memory+exhausted%26quot%3B%29&amp;link=http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/&amp;notes=Recently%20I%20ran%20into%20major%20problems%20using%20GNU%20diff.%20It%20would%20crash%20with%20%22diff%3A%20memory%20exhausted%22%20after%20only%20a%20few%20minutes%20trying%20to%20process%20the%20differences%20between%20a%20couple%204.5GB%20files.%20Even%20a%20beefy%20box%20with%209GB%20of%20RAM%20would%20run%20out%20of%20it%20in%20minutes.%20%20There%20is%20a%20different%20solution%2C%20however%2C%20that%20is%20n&amp;short_link=http://bit.ly/cpIVIu&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=A+Better+diff+Or+What+To+Do+When+GNU+diff+Runs+Out+Of+Memory+%28%26quot%3Bdiff%3A+memory+exhausted%26quot%3B%29&amp;link=http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/&amp;notes=Recently%20I%20ran%20into%20major%20problems%20using%20GNU%20diff.%20It%20would%20crash%20with%20%22diff%3A%20memory%20exhausted%22%20after%20only%20a%20few%20minutes%20trying%20to%20process%20the%20differences%20between%20a%20couple%204.5GB%20files.%20Even%20a%20beefy%20box%20with%209GB%20of%20RAM%20would%20run%20out%20of%20it%20in%20minutes.%20%20There%20is%20a%20different%20solution%2C%20however%2C%20that%20is%20n&amp;short_link=http://bit.ly/cpIVIu&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=A+Better+diff+Or+What+To+Do+When+GNU+diff+Runs+Out+Of+Memory+%28%26quot%3Bdiff%3A+memory+exhausted%26quot%3B%29&amp;link=http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/&amp;notes=Recently%20I%20ran%20into%20major%20problems%20using%20GNU%20diff.%20It%20would%20crash%20with%20%22diff%3A%20memory%20exhausted%22%20after%20only%20a%20few%20minutes%20trying%20to%20process%20the%20differences%20between%20a%20couple%204.5GB%20files.%20Even%20a%20beefy%20box%20with%209GB%20of%20RAM%20would%20run%20out%20of%20it%20in%20minutes.%20%20There%20is%20a%20different%20solution%2C%20however%2C%20that%20is%20n&amp;short_link=http://bit.ly/cpIVIu&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=A+Better+diff+Or+What+To+Do+When+GNU+diff+Runs+Out+Of+Memory+%28%26quot%3Bdiff%3A+memory+exhausted%26quot%3B%29&amp;link=http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/&amp;notes=Recently%20I%20ran%20into%20major%20problems%20using%20GNU%20diff.%20It%20would%20crash%20with%20%22diff%3A%20memory%20exhausted%22%20after%20only%20a%20few%20minutes%20trying%20to%20process%20the%20differences%20between%20a%20couple%204.5GB%20files.%20Even%20a%20beefy%20box%20with%209GB%20of%20RAM%20would%20run%20out%20of%20it%20in%20minutes.%20%20There%20is%20a%20different%20solution%2C%20however%2C%20that%20is%20n&amp;short_link=http://bit.ly/cpIVIu&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=A+Better+diff+Or+What+To+Do+When+GNU+diff+Runs+Out+Of+Memory+%28%26quot%3Bdiff%3A+memory+exhausted%26quot%3B%29&amp;link=http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/&amp;notes=Recently%20I%20ran%20into%20major%20problems%20using%20GNU%20diff.%20It%20would%20crash%20with%20%22diff%3A%20memory%20exhausted%22%20after%20only%20a%20few%20minutes%20trying%20to%20process%20the%20differences%20between%20a%20couple%204.5GB%20files.%20Even%20a%20beefy%20box%20with%209GB%20of%20RAM%20would%20run%20out%20of%20it%20in%20minutes.%20%20There%20is%20a%20different%20solution%2C%20however%2C%20that%20is%20n&amp;short_link=http://bit.ly/cpIVIu&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=A%20Better%20diff%20Or%20What%20To%20Do%20When%20GNU%20diff%20Runs%20Out%20Of%20Memory%20%28%26quot%3Bdiff%3A%20memory%20exhausted%26quot%3B%29&amp;link=http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/&amp;notes=Recently%20I%20ran%20into%20major%20problems%20using%20GNU%20diff.%20It%20would%20crash%20with%20%22diff%3A%20memory%20exhausted%22%20after%20only%20a%20few%20minutes%20trying%20to%20process%20the%20differences%20between%20a%20couple%204.5GB%20files.%20Even%20a%20beefy%20box%20with%209GB%20of%20RAM%20would%20run%20out%20of%20it%20in%20minutes.%20%20There%20is%20a%20different%20solution%2C%20however%2C%20that%20is%20n&amp;short_link=http://bit.ly/cpIVIu&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2007/08/04/watch-a-useful-linux-command-you-may-have-never-heard-of/" rel="bookmark" title="August 4, 2007">Watch &#8211; A Useful Linux Command You May Have Never Heard Of</a></li><li><a
href="http://beerpla.net/2007/07/09/how-to-download-and-install-windows-media-player-11-bypassing-wga/" rel="bookmark" title="July 9, 2007">How To Download And Install Windows Media Player 11 Bypassing WGA</a></li><li><a
href="http://beerpla.net/2008/03/25/navicat-for-mysql-bugs-filed/" rel="bookmark" title="March 25, 2008">Navicat For MySQL Bugs Filed</a></li><li><a
href="http://beerpla.net/2006/07/15/converting-from-cvs-to-svn-developers-notes-and-why-svn-is-better/" rel="bookmark" title="July 15, 2006">Converting from CVS to SVN: Developer&#039;s Notes And Why SVN Is Better</a></li><li><a
href="http://beerpla.net/2008/06/16/how-to-svn-update-all-your-wordpress-plugins-in-one-go/" rel="bookmark" title="June 16, 2008">How To SVN Update All Your WordPress Plugins In One Go</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2008%2F05%2F12%2Fa-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted%2F&amp;title=A%20Better%20diff%20Or%20What%20To%20Do%20When%20GNU%20diff%20Runs%20Out%20Of%20Memory%20%28%26quot%3Bdiff%3A%20memory%20exhausted%26quot%3B%29" id="wpa2a_36"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/feed/</wfw:commentRss> <slash:comments>8</slash:comments> </item> <item><title>How To List Files Within tgz (tar.gz) Archives</title><link>http://beerpla.net/2008/04/26/how-to-list-files-within-tgz-targz-archives/</link> <comments>http://beerpla.net/2008/04/26/how-to-list-files-within-tgz-targz-archives/#comments</comments> <pubDate>Sat, 26 Apr 2008 19:08:37 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[archive]]></category> <category><![CDATA[bzip]]></category> <category><![CDATA[file]]></category> <category><![CDATA[gunzip]]></category> <category><![CDATA[gz]]></category> <category><![CDATA[gzip]]></category> <category><![CDATA[list]]></category> <category><![CDATA[tar]]></category> <category><![CDATA[untar]]></category> <guid
isPermaLink="false">http://beerpla.net/2008/04/26/how-to-list-files-within-tgz-targz-archives/</guid> <description><![CDATA[<p>This may not be very obvious but this is the command line to list files within a tar.gz archive on the fly:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre>tar -tzf file.tar.gz</pre></td></tr></table></div><p>-t: lists files<br
/>-f: instructs tar to deal with the following filename (file.tar.gz)<br
/>-z: informs tar that the it&#039;s dealing with a gzip file (-j if it&#039;s bzip2)</p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+List+Files+Within+tgz+%28tar.gz%29+Archives&#38;link=http://beerpla.net/2008/04/26/how-to-list-files-within-tgz-targz-archives/&#38;notes=This%20may%20not%20be%20very%20obvious%20but%20this%20is%20the%20command%20line%20to%20list%20files%20within%20a%20tar.gz%20archive%20on%20the%20fly%3Atar%20-tzf%20file.tar.gz%0A-t%3A%20lists%20files-f%3A%20instructs%20tar%20to%20deal%20with%20the%20following%20filename%20%28file.tar.gz%29-z%3A%20informs%20tar%20that%20the%20it%27s%20dealing%20with%20a%20gzip%20file%20%28-j%20if%20it%27s%20bzip2%29&#38;short_link=http://bit.ly/aSubhm&#38;v=1&#38;apitype=1&#38;apikey=8afa39428933be41f8afdb8ea21a495c&#38;source=Shareaholic&#38;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&#38;service=7&#38;tags=&#38;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+List+Files+Within+tgz+%28tar.gz%29+Archives&#38;link=http://beerpla.net/2008/04/26/how-to-list-files-within-tgz-targz-archives/&#38;notes=This%20may%20not%20be%20very%20obvious%20but%20this%20is%20the%20command%20line%20to%20list%20files%20within%20a%20tar.gz%20archive%20on%20the%20fly%3Atar%20-tzf%20file.tar.gz%0A-t%3A%20lists%20files-f%3A%20instructs%20tar%20to%20deal%20with%20the%20following%20filename%20%28file.tar.gz%29-z%3A%20informs%20tar%20that%20the%20it%27s%20dealing%20with%20a%20gzip%20file%20%28-j%20if%20it%27s%20bzip2%29&#38;short_link=http://bit.ly/aSubhm&#38;v=1&#38;apitype=1&#38;apikey=8afa39428933be41f8afdb8ea21a495c&#38;source=Shareaholic&#38;template=&#38;service=5&#38;tags=&#38;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+List+Files+Within+tgz+%28tar.gz%29+Archives&#38;link=http://beerpla.net/2008/04/26/how-to-list-files-within-tgz-targz-archives/&#38;notes=This%20may%20not%20be%20very%20obvious%20but%20this%20is%20the%20command%20line%20to%20list%20files%20within%20a%20tar.gz%20archive%20on%20the%20fly%3Atar%20-tzf%20file.tar.gz%0A-t%3A%20lists%20files-f%3A%20instructs%20tar%20to%20deal%20with%20the%20following%20filename%20%28file.tar.gz%29-z%3A%20informs%20tar%20that%20the%20it%27s%20dealing%20with%20a%20gzip%20file%20%28-j%20if%20it%27s%20bzip2%29&#38;short_link=http://bit.ly/aSubhm&#38;v=1&#38;apitype=1&#38;apikey=8afa39428933be41f8afdb8ea21a495c&#38;source=Shareaholic&#38;template=&#38;service=257&#38;tags=&#38;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+List+Files+Within+tgz+%28tar.gz%29+Archives&#38;link=http://beerpla.net/2008/04/26/how-to-list-files-within-tgz-targz-archives/&#38;notes=This%20may%20not%20be%20very%20obvious%20but%20this%20is%20the%20command%20line%20to%20list%20files%20within%20a%20tar.gz%20archive%20on%20the%20fly%3Atar%20-tzf%20file.tar.gz%0A-t%3A%20lists%20files-f%3A%20instructs%20tar%20to%20deal%20with%20the%20following%20filename%20%28file.tar.gz%29-z%3A%20informs%20tar%20that%20the%20it%27s%20dealing%20with%20a%20gzip%20file%20%28-j%20if%20it%27s%20bzip2%29&#38;short_link=http://bit.ly/aSubhm&#38;v=1&#38;apitype=1&#38;apikey=8afa39428933be41f8afdb8ea21a495c&#38;source=Shareaholic&#38;template=&#38;service=40&#38;tags=&#38;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+List+Files+Within+tgz+%28tar.gz%29+Archives&#38;link=http://beerpla.net/2008/04/26/how-to-list-files-within-tgz-targz-archives/&#38;notes=This%20may%20not%20be%20very%20obvious%20but%20this%20is%20the%20command%20line%20to%20list%20files%20within%20a%20tar.gz%20archive%20on%20the%20fly%3Atar%20-tzf%20file.tar.gz%0A-t%3A%20lists%20files-f%3A%20instructs%20tar%20to%20deal%20with%20the%20following%20filename%20%28file.tar.gz%29-z%3A%20informs%20tar%20that%20the%20it%27s%20dealing%20with%20a%20gzip%20file%20%28-j%20if%20it%27s%20bzip2%29&#38;short_link=http://bit.ly/aSubhm&#38;v=1&#38;apitype=1&#38;apikey=8afa39428933be41f8afdb8ea21a495c&#38;source=Shareaholic&#38;template=&#38;service=202&#38;tags=&#38;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+List+Files+Within+tgz+%28tar.gz%29+Archives&#38;link=http://beerpla.net/2008/04/26/how-to-list-files-within-tgz-targz-archives/&#38;notes=This%20may%20not%20be%20very%20obvious%20but%20this%20is%20the%20command%20line%20to%20list%20files%20within%20a%20tar.gz%20archive%20on%20the%20fly%3Atar%20-tzf%20file.tar.gz%0A-t%3A%20lists%20files-f%3A%20instructs%20tar%20to%20deal%20with%20the%20following%20filename%20%28file.tar.gz%29-z%3A%20informs%20tar%20that%20the%20it%27s%20dealing%20with%20a%20gzip%20file%20%28-j%20if%20it%27s%20bzip2%29&#38;short_link=http://bit.ly/aSubhm&#38;v=1&#38;apitype=1&#38;apikey=8afa39428933be41f8afdb8ea21a495c&#38;source=Shareaholic&#38;template=&#38;service=2&#38;tags=&#38;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+List+Files+Within+tgz+%28tar.gz%29+Archives&#38;link=http://beerpla.net/2008/04/26/how-to-list-files-within-tgz-targz-archives/&#38;notes=This%20may%20not%20be%20very%20obvious%20but%20this%20is%20the%20command%20line%20to%20list%20files%20within%20a%20tar.gz%20archive%20on%20the%20fly%3Atar%20-tzf%20file.tar.gz%0A-t%3A%20lists%20files-f%3A%20instructs%20tar%20to%20deal%20with%20the%20following%20filename%20%28file.tar.gz%29-z%3A%20informs%20tar%20that%20the%20it%27s%20dealing%20with%20a%20gzip%20file%20%28-j%20if%20it%27s%20bzip2%29&#38;short_link=http://bit.ly/aSubhm&#38;v=1&#38;apitype=1&#38;apikey=8afa39428933be41f8afdb8ea21a495c&#38;source=Shareaholic&#38;template=&#38;service=38&#38;tags=&#38;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=How%20To%20List%20Files%20Within%20tgz%20%28tar.gz%29%20Archives&#38;link=http://beerpla.net/2008/04/26/how-to-list-files-within-tgz-targz-archives/&#38;notes=This%20may%20not%20be%20very%20obvious%20but%20this%20is%20the%20command%20line%20to%20list%20files%20within%20a%20tar.gz%20archive%20on%20the%20fly%3Atar%20-tzf%20file.tar.gz%0A-t%3A%20lists%20files-f%3A%20instructs%20tar%20to%20deal%20with%20the%20following%20filename%20%28file.tar.gz%29-z%3A%20informs%20tar%20that%20the%20it%27s%20dealing%20with%20a%20gzip%20file%20%28-j%20if%20it%27s%20bzip2%29&#38;short_link=http://bit.ly/aSubhm&#38;v=1&#38;apitype=1&#38;apikey=8afa39428933be41f8afdb8ea21a495c&#38;source=Shareaholic&#38;template=&#38;service=201&#38;tags=&#38;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2008/03/21/quick-snippet-finding-if-a-file-has-a-media-extension-using-regex/" rel="bookmark" title="March 21, 2008">Quick Perl Snippet: Finding If A File Has A Media Extension Using Regex</a></li><li><a
href="http://beerpla.net/2008/04/09/some-useful-vim-commands-my-vim-cheatsheet/" rel="bookmark" title="April 9, 2008">Some Useful vim Commands &#8211; My vim Cheatsheet</a></li><li><a
href="http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/" rel="bookmark" title="December 22, 2008">Mastering The Linux Shell &#8211; Bash Shortcuts </a></li>...<div
class=clear></div> <a
href="http://beerpla.net/2008/04/26/how-to-list-files-within-tgz-targz-archives/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></ul>]]></description> <content:encoded><![CDATA[<p>This may not be very obvious but this is the command line to list files within a tar.gz archive on the fly:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre>tar -tzf file.tar.gz</pre></td></tr></table></div><p>-t: lists files<br
/>-f: instructs tar to deal with the following filename (file.tar.gz)<br
/>-z: informs tar that the it&#039;s dealing with a gzip file (-j if it&#039;s bzip2)</p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+List+Files+Within+tgz+%28tar.gz%29+Archives&amp;link=http://beerpla.net/2008/04/26/how-to-list-files-within-tgz-targz-archives/&amp;notes=This%20may%20not%20be%20very%20obvious%20but%20this%20is%20the%20command%20line%20to%20list%20files%20within%20a%20tar.gz%20archive%20on%20the%20fly%3Atar%20-tzf%20file.tar.gz%0A-t%3A%20lists%20files-f%3A%20instructs%20tar%20to%20deal%20with%20the%20following%20filename%20%28file.tar.gz%29-z%3A%20informs%20tar%20that%20the%20it%27s%20dealing%20with%20a%20gzip%20file%20%28-j%20if%20it%27s%20bzip2%29&amp;short_link=http://bit.ly/aSubhm&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+List+Files+Within+tgz+%28tar.gz%29+Archives&amp;link=http://beerpla.net/2008/04/26/how-to-list-files-within-tgz-targz-archives/&amp;notes=This%20may%20not%20be%20very%20obvious%20but%20this%20is%20the%20command%20line%20to%20list%20files%20within%20a%20tar.gz%20archive%20on%20the%20fly%3Atar%20-tzf%20file.tar.gz%0A-t%3A%20lists%20files-f%3A%20instructs%20tar%20to%20deal%20with%20the%20following%20filename%20%28file.tar.gz%29-z%3A%20informs%20tar%20that%20the%20it%27s%20dealing%20with%20a%20gzip%20file%20%28-j%20if%20it%27s%20bzip2%29&amp;short_link=http://bit.ly/aSubhm&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+List+Files+Within+tgz+%28tar.gz%29+Archives&amp;link=http://beerpla.net/2008/04/26/how-to-list-files-within-tgz-targz-archives/&amp;notes=This%20may%20not%20be%20very%20obvious%20but%20this%20is%20the%20command%20line%20to%20list%20files%20within%20a%20tar.gz%20archive%20on%20the%20fly%3Atar%20-tzf%20file.tar.gz%0A-t%3A%20lists%20files-f%3A%20instructs%20tar%20to%20deal%20with%20the%20following%20filename%20%28file.tar.gz%29-z%3A%20informs%20tar%20that%20the%20it%27s%20dealing%20with%20a%20gzip%20file%20%28-j%20if%20it%27s%20bzip2%29&amp;short_link=http://bit.ly/aSubhm&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+List+Files+Within+tgz+%28tar.gz%29+Archives&amp;link=http://beerpla.net/2008/04/26/how-to-list-files-within-tgz-targz-archives/&amp;notes=This%20may%20not%20be%20very%20obvious%20but%20this%20is%20the%20command%20line%20to%20list%20files%20within%20a%20tar.gz%20archive%20on%20the%20fly%3Atar%20-tzf%20file.tar.gz%0A-t%3A%20lists%20files-f%3A%20instructs%20tar%20to%20deal%20with%20the%20following%20filename%20%28file.tar.gz%29-z%3A%20informs%20tar%20that%20the%20it%27s%20dealing%20with%20a%20gzip%20file%20%28-j%20if%20it%27s%20bzip2%29&amp;short_link=http://bit.ly/aSubhm&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+List+Files+Within+tgz+%28tar.gz%29+Archives&amp;link=http://beerpla.net/2008/04/26/how-to-list-files-within-tgz-targz-archives/&amp;notes=This%20may%20not%20be%20very%20obvious%20but%20this%20is%20the%20command%20line%20to%20list%20files%20within%20a%20tar.gz%20archive%20on%20the%20fly%3Atar%20-tzf%20file.tar.gz%0A-t%3A%20lists%20files-f%3A%20instructs%20tar%20to%20deal%20with%20the%20following%20filename%20%28file.tar.gz%29-z%3A%20informs%20tar%20that%20the%20it%27s%20dealing%20with%20a%20gzip%20file%20%28-j%20if%20it%27s%20bzip2%29&amp;short_link=http://bit.ly/aSubhm&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+List+Files+Within+tgz+%28tar.gz%29+Archives&amp;link=http://beerpla.net/2008/04/26/how-to-list-files-within-tgz-targz-archives/&amp;notes=This%20may%20not%20be%20very%20obvious%20but%20this%20is%20the%20command%20line%20to%20list%20files%20within%20a%20tar.gz%20archive%20on%20the%20fly%3Atar%20-tzf%20file.tar.gz%0A-t%3A%20lists%20files-f%3A%20instructs%20tar%20to%20deal%20with%20the%20following%20filename%20%28file.tar.gz%29-z%3A%20informs%20tar%20that%20the%20it%27s%20dealing%20with%20a%20gzip%20file%20%28-j%20if%20it%27s%20bzip2%29&amp;short_link=http://bit.ly/aSubhm&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+List+Files+Within+tgz+%28tar.gz%29+Archives&amp;link=http://beerpla.net/2008/04/26/how-to-list-files-within-tgz-targz-archives/&amp;notes=This%20may%20not%20be%20very%20obvious%20but%20this%20is%20the%20command%20line%20to%20list%20files%20within%20a%20tar.gz%20archive%20on%20the%20fly%3Atar%20-tzf%20file.tar.gz%0A-t%3A%20lists%20files-f%3A%20instructs%20tar%20to%20deal%20with%20the%20following%20filename%20%28file.tar.gz%29-z%3A%20informs%20tar%20that%20the%20it%27s%20dealing%20with%20a%20gzip%20file%20%28-j%20if%20it%27s%20bzip2%29&amp;short_link=http://bit.ly/aSubhm&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=How%20To%20List%20Files%20Within%20tgz%20%28tar.gz%29%20Archives&amp;link=http://beerpla.net/2008/04/26/how-to-list-files-within-tgz-targz-archives/&amp;notes=This%20may%20not%20be%20very%20obvious%20but%20this%20is%20the%20command%20line%20to%20list%20files%20within%20a%20tar.gz%20archive%20on%20the%20fly%3Atar%20-tzf%20file.tar.gz%0A-t%3A%20lists%20files-f%3A%20instructs%20tar%20to%20deal%20with%20the%20following%20filename%20%28file.tar.gz%29-z%3A%20informs%20tar%20that%20the%20it%27s%20dealing%20with%20a%20gzip%20file%20%28-j%20if%20it%27s%20bzip2%29&amp;short_link=http://bit.ly/aSubhm&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2008/03/21/quick-snippet-finding-if-a-file-has-a-media-extension-using-regex/" rel="bookmark" title="March 21, 2008">Quick Perl Snippet: Finding If A File Has A Media Extension Using Regex</a></li><li><a
href="http://beerpla.net/2008/04/09/some-useful-vim-commands-my-vim-cheatsheet/" rel="bookmark" title="April 9, 2008">Some Useful vim Commands &#8211; My vim Cheatsheet</a></li><li><a
href="http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/" rel="bookmark" title="December 22, 2008">Mastering The Linux Shell &#8211; Bash Shortcuts Explained (Now With Cheat Sheets)</a></li><li><a
href="http://beerpla.net/2008/01/05/what-a-woman-says-what-she-really-means-what-a-man-says-what-he-really-means/" rel="bookmark" title="January 5, 2008">What A Woman Says, What She Really Means&#8230;   What A Man Says, What He Really Means…</a></li><li><a
href="http://beerpla.net/2007/08/04/watch-a-useful-linux-command-you-may-have-never-heard-of/" rel="bookmark" title="August 4, 2007">Watch &#8211; A Useful Linux Command You May Have Never Heard Of</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2008%2F04%2F26%2Fhow-to-list-files-within-tgz-targz-archives%2F&amp;title=How%20To%20List%20Files%20Within%20tgz%20%28tar.gz%29%20Archives" id="wpa2a_38"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2008/04/26/how-to-list-files-within-tgz-targz-archives/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>Do NOT Use This Perl Module: Passwd::Unix</title><link>http://beerpla.net/2008/04/22/do-not-use-this-perl-module-passwdunix/</link> <comments>http://beerpla.net/2008/04/22/do-not-use-this-perl-module-passwdunix/#comments</comments> <pubDate>Wed, 23 Apr 2008 03:05:29 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[module]]></category> <category><![CDATA[passwd]]></category> <category><![CDATA[Perl]]></category> <category><![CDATA[shadow]]></category> <category><![CDATA[unix]]></category> <guid
isPermaLink="false">http://beerpla.net/2008/04/22/do-not-use-this-perl-module-passwdunix/</guid> <description><![CDATA[<p><strong>Update:</strong> The author of the module contacted me the same day and promised to fix it in the next version. Version 0.40 was indeed on cpan as promised, but I haven&#039;t tested it yet.</p><p><a
href="http://search.cpan.org/~strzelec/Passwd-Unix-0.33/Unix.pm">Passwd::Unix</a> will corrupt your /etc/shadow file and rearrange login names and their corresponding password hashes.</p><p>The current version of Passwd::Unix corrupted my /etc/shadow upon only<br
/> calling the passwd() function. Immediately users started to report not<br
/> being able to login.</p><p>After examining the situation, I found that Passwd::Unix rearranges all<br
/> users in /etc/shadow in some way, but it only does it to the<br
/> usernames, and not the password hashes. Thus, you will get corrupted accounts. Moreover,<br
/> users are now able to login to one OTHER account, not ...<div
class=clear></div> <a
href="http://beerpla.net/2008/04/22/do-not-use-this-perl-module-passwdunix/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description> <content:encoded><![CDATA[<p><strong>Update:</strong> The author of the module contacted me the same day and promised to fix it in the next version. Version 0.40 was indeed on cpan as promised, but I haven&#039;t tested it yet.</p><p><a
href="http://search.cpan.org/~strzelec/Passwd-Unix-0.33/Unix.pm">Passwd::Unix</a> will corrupt your /etc/shadow file and rearrange login names and their corresponding password hashes.</p><p>The current version of Passwd::Unix corrupted my /etc/shadow upon only<br
/> calling the passwd() function. Immediately users started to report not<br
/> being able to login.</p><p>After examining the situation, I found that Passwd::Unix rearranges all<br
/> users in /etc/shadow in some way, but it only does it to the<br
/> usernames, and not the password hashes. Thus, you will get corrupted accounts. Moreover,<br
/> users are now able to login to one OTHER account, not their own,<br
/> depending on how the usernames got shuffled.</p><p>Thankfully, I had a recent backup but I definitely don’t want anyone<br
/> else to suffer.</p><p>I’m using perl 5.10, SUSE 10.3. If it’s incompatible with SUSE, it needs<br
/> to say so and exit.</p><p>I&#039;ve filed the bug here: <a
title="http://rt.cpan.org/Public/Bug/Display.html?id=35323" href="http://rt.cpan.org/Public/Bug/Display.html?id=35323">http://rt.cpan.org/Public/Bug/Display.html?id=35323</a>.</p><p>You have been warned.</p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=Do+NOT+Use+This+Perl+Module%3A+Passwd%3A%3AUnix&amp;link=http://beerpla.net/2008/04/22/do-not-use-this-perl-module-passwdunix/&amp;notes=Update%3A%20The%20author%20of%20the%20module%20contacted%20me%20the%20same%20day%20and%20promised%20to%20fix%20it%20in%20the%20next%20version.%20Version%200.40%20was%20indeed%20on%20cpan%20as%20promised%2C%20but%20I%20haven%27t%20tested%20it%20yet.%0D%0A%0D%0APasswd%3A%3AUnix%20will%20corrupt%20your%20%2Fetc%2Fshadow%20file%20and%20rearrange%20login%20names%20and%20their%20corresponding%20password%20hashes.%0D%0A%0D%0ATh&amp;short_link=http://bit.ly/cNzTKm&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=Do+NOT+Use+This+Perl+Module%3A+Passwd%3A%3AUnix&amp;link=http://beerpla.net/2008/04/22/do-not-use-this-perl-module-passwdunix/&amp;notes=Update%3A%20The%20author%20of%20the%20module%20contacted%20me%20the%20same%20day%20and%20promised%20to%20fix%20it%20in%20the%20next%20version.%20Version%200.40%20was%20indeed%20on%20cpan%20as%20promised%2C%20but%20I%20haven%27t%20tested%20it%20yet.%0D%0A%0D%0APasswd%3A%3AUnix%20will%20corrupt%20your%20%2Fetc%2Fshadow%20file%20and%20rearrange%20login%20names%20and%20their%20corresponding%20password%20hashes.%0D%0A%0D%0ATh&amp;short_link=http://bit.ly/cNzTKm&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=Do+NOT+Use+This+Perl+Module%3A+Passwd%3A%3AUnix&amp;link=http://beerpla.net/2008/04/22/do-not-use-this-perl-module-passwdunix/&amp;notes=Update%3A%20The%20author%20of%20the%20module%20contacted%20me%20the%20same%20day%20and%20promised%20to%20fix%20it%20in%20the%20next%20version.%20Version%200.40%20was%20indeed%20on%20cpan%20as%20promised%2C%20but%20I%20haven%27t%20tested%20it%20yet.%0D%0A%0D%0APasswd%3A%3AUnix%20will%20corrupt%20your%20%2Fetc%2Fshadow%20file%20and%20rearrange%20login%20names%20and%20their%20corresponding%20password%20hashes.%0D%0A%0D%0ATh&amp;short_link=http://bit.ly/cNzTKm&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=Do+NOT+Use+This+Perl+Module%3A+Passwd%3A%3AUnix&amp;link=http://beerpla.net/2008/04/22/do-not-use-this-perl-module-passwdunix/&amp;notes=Update%3A%20The%20author%20of%20the%20module%20contacted%20me%20the%20same%20day%20and%20promised%20to%20fix%20it%20in%20the%20next%20version.%20Version%200.40%20was%20indeed%20on%20cpan%20as%20promised%2C%20but%20I%20haven%27t%20tested%20it%20yet.%0D%0A%0D%0APasswd%3A%3AUnix%20will%20corrupt%20your%20%2Fetc%2Fshadow%20file%20and%20rearrange%20login%20names%20and%20their%20corresponding%20password%20hashes.%0D%0A%0D%0ATh&amp;short_link=http://bit.ly/cNzTKm&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=Do+NOT+Use+This+Perl+Module%3A+Passwd%3A%3AUnix&amp;link=http://beerpla.net/2008/04/22/do-not-use-this-perl-module-passwdunix/&amp;notes=Update%3A%20The%20author%20of%20the%20module%20contacted%20me%20the%20same%20day%20and%20promised%20to%20fix%20it%20in%20the%20next%20version.%20Version%200.40%20was%20indeed%20on%20cpan%20as%20promised%2C%20but%20I%20haven%27t%20tested%20it%20yet.%0D%0A%0D%0APasswd%3A%3AUnix%20will%20corrupt%20your%20%2Fetc%2Fshadow%20file%20and%20rearrange%20login%20names%20and%20their%20corresponding%20password%20hashes.%0D%0A%0D%0ATh&amp;short_link=http://bit.ly/cNzTKm&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=Do+NOT+Use+This+Perl+Module%3A+Passwd%3A%3AUnix&amp;link=http://beerpla.net/2008/04/22/do-not-use-this-perl-module-passwdunix/&amp;notes=Update%3A%20The%20author%20of%20the%20module%20contacted%20me%20the%20same%20day%20and%20promised%20to%20fix%20it%20in%20the%20next%20version.%20Version%200.40%20was%20indeed%20on%20cpan%20as%20promised%2C%20but%20I%20haven%27t%20tested%20it%20yet.%0D%0A%0D%0APasswd%3A%3AUnix%20will%20corrupt%20your%20%2Fetc%2Fshadow%20file%20and%20rearrange%20login%20names%20and%20their%20corresponding%20password%20hashes.%0D%0A%0D%0ATh&amp;short_link=http://bit.ly/cNzTKm&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=Do+NOT+Use+This+Perl+Module%3A+Passwd%3A%3AUnix&amp;link=http://beerpla.net/2008/04/22/do-not-use-this-perl-module-passwdunix/&amp;notes=Update%3A%20The%20author%20of%20the%20module%20contacted%20me%20the%20same%20day%20and%20promised%20to%20fix%20it%20in%20the%20next%20version.%20Version%200.40%20was%20indeed%20on%20cpan%20as%20promised%2C%20but%20I%20haven%27t%20tested%20it%20yet.%0D%0A%0D%0APasswd%3A%3AUnix%20will%20corrupt%20your%20%2Fetc%2Fshadow%20file%20and%20rearrange%20login%20names%20and%20their%20corresponding%20password%20hashes.%0D%0A%0D%0ATh&amp;short_link=http://bit.ly/cNzTKm&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=Do%20NOT%20Use%20This%20Perl%20Module%3A%20Passwd%3A%3AUnix&amp;link=http://beerpla.net/2008/04/22/do-not-use-this-perl-module-passwdunix/&amp;notes=Update%3A%20The%20author%20of%20the%20module%20contacted%20me%20the%20same%20day%20and%20promised%20to%20fix%20it%20in%20the%20next%20version.%20Version%200.40%20was%20indeed%20on%20cpan%20as%20promised%2C%20but%20I%20haven%27t%20tested%20it%20yet.%0D%0A%0D%0APasswd%3A%3AUnix%20will%20corrupt%20your%20%2Fetc%2Fshadow%20file%20and%20rearrange%20login%20names%20and%20their%20corresponding%20password%20hashes.%0D%0A%0D%0ATh&amp;short_link=http://bit.ly/cNzTKm&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2010/02/03/how-not-to-implement-a-web-application-that-handles-external-authentication-using-betwittered-com-as-an-example/" rel="bookmark" title="February 3, 2010">How *Not* To Implement A Web Application That Handles External Authentication, Using BeTwittered.com As An Example</a></li><li><a
href="http://beerpla.net/2007/10/12/cpan-the-perl-module-manager/" rel="bookmark" title="October 12, 2007">cpan &#8211; The Perl Module Manager</a></li><li><a
href="http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/" rel="bookmark" title="May 12, 2008">A Better diff Or What To Do When GNU diff Runs Out Of Memory (&quot;diff: memory exhausted&quot;)</a></li><li><a
href="http://beerpla.net/2008/04/30/how-to-install-the-latest-soaplite-using-perl-cpan/" rel="bookmark" title="April 30, 2008">How To Install The Latest SOAP::Lite Using Perl CPAN</a></li><li><a
href="http://beerpla.net/2008/04/16/mysql-conference-liveblogging-mysql-performance-under-a-microscope-the-tobias-and-jay-show-wednesday-200pm/" rel="bookmark" title="April 16, 2008">MySQL Conference Liveblogging: MySQL Performance Under A Microscope: The Tobias And Jay Show (Wednesday 2:00PM)</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2008%2F04%2F22%2Fdo-not-use-this-perl-module-passwdunix%2F&amp;title=Do%20NOT%20Use%20This%20Perl%20Module%3A%20Passwd%3A%3AUnix" id="wpa2a_40"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2008/04/22/do-not-use-this-perl-module-passwdunix/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> </channel> </rss>
