<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rss [<!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">]>
<rss version="2.0" xml:base="http://www.kai-mai.com">
<channel>
 <title>Kai Mai&#039;s Blog - Take Back the Web - Nodes for linux</title>
 <link>http://www.kai-mai.com/tags/linux</link>
 <description>Nodes containing the tag linux</description>
 <language>en</language>
<item>
 <title>How to Check Disk Space and Directory Space in Linux</title>
 <link>http://www.kai-mai.com/node/168</link>
 <description>&lt;p&gt;
Surprisingly, I often run into the problem of running out of disk space in Linux.
&lt;/p&gt;
&lt;p&gt;
Here are some simple commands to check what consumes the most space:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt; &amp;quot;df -k&amp;quot; shows the percentage of disk consumption for each partition 
&lt;li&gt; &amp;quot;du --max-depth 1 -h /&amp;quot; shows how much space each directory under &amp;quot;/&amp;quot; consumes in megabytes 
&lt;li&gt; &amp;quot;du -sm * | sort -n&amp;quot; does the same thing as the previous command
&lt;/ul&gt;
&lt;p&gt;
&lt;a href=&quot;http://stackoverflow.com/questions/32230/tracking-down-where-disk-space-has-gone-on-linux&quot;&gt;stackoverflow&lt;/a&gt; has a good discussion as well.
&lt;/p&gt;
&lt;p class=&quot;awTags_TagLinks&quot;&gt;Tags: &lt;a href=&quot;tags/2&quot;&gt;linux&lt;/a&gt; &lt;a href=&quot;tags/259&quot;&gt;utility&lt;/a&gt; &lt;a href=&quot;tags/348&quot;&gt;disk&lt;/a&gt; &lt;/p&gt;</description>
 <category domain="http://www.technorati.com/tag">linux</category>
 <category domain="http://www.technorati.com/tag">utility</category>
 <category domain="http://www.technorati.com/tag">disk</category>
 <pubDate>Thu, 26 Mar 2009 10:21:50 -0700</pubDate>
</item>
<item>
 <title>Get Rid of Duplicated Entries/Processes in htop Display</title>
 <link>http://www.kai-mai.com/node/164</link>
 <description>&lt;p&gt;
&lt;a href=&quot;http://htop.sourceforge.net/&quot;&gt;htop&lt;/a&gt; is a &amp;quot;top&amp;quot; on steroid Linux utility for interactively viewing processes.
&lt;/p&gt;
&lt;p&gt;
What puzzled me was that some of the process counts seem to be doubled.
&lt;/p&gt;
&lt;p&gt;
I know for a fact that I run two &lt;a href=&quot;http://code.macournoyer.com/thin/&quot;&gt;Thin&lt;/a&gt; servers(BTW, Thin seems to use less memory than Mongrel). But htop shows 4 processes
&lt;/p&gt;
&lt;pre&gt;

3895 root      20   0  187M 95484  3732 S  0.0  9.1  0:55.42 thin server (/tmp/site.1.sock)                                                                               
3899 root      20   0  187M 95484  3732 S  0.0  9.1  0:03.26 thin server (/tmp/site.1.sock)

&lt;/pre&gt;
&lt;p class=&quot;awTags_TagLinks&quot;&gt;Tags: &lt;a href=&quot;tags/2&quot;&gt;linux&lt;/a&gt; &lt;a href=&quot;tags/259&quot;&gt;utility&lt;/a&gt; &lt;a href=&quot;tags/336&quot;&gt;htop&lt;/a&gt; &lt;/p&gt;</description>
 <category domain="http://www.technorati.com/tag">linux</category>
 <category domain="http://www.technorati.com/tag">utility</category>
 <category domain="http://www.technorati.com/tag">htop</category>
 <pubDate>Wed, 18 Feb 2009 23:28:50 -0800</pubDate>
</item>
<item>
 <title>Chinese American Food != Food in China but == Linux</title>
 <link>http://www.kai-mai.com/node/157</link>
 <description>&lt;p&gt;Reporter Jennifer 8. Lee &lt;a href=&quot;http://www.ted.com/index.php/talks/jennifer_8_lee_looks_for_general_tso.html&quot;&gt;talks about Chinese American food&lt;/a&gt; which is not really the kind of food you can get in China.  She digs deep to find history of common Chinese American dishes like General Tso&#039;s chicken, and &lt;a href=&quot;http://en.wikipedia.org/wiki/Fortune_cookie&quot;&gt;fortune cookies&lt;/a&gt;.  She also discusses how 110 people won lottery with the same set of numbers.  The most entertaining part is that she compares Chinese American food with &lt;a href=&quot;http://en.wikipedia.org/wiki/Linux&quot;&gt;Linux&lt;/a&gt;(yes. the open source operating system!)
&lt;p class=&quot;awTags_TagLinks&quot;&gt;Tags: &lt;a href=&quot;tags/2&quot;&gt;linux&lt;/a&gt; &lt;a href=&quot;tags/314&quot;&gt;chinese_american_food&lt;/a&gt; &lt;a href=&quot;tags/315&quot;&gt;fortune&lt;/a&gt; &lt;a href=&quot;tags/316&quot;&gt;cookies&lt;/a&gt; &lt;/p&gt;</description>
 <category domain="http://www.technorati.com/tag">linux</category>
 <category domain="http://www.technorati.com/tag">chinese_american_food</category>
 <category domain="http://www.technorati.com/tag">fortune</category>
 <category domain="http://www.technorati.com/tag">cookies</category>
 <pubDate>Sun, 04 Jan 2009 22:39:17 -0800</pubDate>
</item>
<item>
 <title>Linux/Unix Console Tricks:  Multiple Screens within One Console,  Tailling Multiple Files with multitail</title>
 <link>http://www.kai-mai.com/node/144</link>
 <description>&lt;p&gt;
I find the following Linux/Unix console tricks really handy:
&lt;/p&gt;
&lt;h3&gt;
 Multiple screens within one console
&lt;/h3&gt;
&lt;p&gt;
You need to SSH into a Linux server and work with multiple screens(eg: tailing a log, vi a source file, etc).  Instead of opening multiple SSH sessions(multiple putty in Windows, or terminal windows in Mac), you can open multiple screens within one console window by using &amp;quot;screen&amp;quot; command.
&lt;/p&gt;
&lt;pre&gt;

yum install screen
screen
&lt;/pre&gt;
&lt;p&gt;
Here are the shortcuts:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt; ctrl+a + ctrl+c to add a new screens
&lt;li&gt; ctrl+a + ctrl+a to switch between screens
&lt;li&gt; ctrl+a + &amp;quot; to see a list of screens
&lt;li&gt; ctrl+a + (a number) to switch to the &amp;quot;numbered&amp;quot; screen
&lt;/ul&gt;
&lt;p class=&quot;awTags_TagLinks&quot;&gt;Tags: &lt;a href=&quot;tags/2&quot;&gt;linux&lt;/a&gt; &lt;a href=&quot;tags/258&quot;&gt;console&lt;/a&gt; &lt;a href=&quot;tags/259&quot;&gt;utility&lt;/a&gt; &lt;a href=&quot;tags/260&quot;&gt;screen&lt;/a&gt; &lt;a href=&quot;tags/261&quot;&gt;trick&lt;/a&gt; &lt;a href=&quot;tags/262&quot;&gt;logging&lt;/a&gt; &lt;a href=&quot;tags/263&quot;&gt;shell&lt;/a&gt; &lt;a href=&quot;tags/264&quot;&gt;command&lt;/a&gt; &lt;/p&gt;</description>
 <category domain="http://www.technorati.com/tag">linux</category>
 <category domain="http://www.technorati.com/tag">console</category>
 <category domain="http://www.technorati.com/tag">utility</category>
 <category domain="http://www.technorati.com/tag">screen</category>
 <category domain="http://www.technorati.com/tag">trick</category>
 <category domain="http://www.technorati.com/tag">logging</category>
 <category domain="http://www.technorati.com/tag">shell</category>
 <category domain="http://www.technorati.com/tag">command</category>
 <pubDate>Tue, 23 Sep 2008 23:46:50 -0700</pubDate>
</item>
<item>
 <title>Ubuntu 8 on VirtualBox Hosted on Windows</title>
 <link>http://www.kai-mai.com/node/139</link>
 <description>&lt;p&gt;
I recently got a Macbook Pro.  But I can no longer use VMWare on Mac to run Linux because VMWare charges for its Fusion player on Mac.
Fortunately, I can use &lt;a href=&quot;http://www.virtualbox.org/&quot;&gt;VirtualBox&lt;/a&gt; which is free for all platforms.
&lt;/p&gt;
&lt;p&gt;
Here are the steps to get Ubuntu 8(Guest) up and running in VirtualBox on Windows(Host):
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt; &lt;a href=&quot;http://linuxtracker.org/index.php?page=torrents&amp;search=&amp;category=30&amp;active=1&amp;tracker=0&quot;&gt;Download&lt;/a&gt; the ISO version of Ubuntu 8
&lt;li&gt; Open VirtualBox.  Create a new image.  I gave it a 16GB virtual disk.
&lt;li&gt; Attach the Ubuntu ISO image as cd-rom
&lt;li&gt; make sure the boot sequence starts with cd-rom
&lt;/ol&gt;
&lt;p class=&quot;awTags_TagLinks&quot;&gt;Tags: &lt;a href=&quot;tags/2&quot;&gt;linux&lt;/a&gt; &lt;a href=&quot;tags/41&quot;&gt;windows&lt;/a&gt; &lt;a href=&quot;tags/160&quot;&gt;ubuntu&lt;/a&gt; &lt;a href=&quot;tags/243&quot;&gt;vmware&lt;/a&gt; &lt;a href=&quot;tags/244&quot;&gt;virtualbox&lt;/a&gt; &lt;/p&gt;</description>
 <category domain="http://www.technorati.com/tag">linux</category>
 <category domain="http://www.technorati.com/tag">windows</category>
 <category domain="http://www.technorati.com/tag">ubuntu</category>
 <category domain="http://www.technorati.com/tag">vmware</category>
 <category domain="http://www.technorati.com/tag">virtualbox</category>
 <pubDate>Thu, 24 Jul 2008 23:57:49 -0700</pubDate>
</item>
<item>
 <title>LinuxWorld 2005 - Keynotes</title>
 <link>http://www.kai-mai.com/node/2</link>
 <description>&lt;p&gt;In the spirit of &quot;Better later than never&quot;, I would blog my San Francisco LinuxWorld trip.  It&#039;s my first-eve LinuxWorld trip.&lt;/p&gt;
&lt;p&gt;Day 1:&lt;/p&gt;
&lt;p&gt;I attended the keynote by &lt;a href=&quot;http://www.linuxworldexpo.com/live/12/events/12SFO05A/keynotes&quot;&gt;Charles Phillips&lt;/a&gt; from Oracle.&lt;br /&gt;
Oracle chose Linux as its part of certified stack because Linux is open, and Oracle does not have its own OS.  If Orcale apps have problems with Microsoft OS, it will have to get the support from MS.  But with Linux, everything is open.  Oracle can troubleshoot problems themselves and determine whehter it&#039;s a OS problem and application problem.  If Oracle finds any bug, it&#039;ll fix it and contribute fixes back to Linux.&lt;/p&gt;
&lt;p class=&quot;awTags_TagLinks&quot;&gt;Tags: &lt;a href=&quot;tags/2&quot;&gt;linux&lt;/a&gt; &lt;a href=&quot;tags/3&quot;&gt;linuxworld&lt;/a&gt; &lt;a href=&quot;tags/10&quot;&gt;patent&lt;/a&gt; &lt;/p&gt;</description>
 <category domain="http://www.technorati.com/tag">linux</category>
 <category domain="http://www.technorati.com/tag">linuxworld</category>
 <category domain="http://www.technorati.com/tag">patent</category>
 <pubDate>Mon, 29 Aug 2005 19:36:58 -0700</pubDate>
</item>
</channel>
</rss>

