<?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>NiceCabbage Blog</title>
	<atom:link href="http://www.nicecabbage.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nicecabbage.com</link>
	<description>Life, Design, Web Application</description>
	<lastBuildDate>Mon, 07 Jun 2010 02:03:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>order directories by size</title>
		<link>http://www.nicecabbage.com/2010/06/order-directories-by-size/</link>
		<comments>http://www.nicecabbage.com/2010/06/order-directories-by-size/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 02:03:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.nicecabbage.com/?p=212</guid>
		<description><![CDATA[Problem
You want to see which directory is the biggest in size.
Solution

% du / &#124; sort -nr

]]></description>
			<content:encoded><![CDATA[<h2>Problem</h2>
<p>You want to see which directory is the biggest in size.</p>
<h2>Solution</h2>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">du</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span> <span style="color: #660033;">-nr</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.nicecabbage.com/2010/06/order-directories-by-size/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Run mulitple &#8216;exec&#8217; commands to UNIX &#8216;find&#8217; command</title>
		<link>http://www.nicecabbage.com/2010/03/run-mulitple-exec-commands-for-find/</link>
		<comments>http://www.nicecabbage.com/2010/03/run-mulitple-exec-commands-for-find/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 03:21:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[TechTips]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.nicecabbage.com/?p=209</guid>
		<description><![CDATA[Problem
You want to apply multiple commands against the results of &#8216;find&#8217;
Solution
Just pass as many exec options as you want  .
The command below will run &#8216;id&#8217;, &#8216;echo&#8217; and &#8216;file&#8217;

% find . -type f -exec id &#123;&#125; \; -exec echo ' and ' \; -exec file &#123;&#125; \;

]]></description>
			<content:encoded><![CDATA[<h2>Problem</h2>
<p>You want to apply multiple commands against the results of &#8216;find&#8217;</p>
<h2>Solution</h2>
<p>Just pass as many exec options as you want <img src='http://www.nicecabbage.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>The command below will run &#8216;id&#8217;, &#8216;echo&#8217; and &#8216;file&#8217;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-type</span> f <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">id</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \; <span style="color: #660033;">-exec</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">' and '</span> \; <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.nicecabbage.com/2010/03/run-mulitple-exec-commands-for-find/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>F8-F12 non working on Snow Leopard</title>
		<link>http://www.nicecabbage.com/2010/03/f8-f12-non-working-on-snow-leopard/</link>
		<comments>http://www.nicecabbage.com/2010/03/f8-f12-non-working-on-snow-leopard/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 01:21:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[TechTips]]></category>
		<category><![CDATA[MacOSX]]></category>

		<guid isPermaLink="false">http://www.nicecabbage.com/?p=207</guid>
		<description><![CDATA[Problem
Your SnowLeopard sometimes doesn&#8217;t respond to F8-F12. You cannot launch Spaces, Expose, and Dashboard via those keyboards.
Solution
I haven&#8217;t gone into this problem deeply yet, but the quick solution for this symptom is to type

% killall Dock

on your Terminal.app.
]]></description>
			<content:encoded><![CDATA[<h2>Problem</h2>
<p>Your SnowLeopard sometimes doesn&#8217;t respond to F8-F12. You cannot launch Spaces, Expose, and Dashboard via those keyboards.</p>
<h2>Solution</h2>
<p>I haven&#8217;t gone into this problem deeply yet, but the quick solution for this symptom is to type</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">killall</span> Dock</pre></div></div>

<p>on your Terminal.app.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nicecabbage.com/2010/03/f8-f12-non-working-on-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>installing phpmyadmin (or other linux-world softwares) to Ubuntu 9.10 server</title>
		<link>http://www.nicecabbage.com/2010/02/installing-phpmyadmin-or-other-linux-world-softwares-to-ubuntu-9-10-server/</link>
		<comments>http://www.nicecabbage.com/2010/02/installing-phpmyadmin-or-other-linux-world-softwares-to-ubuntu-9-10-server/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 12:57:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[TechTips]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.nicecabbage.com/?p=204</guid>
		<description><![CDATA[Problem
You want to install open-source softwares like phpmyadmin to your ubuntu 9.10, but you got errors.

E: Couldn't find package phpmyadmin.

Solution
Add universe components to your sources.list

deb http://archive.ubuntu.com/ubuntu karmic main universe multiverse restricted
deb-src http://archive.ubuntu.com/ubuntu karmic main universe multiverse restricted
&#160;
deb http://archive.ubuntu.com/ubuntu karmic-updates main universe multiverse restricted
deb-src http://archive.ubuntu.com/ubuntu karmic-updates main universe multiverse restricted
&#160;
deb http://archive.ubuntu.com/ubuntu karmic-security main universe multiverse restricted
deb-src [...]]]></description>
			<content:encoded><![CDATA[<h2>Problem</h2>
<p>You want to install open-source softwares like phpmyadmin to your ubuntu 9.10, but you got errors.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">E: Couldn<span style="color: #ff0000;">'t find package phpmyadmin.</span></pre></div></div>

<h2>Solution</h2>
<p>Add universe components to your sources.list</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">deb http://archive.ubuntu.com/ubuntu karmic main universe multiverse restricted
deb-src http://archive.ubuntu.com/ubuntu karmic main universe multiverse restricted
&nbsp;
deb http://archive.ubuntu.com/ubuntu karmic-updates main universe multiverse restricted
deb-src http://archive.ubuntu.com/ubuntu karmic-updates main universe multiverse restricted
&nbsp;
deb http://archive.ubuntu.com/ubuntu karmic-security main universe multiverse restricted
deb-src http://archive.ubuntu.com/ubuntu karmic-security main universe multiverse restricted</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.nicecabbage.com/2010/02/installing-phpmyadmin-or-other-linux-world-softwares-to-ubuntu-9-10-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Check your SIMBL version</title>
		<link>http://www.nicecabbage.com/2010/01/check-your-simbl-version/</link>
		<comments>http://www.nicecabbage.com/2010/01/check-your-simbl-version/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 02:02:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[TechTips]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[SIMBL]]></category>

		<guid isPermaLink="false">http://www.nicecabbage.com/?p=200</guid>
		<description><![CDATA[Problem
You want to know which version of SIMBL is installed on your machine.
Solution
On Leopard,

% head /Library/InputManagers/SIMBL/SIMBL.bundle/Contents/Info.plist
&#60;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&#62;
&#60;!DOCTYPE plist PUBLIC &#34;-//Apple//DTD PLIST 1.0//EN&#34; &#34;http://www.apple.com/DTDs/PropertyList-1.0.dtd&#34;&#62;
&#60;plist version=&#34;1.0&#34;&#62;
&#60;dict&#62;
        &#60;key&#62;CFBundleGetInfoString&#60;/key&#62;
        &#60;string&#62;0.8.2, © 2007 Mike Solomon&#60;/string&#62;

On Snow Leopard,

% head /Library/Receipts/SIMBL.pkg/Contents/Info.plist

]]></description>
			<content:encoded><![CDATA[<h2>Problem</h2>
<p>You want to know which version of SIMBL is installed on your machine.</p>
<h2>Solution</h2>
<p>On Leopard,</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">head</span> <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>InputManagers<span style="color: #000000; font-weight: bold;">/</span>SIMBL<span style="color: #000000; font-weight: bold;">/</span>SIMBL.bundle<span style="color: #000000; font-weight: bold;">/</span>Contents<span style="color: #000000; font-weight: bold;">/</span>Info.plist
<span style="color: #000000; font-weight: bold;">&lt;</span>?xml <span style="color: #007800;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #007800;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span>?<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;!</span>DOCTYPE plist PUBLIC <span style="color: #ff0000;">&quot;-//Apple//DTD PLIST 1.0//EN&quot;</span> <span style="color: #ff0000;">&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>plist <span style="color: #007800;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>dict<span style="color: #000000; font-weight: bold;">&gt;</span>
        <span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>CFBundleGetInfoString<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
        <span style="color: #000000; font-weight: bold;">&lt;</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>0.8.2, © <span style="color: #000000;">2007</span> Mike Solomon<span style="color: #000000; font-weight: bold;">&lt;/</span>string<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>On Snow Leopard,</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">head</span> <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Receipts<span style="color: #000000; font-weight: bold;">/</span>SIMBL.pkg<span style="color: #000000; font-weight: bold;">/</span>Contents<span style="color: #000000; font-weight: bold;">/</span>Info.plist</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.nicecabbage.com/2010/01/check-your-simbl-version/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Generate a valid feed(RSS/Atom) on Wordpress</title>
		<link>http://www.nicecabbage.com/2009/12/generate-a-valid-feedrssatom-on-wordpress/</link>
		<comments>http://www.nicecabbage.com/2009/12/generate-a-valid-feedrssatom-on-wordpress/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 04:23:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[TechTips]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.nicecabbage.com/?p=195</guid>
		<description><![CDATA[Problem:
In some cases, your wordpress do not generate a valid rss; Weirdly, your rss includes an empty line at the top of the feed. In such a case, when viewed on Firefox3.5 or validated with Feed Validator, your rss would fail.
Solution:
What we have to do is just to remove an empty line, but to find [...]]]></description>
			<content:encoded><![CDATA[<h2>Problem:</h2>
<p>In some cases, your wordpress do not generate a valid rss; Weirdly, your rss includes an empty line at the top of the feed. In such a case, when viewed on Firefox3.5 or validated with <a href="http://beta.feedvalidator.org/">Feed Validator</a>, your rss would fail.</p>
<h2>Solution:</h2>
<p>What we have to do is just to remove an empty line, but to find the bug source is not easy. The output feed is generated through mulitple processes inside Wordpress, themes, and plugins.</p>
<p>The point is that</p>
<ol>
<li>Check your wp-config.php that there are no trailing empty lines before &lt;?php and after ?&gt;</li>
<li>Check functions.php in your theme, too.</li>
<li>Check other theme php files.</li>
<li>If you still cannot solve the problem, stop each plugin and re-generate RSS. Sometimes an empty line is included in plugin php files.</li>
</ol>
<p>Hope your luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nicecabbage.com/2009/12/generate-a-valid-feedrssatom-on-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mw: printing variables to Growl using Meow</title>
		<link>http://www.nicecabbage.com/2009/11/mw-printing-variables-to-growl-using-meow/</link>
		<comments>http://www.nicecabbage.com/2009/11/mw-printing-variables-to-growl-using-meow/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 02:57:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[rubygems]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.nicecabbage.com/?p=184</guid>
		<description><![CDATA[Today I uploaded a new Rubygem called &#8220;mw&#8221; (pronounced as [mi'u]).
mw is a tiny useful library to output the result of pp to Growl.The original idea of Growl printing comes from jugyo&#8217;s g. Though the concept is great, g does not work on my environment. I&#8217;ve got &#8220;connection errors&#8221; from Growl.
I suspect that &#8220;ruby-growl&#8221; library [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_185" class="wp-caption alignnone" style="width: 465px"><a href="http://www.nicecabbage.com/wp-content/uploads/2009/11/091129-0002.png"><img class="size-full wp-image-185   " title="mw-image" src="http://www.nicecabbage.com/wp-content/uploads/2009/11/091129-0002.png" alt="mw" width="455" height="135" /></a><p class="wp-caption-text">mw</p></div>
<p>Today I uploaded a new Rubygem called &#8220;mw&#8221; (pronounced as [<span>mi'u</span>]).</p>
<p>mw is a tiny useful library to output the result of pp to <a href="http://growl.info/">Growl</a>.The original idea of Growl printing comes from <a href="http://jugyo.org/">jugyo</a>&#8217;s <a href="http://www.slideshare.net/jugyo/g-is-very-useful">g</a>. Though the concept is great, g does not work on my environment. I&#8217;ve got &#8220;connection errors&#8221; from Growl.<br />
I suspect that &#8220;ruby-growl&#8221; library on my machine does not work well.</p>
<p>Anyway, to overcome this problem, I reinvented the same feature using Meow, a Growl notification wrapper for the rb-cocoa environment.</p>
<h2>INSTALL</h2>
<p>First, you need to be a Mac-user, and have installed rb-cocoa.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">port <span style="color: #c20cb9; font-weight: bold;">install</span> rb-cocoa</pre></div></div>

<p>Sinece I uploaded <a href="http://gemcutter.org/gems/mw">mw.gem</a> to <a href="http://gemcutter.org/">gemcutter.org</a>, installing mw is as easy as</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gem <span style="color: #c20cb9; font-weight: bold;">install</span> gemcutter
gem tumble
gem <span style="color: #c20cb9; font-weight: bold;">install</span> mw</pre></div></div>

<h2>USAGE</h2>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'mw'</span>
mw <span style="color:#996600;">&quot;message&quot;</span>
mw YourClass.<span style="color:#9900CC;">new</span></pre></div></div>

<p>To change priority, you can use mw1~5. (mw3 is normal, mw1 is the lowest, and mw5 is the highest. mw4 and mw5 will fire the sticky notes, so that the note will live on your screen persitently.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">begin</span>
do_dangerous_and_raise_some_exception
<span style="color:#9966CC; font-weight:bold;">rescue</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; e
mw4 e
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<h2>SOURCES</h2>
<p>all the sources can be seen at <a href="http://github.com/tomoya55/mw">http://github.com/tomoya55/mw</a>.</p>
<h2>NOTES</h2>
<p>1. If you are still not sure what mw is, please take a look at <a href="http://www.slideshare.net/jugyo/g-is-very-useful">jugyo&#8217;s presentation of g</a>.</p>
<p>2. My mw requires rb-cocoa and meow. If you runs ruby on Linux or Windows, you cannot use this library. use g instead.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nicecabbage.com/2009/11/mw-printing-variables-to-growl-using-meow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2 must-have SIMBL extensions for using Terminal on OSX Leopard</title>
		<link>http://www.nicecabbage.com/2009/11/2-must-have-simbl-extensions-for-using-terminal-on-osx-leopard/</link>
		<comments>http://www.nicecabbage.com/2009/11/2-must-have-simbl-extensions-for-using-terminal-on-osx-leopard/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 03:25:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[TechTips]]></category>
		<category><![CDATA[MacOSX]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://www.nicecabbage.com/?p=179</guid>
		<description><![CDATA[Yes, SnowLeopard is already out. But most of users including me still loves Leopard, right ?
In this small article, I would like to introduce 2 useful extensions for Terminal.app
1. Visor
With Visor, you can always show Terminal by typing one HotKey. Visor makes Terminal.app invisible when you don&#8217;t use, and makes it visible when you need. [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, SnowLeopard is already out. But most of users including me still loves Leopard, right ?</p>
<p>In this small article, I would like to introduce 2 useful extensions for Terminal.app</p>
<h2>1. Visor</h2>
<p>With Visor, you can always show Terminal by typing one HotKey. Visor makes Terminal.app invisible when you don&#8217;t use, and makes it visible when you need. This is a great application if you are one of CUI freaks!</p>
<p><img class="alignnone" src="http://docs.blacktree.com/lib/exe/fetch.php?w=&amp;h=&amp;cache=cache&amp;media=http%3A%2F%2Fdocs.blacktree.com%2Fdata%2Fmedia%2Fvisor%2Fvisorlarge.png" alt="" width="128" height="128" /></p>
<h2>2. TerminalColoreopard</h2>
<p><img class="alignnone size-full wp-image-180" title="091107-0001" src="http://www.nicecabbage.com/wp-content/uploads/2009/11/091107-0001.png" alt="091107-0001" width="368" height="352" /></p>
<p>With TerminalColoreopard, you can change your color settings of ANSI colors in Terminal easily via OSX&#8217;s default Color dialog. I strongly recommend to use <a href="http://www.adobe.com/products/kuler/">Adobe Kuler</a> or see the entry &#8220;<a title="Permanent Link to Terminal color schemes for .Xdefaults or .Xresources file" rel="bookmark" href="http://tuxtraining.com/2009/06/27/terminal-color-schemes-for-xdefaults-or-xresources-file">Terminal color schemes for .Xdefaults or .Xresources file</a>&#8221; to arrange nice color combinations.</p>
<div id="popInMenu0.3496792809597903" style="border: 0px none; margin: 0px; padding: 0px; background: transparent none repeat scroll 0% 0%; line-height: 1; position: absolute; float: none; top: 319px; left: 134px; z-index: 2147483647;"></div>
]]></content:encoded>
			<wfw:commentRss>http://www.nicecabbage.com/2009/11/2-must-have-simbl-extensions-for-using-terminal-on-osx-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Accidental Server Down &#8230; (and so sorry for that!)</title>
		<link>http://www.nicecabbage.com/2009/09/accidental-server-down-and-so-sorry-for-that/</link>
		<comments>http://www.nicecabbage.com/2009/09/accidental-server-down-and-so-sorry-for-that/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 14:07:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Failures]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.nicecabbage.com/?p=175</guid>
		<description><![CDATA[My webserver was down since 13th September. It was an accident, and I did not know that until today.
No apache2 processes alive. my web server has gone away by some reasons.
So I started a deep investigation on log files. 
When I checking through auth.log files with

cd /var/log;sudo find auth.log -type f -exec grep Success &#123;&#125; [...]]]></description>
			<content:encoded><![CDATA[<p>My webserver was down since 13th September. It was an accident, and I did not know that until today.<br />
No apache2 processes alive. my web server has gone away by some reasons.</p>
<p>So I started a deep investigation on log files. </p>
<p>When I checking through auth.log files with</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log;<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">find</span> auth.log <span style="color: #660033;">-type</span> f <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> Success <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null \;</pre></div></div>

<p>and  I found a lot of</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">auth.log.5.gz:Aug 29 10:46:03 Shaseki su[6944]: Successful su for nobody by root
auth.log.5.gz:Aug 29 10:46:03 Shaseki su[6949]: Successful su for nobody by root
auth.log.5.gz:Aug 29 10:46:03 Shaseki su[6951]: Successful su for nobody by root</pre></div></div>

<p>Was my server hacked by someone&#8230;? Some clever guy attacked my server and got my root password anyhow, so that he can take full control over my machine??</p>
<p>At the first time I saw these messages, I was so astonished and could not say a word.<br />
But in a few minutes I came to myself and googled that message, and I was relieved. </p>
<p>It was not by a unknown hacker. this is by cron. Open /etc/crontab and found that</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">11 *    * * *   root    cd / &amp;&amp; run-parts --report /etc/cron.hourly
46 10    * * *   root    test -x /usr/sbin/anacron || ( cd / &amp;&amp; run-parts --report /etc/cron.daily )
15 10    * * 7   root    test -x /usr/sbin/anacron || ( cd / &amp;&amp; run-parts --report /etc/cron.weekly 
)
50 10    1 * *   root    test -x /usr/sbin/anacron || ( cd / &amp;&amp; run-parts --report /etc/cron.monthly
 )</pre></div></div>

<p>As you can see, the time in log messages are almost same as that in crontab. </p>
<p>Hmmmm, So what the hell made my apache gone away?</p>
<p>When I tried to restart my apache like</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>apache2ctl <span style="color: #660033;">-k</span> start</pre></div></div>

<p>I got</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">98</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>Address already <span style="color: #000000; font-weight: bold;">in</span> use: make_sock: could not <span style="color: #7a0874; font-weight: bold;">bind</span> to address <span style="color: #7a0874; font-weight: bold;">&#91;</span>::<span style="color: #7a0874; font-weight: bold;">&#93;</span>:<span style="color: #000000;">80</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">98</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>Address already <span style="color: #000000; font-weight: bold;">in</span> use: make_sock: could not <span style="color: #7a0874; font-weight: bold;">bind</span> to address 0.0.0.0:<span style="color: #000000;">80</span>
no listening sockets available, shutting down
Unable to open logs</pre></div></div>

<p>,so I could not start up my apache.</p>
<p>Obviously, some process already hold port 80. but</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">lsof <span style="color: #660033;">-i</span> :<span style="color: #000000;">80</span></pre></div></div>

<p>returns nothing. I also tried</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">nestat <span style="color: #660033;">-an</span></pre></div></div>

<p>, but could not find any clues of por-80-riders.</p>
<p>At last, thoght this is what I did not like to, I <strong>rebooted</strong> the system.</p>
<p>In a few minutes, everything comes back well and, as you see, my apache2 starts running healthly again.</p>
<p>If you know something about such a phenomenon, please leave a comment below. Thank you in advance!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nicecabbage.com/2009/09/accidental-server-down-and-so-sorry-for-that/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Clear ques of Postfix</title>
		<link>http://www.nicecabbage.com/2009/08/clear-ques-of-postfix/</link>
		<comments>http://www.nicecabbage.com/2009/08/clear-ques-of-postfix/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 05:19:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[TechTips]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[postfix]]></category>

		<guid isPermaLink="false">http://www.nicecabbage.com/?p=172</guid>
		<description><![CDATA[Problem

You want to delete all the messages in sending ques of Postfix.

Solution

$ sudo postsuper -d ALL

]]></description>
			<content:encoded><![CDATA[<h2>Problem</h2>
<p>
You want to delete all the messages in sending ques of Postfix.
</p>
<h2>Solution</h2>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> postsuper <span style="color: #660033;">-d</span> ALL</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.nicecabbage.com/2009/08/clear-ques-of-postfix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
