<?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>nazham.com &#187; Linux</title>
	<atom:link href="http://nazham.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://nazham.com</link>
	<description>Jarvis, sometimes you gotta run before you can walk.</description>
	<lastBuildDate>Tue, 01 Jun 2010 06:07:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Playing 1080p Video in Ubuntu Without Lag</title>
		<link>http://nazham.com/2010/04/24/playing-1080p-video-in-ubuntu-without-lag/</link>
		<comments>http://nazham.com/2010/04/24/playing-1080p-video-in-ubuntu-without-lag/#comments</comments>
		<pubDate>Sat, 24 Apr 2010 13:34:12 +0000</pubDate>
		<dc:creator>nazham</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[1080p]]></category>
		<category><![CDATA[Blue Ray]]></category>
		<category><![CDATA[HD]]></category>
		<category><![CDATA[Karmic Koala]]></category>
		<category><![CDATA[mkv]]></category>
		<category><![CDATA[mplayer]]></category>
		<category><![CDATA[Ubuntu 9.10]]></category>
		<category><![CDATA[VLC]]></category>

		<guid isPermaLink="false">http://nazham.com/?p=1048</guid>
		<description><![CDATA[Playing 1080p Video in Ubuntu Without Lag

Related posts:<ol><li><a href='http://nazham.com/2009/12/02/how-to-check-for-open-ports-in-ubuntu/' rel='bookmark' title='Permanent Link: How to Check for Open Ports in Ubuntu'>How to Check for Open Ports in Ubuntu</a> <small>There are various ways to view for open ports on...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I have not-so-bad specs for my laptop:<br />
- Dell XPS M1530<br />
- Intel Code 2 Duo CPU 2.40GHz<br />
- 4GB RAM<br />
- Running Ubuntu Karmic Koala 9.10</p>
<p>I have no problem running 720p .mkv HD video files. No lagging, no dropped frames whatsover. However, when running 1080p .mkv files, especially those big sizes full-HD Blue Ray medias, I have:<br />
- Lagging,<br />
- Dropped frames,<br />
- 100% CPU utilizations.</p>
<p>It doesn&#8217;t matter if I&#8217;m using VLC, or Totem Movie Player, it will always have those problem above. From what I&#8217;ve read, this is probably due to FFMpeg codecs for H.264 decoding.</p>
<p>However, I have a solution, found from <a href="http://ubuntuforums.org/showthread.php?t=1037625">http://ubuntuforums.org/showthread.php?t=1037625</a></p>
<p>Below are the steps:<br />
1. Install mplayer:<br />
<code>sudo apt-get install mplayer-nogui</code></p>
<p>2. Run your 1080p .mkv files with it:<br />
<code>mplayer -vo vdpau -vc ffh264vdpau /path/to/the/mkv/file</code></p>
<p>Now the HD movies playing in my Ubuntu laptop are smooth as it can be.<br />
Try it out. Cheers.</p>
<iframe id="basic_facebook_social_plugins_likebutton" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnazham.com%2F2010%2F04%2F24%2Fplaying-1080p-video-in-ubuntu-without-lag%2F&amp;layout=standard&amp;show_faces=true&amp;width=&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:px; height:px"></iframe>

<br />Related posts:<ol><li><a href='http://nazham.com/2009/12/02/how-to-check-for-open-ports-in-ubuntu/' rel='bookmark' title='Permanent Link: How to Check for Open Ports in Ubuntu'>How to Check for Open Ports in Ubuntu</a> <small>There are various ways to view for open ports on...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://nazham.com/2010/04/24/playing-1080p-video-in-ubuntu-without-lag/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Check for Open Ports in Ubuntu</title>
		<link>http://nazham.com/2009/12/02/how-to-check-for-open-ports-in-ubuntu/</link>
		<comments>http://nazham.com/2009/12/02/how-to-check-for-open-ports-in-ubuntu/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 14:29:04 +0000</pubDate>
		<dc:creator>nazham</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://nazham.com/?p=1025</guid>
		<description><![CDATA[There are various ways to view for open ports on your local Ubuntu/Linux machine. However, I particularly prefer two methods/command below, since it is simple, and without any third-party application.


No related posts.]]></description>
			<content:encoded><![CDATA[<p>There are various ways to view for open ports on your local Ubuntu/Linux machine. However, I particularly prefer two methods/command below, since it is simple, and without any third-party application.</p>
<p>Open your command prompt, and type:<br />
<code>netstat -an | grep "LISTEN "</code></p>
<p>Or, another method:<br />
<code>sudo netstat --tcp --udp --listening --program</code></p>
<p>It will list all ports that your machine are listening to. The latter method will even shows the program name associated to it.</p>
<p>Enjoy.</p>
<iframe id="basic_facebook_social_plugins_likebutton" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnazham.com%2F2009%2F12%2F02%2Fhow-to-check-for-open-ports-in-ubuntu%2F&amp;layout=standard&amp;show_faces=true&amp;width=&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:px; height:px"></iframe>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://nazham.com/2009/12/02/how-to-check-for-open-ports-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Enhance Your Linux Desktop with Conky</title>
		<link>http://nazham.com/2009/07/26/how-to-enhance-your-linux-desktop-with-conky/</link>
		<comments>http://nazham.com/2009/07/26/how-to-enhance-your-linux-desktop-with-conky/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 15:35:29 +0000</pubDate>
		<dc:creator>nazham</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://nazham.com/?p=1000</guid>
		<description><![CDATA[I have been using Conky as my desktop monitoring widgets for quite some time now. Before this, I&#8217;ve been using few applications like screenlets and gdesklets, but there&#8217;s a lot of drawbacks on these applications. Among them were limited customizations, it&#8217;s difficult to develop your own widgets, unable to find widgets you&#8217;re looking for, and [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>I have been using <strong>Conky</strong> as my desktop monitoring widgets for quite some time now. Before this, I&#8217;ve been using few applications like screenlets and gdesklets, but there&#8217;s a lot of drawbacks on these applications. Among them were limited customizations, it&#8217;s difficult to develop your own widgets, unable to find widgets you&#8217;re looking for, and if you do find them, they are too buggy to be used in the first place.</p>
<p>Then, I&#8217;ve found <a href="http://conky.sourceforge.net/">Conky</a>. I&#8217;ll never turn back.</p>
<p>This is the best system monitor I have ever experienced. It is highly customizable, all you have to do is modify the Conky config file. There&#8217;s a lot of widgets/variables to use, such as system monitoring tools (CPU, RAM, SWAP, Hard Drive, etc), batteries capacity, networking, and more. And best of all, it is very, very easy to create your own widgets. If you know any programming language such as Python, Perl, or even a simple Shell Scripts, then you&#8217;re off to create your own.</p>
<p><span id="more-1000"></span><br />
Installing Conky are easy as executing command below in the terminal:<br />
<code>$ sudo apt-get install conky</code></p>
<p>Next, create your Conky config file. Here is <a href="http://nazham.com/download/conky.conf.txt" target="_blank">my config file</a> I&#8217;m currently using.</p>
<p>Then, execute command below to run Conky. Put it in your startup so that it will be running each time you boot-up your computer:<br />
<code>$ conky -c &lt;path_to_my_conky_config&gt;.conf</code></p>
<p>Below are what my desktop currently looks like with Conky:</p>
<div id="attachment_1007" class="wp-caption aligncenter" style="width: 310px"><a href="http://nazham.com/wp-content/uploads/2009/07/conky-desktop.png"><img class="size-medium wp-image-1007" title="Conky Desktop" src="http://nazham.com/wp-content/uploads/2009/07/conky-desktop-300x187.png" alt="Conky Desktop" width="300" height="187" /></a><p class="wp-caption-text">Conky Desktop</p></div>
<p>In there I&#8217;ve created my own GMail notifier, Google Reader notifier and local TV guide, all using Python. You will find more ideas, screen shots and scripts to use with Conky on <a href="http://ubuntuforums.org/showthread.php?t=281865" target="_blank">Ubuntu Forum</a>.</p>
<p>Cheers.</p>
<iframe id="basic_facebook_social_plugins_likebutton" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnazham.com%2F2009%2F07%2F26%2Fhow-to-enhance-your-linux-desktop-with-conky%2F&amp;layout=standard&amp;show_faces=true&amp;width=&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:px; height:px"></iframe>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://nazham.com/2009/07/26/how-to-enhance-your-linux-desktop-with-conky/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Extend Transmission Torrent with Scripts</title>
		<link>http://nazham.com/2009/04/19/extend-transmission-torrent-with-scripts/</link>
		<comments>http://nazham.com/2009/04/19/extend-transmission-torrent-with-scripts/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 13:10:03 +0000</pubDate>
		<dc:creator>nazham</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://nazham.com/?p=893</guid>
		<description><![CDATA[Transmission is one of my favourite bittorrent client. However, it&#8217;s lack the feature of running command(s) before or after you have finished downloading. Luckily we can improvise this with the help of transmission-remote, a command based client for transmission, and along with some Linux bash scripting.
Below I have created a simple bash script. What it [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.transmissionbt.com/">Transmission</a> is one of my favourite bittorrent client. However, it&#8217;s lack the feature of running command(s) before or after you have finished downloading. Luckily we can improvise this with the help of <strong>transmission-remote</strong>, a command based client for transmission, and along with some Linux bash scripting.</p>
<p>Below I have created a simple bash script. What it does is, converting all of the finished avi&#8217;s to wmv. The conversion is via <a href="http://www.ffmpeg.org/">ffmpeg</a>. The script below is easily modified to suit your needs, such as:<br />
i &#8211; Copying the finished torrent to another location.<br />
ii &#8211; Doing any conversion to your media.<br />
iii &#8211; Send you mail notifying the torrent have finished downloading.<br />
iv &#8211; etc, etc.</p>
<p>So, let&#8217;s get started.<br />
<span id="more-893"></span></p>
<p>1. Install transmission-remote<br />
<code>sudo apt-get install transmission-remote</code></p>
<p>2. Copy the script below, and save as my_script_name.sh , (or whatever name you prefer, but note the .sh extension).<br />
This is among my early attempts of shell script programming, so go easy on me and feel free to give feedbacks. <img src='http://nazham.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre>
#!/bin/sh

# The absolute path where your torrents are downloaded
# For example: /tmp/download
BASEDIR=/home/myuser/mytorrentpath
LOGPATH=/home/myuser/mywmv.log

# The absolute path to and including the transmission-remote binary
# For example: /usr/bin/transmission-remote
TRANSREMOTE=/usr/bin/transmission-remote
TRANSOPTS=" 127.0.0.1:my_port_number -n my_username:my_password "

DoConvert ()
{
  _AVINAME=$1
  WMVNAME=${_AVINAME%.*}".wmv"
  if [ ! -f "$WMVNAME" ]; then
    #Do conversion here
    echo "converting $_AVINAME" >> $LOGPATH
    ffmpeg -sameq -i "$_AVINAME" -vcodec wmv2 -acodec wmav2 "$WMVNAME" \
    < /dev/null 2> /dev/null
  fi
}

cd $BASEDIR

echo "Starting at `date`" >> $LOGPATH

# Find the first completed torrent
$TRANSREMOTE $TRANSOPTS -l | grep "100%" | grep "Done  " | cut -b71- | while read LINE
do
  if [ -e "$LINE" ]; then
    if [ -h "$LINE" ]; then
      echo "$LINE is already moved" >> $LOGPATH
    else
      if [ -d "$LINE" ]; then
        cd "${LINE}"
        ls -1f *.avi 2>/dev/null | while read AVINAME
	  do
	    DoConvert "$AVINAME"
	  done
        cd -
      else
	DoConvert "$LINE"
      fi
    fi
  else
    echo "torrent $LINE is removed" >> $LOGPATH
  fi
done

echo "-----------------" >> $LOGPATH
</pre>
<p>Save the script on any location you prefer.</p>
<p>3. Create a cron job to run the script. Open the entry to crontab:<br />
<code>crontab -e</code></p>
<p>4. Let say you want to run the script every hour, by the hour, the entry on your cron job should be as below:<br />
<code>0 * * * * sh /home/myuser/my_script_name.sh</code></p>
<p>You can also test the script you&#8217;ve created by executing the command:<br />
<code>sh /home/myuser/my_script_name.sh</code></p>
<p>Enjoy.</p>
<iframe id="basic_facebook_social_plugins_likebutton" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnazham.com%2F2009%2F04%2F19%2Fextend-transmission-torrent-with-scripts%2F&amp;layout=standard&amp;show_faces=true&amp;width=&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:px; height:px"></iframe>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://nazham.com/2009/04/19/extend-transmission-torrent-with-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Share Media Between Xbox 360 and Linux</title>
		<link>http://nazham.com/2009/03/09/how-to-share-media-between-xbox-360-and-linux/</link>
		<comments>http://nazham.com/2009/03/09/how-to-share-media-between-xbox-360-and-linux/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 20:02:48 +0000</pubDate>
		<dc:creator>nazham</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu 8.10]]></category>
		<category><![CDATA[Xbox 360]]></category>

		<guid isPermaLink="false">http://nazham.com/?p=849</guid>
		<description><![CDATA[I&#8217;ve got a little project going on in the past few days. I have a reasonable amount of media; movies, mp3&#8217;s and family pictures in my Linux desktop, Ubuntu 8.10. Would it be nice if I could stream all the movies and music directly from the Linux machine to my Xbox 360? This is a [...]

Related posts:<ol><li><a href='http://nazham.com/2009/12/02/how-to-check-for-open-ports-in-ubuntu/' rel='bookmark' title='Permanent Link: How to Check for Open Ports in Ubuntu'>How to Check for Open Ports in Ubuntu</a> <small>There are various ways to view for open ports on...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve got a little project going on in the past few days. I have a reasonable amount of media; movies, mp3&#8217;s and family pictures in my Linux desktop, Ubuntu 8.10. Would it be nice if I could stream all the movies and music directly from the Linux machine to my Xbox 360? This is a very easy feat in <strong>Windows</strong>, where we could simply use the <strong>Windows Media Share</strong> option in <strong>Windows Media Player 11</strong>. But, what about Linux?</p>
<p>Xbox-Linux box media sharing could be achieved by using GeeXbox <a href="http://ushare.geexbox.org/" target="_blank">uShare</a>. GeeXboX uShare is a free UPnP A/V &amp; DLNA Media Server for Linux. Installation and configuration explained after the jump below:</p>
<p><span id="more-849"></span><br />
<strong>Installation and Configuration</strong></p>
<p>1. Install uShare by using command:<br />
<code>sudo apt-get install ushare</code></p>
<p>2. Edit the uShare configuration file:<br />
<code>sudo gedit /etc/ushare.conf</code></p>
<p>Example of the uShare config file:</p>
<pre># /etc/ushare.conf
# uShare UPnP Friendly Name (default is 'uShare').
USHARE_NAME=uShare

# Interface to listen to (default is eth0).
# Ex : USHARE_IFACE=eth1
USHARE_IFACE=eth0

# Port to listen to
USHARE_PORT=49153

# Port to listen for Telnet connections
USHARE_TELNET_PORT=

# Directories to be shared (space or CSV list).
# Ex: USHARE_DIR=/dir1,/dir2
USHARE_DIR=/home/myusername/mymediafolder

# Use to override what happens when iconv fails to parse a file name.
USHARE_OVERRIDE_ICONV_ERR=yes

# Enable Web interface (yes/no)
ENABLE_WEB=yes

# Enable Telnet control interface (yes/no)
ENABLE_TELNET=no

# Use XboX 360 compatibility mode (yes/no)
ENABLE_XBOX=yes

# Use DLNA profile (yes/no)
# This is needed for PlayStation3 to work (among other devices)
ENABLE_DLNA=no</pre>
<p>&#8220;USHARE_NAME&#8221; is the display name of your share.<br />
&#8220;USHARE_IFACE&#8221; is the network interface uShare should listen to.<br />
&#8220;USHARE_PORT&#8221; this is the port the uShare server listens on. Make sure this is set to 49153.<br />
&#8220;USHARE_DIR&#8221; is the full path of the folder with your media.<br />
&#8220;ENABLE_WEB&#8221; to turns on the web interface. Make sure this is set to &#8216;yes&#8217;.<br />
&#8220;ENABLE_XBOX&#8221; is what enables Xbox 360 compatibility. Make sure it’s set to &#8216;yes&#8217;.</p>
<p>3. After finished editing the configuration file, save the file.</p>
<p>4. Edit the following file by issuing command below:<br />
<code>sudo gedit /etc/init.d/ushare</code></p>
<p>Find the following lines:</p>
<pre>start-stop-daemon --start --quiet --background --oknodo \
--make-pidfile --pidfile $PIDFILE \
--exec $DAEMON -- $USHARE_OPTIONS</pre>
<p>And change them to:</p>
<pre>start-stop-daemon --start --quiet --background --oknodo \
--make-pidfile --pidfile $PIDFILE \
--exec $DAEMON -- $USHARE_OPTIONS --xbox</pre>
<p>5. Restart uShare<br />
<code>sudo /etc/init.d/ushare stop</code><br />
<code>sudo /etc/init.d/ushare start</code></p>
<p>That&#8217;s pretty much it!</p>
<p>If you have a firewall running, open the firewall connection to your Xbox ip address.</p>
<p>The web interface is available at:<br />
http://your.servers.ip.address:49153/web/ushare.html</p>
<p><strong>Xbox 360 Settings</strong></p>
<p>For your Xbox 360 configuration, make sure they are able to connect to your home network. Just set the networking options in the &#8220;Settings&#8221; blade. You can set the networking options to be automatic, or manual by the simplest settings of the ip address, subnet mask and gateway.</p>
<p><strong>Viewing Your Media</strong></p>
<p>Go to the &#8220;Media&#8221; blade on your Xbox 360 Dashboard. Open your media (Music, Video or Picture). The uShare (or any other name you&#8217;ve given in the uShare config) should be available on the selection source.</p>
<p><a href="http://nazham.com/wp-content/uploads/2009/03/ushare1.jpg"><img class="size-medium wp-image-883 aligncenter" style="border: 0pt none;" title="uShare Xbox 360 Dashboard" src="http://nazham.com/wp-content/uploads/2009/03/ushare1-300x231.jpg" alt="uShare Xbox 360 Dashboard" width="300" height="231" /></a></p>
<p>Open your media in the uShare source. WMV files should not be any problem, but for AVI&#8217;s and any other types, the view-ability depends on the codecs installed on your Xbox.</p>
<p style="text-align: center;"><a href="http://nazham.com/wp-content/uploads/2009/03/ushare2.jpg"><img class="aligncenter size-medium wp-image-888" style="border: 0pt none;" title="uShare video" src="http://nazham.com/wp-content/uploads/2009/03/ushare2-300x194.jpg" alt="uShare video" width="300" height="194" /></a></p>
<p>Next project, wireless connectivity for the Xbox 360. <img src='http://nazham.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I currently have a 10 meter network cable running across the room from my Xbox to the router, which is ridiculous.</p>
<iframe id="basic_facebook_social_plugins_likebutton" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnazham.com%2F2009%2F03%2F09%2Fhow-to-share-media-between-xbox-360-and-linux%2F&amp;layout=standard&amp;show_faces=true&amp;width=&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:px; height:px"></iframe>

<br />Related posts:<ol><li><a href='http://nazham.com/2009/12/02/how-to-check-for-open-ports-in-ubuntu/' rel='bookmark' title='Permanent Link: How to Check for Open Ports in Ubuntu'>How to Check for Open Ports in Ubuntu</a> <small>There are various ways to view for open ports on...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://nazham.com/2009/03/09/how-to-share-media-between-xbox-360-and-linux/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>Indispensible Unix commands</title>
		<link>http://nazham.com/2009/02/06/indispensible-unix-commands/</link>
		<comments>http://nazham.com/2009/02/06/indispensible-unix-commands/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 12:09:36 +0000</pubDate>
		<dc:creator>rizal</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://nazham.com/?p=821</guid>
		<description><![CDATA[The first lab session of my Computer Science course consisted primarily of learning the following Unix commands: pwd, ls, cd, cp, mv, rm, mkdir, chmod, more, man. Although I&#8217;ve been using nothing but Windows throughout my career &#8211; from Windows 95 to 2000 to XP &#8211; these commands have proven to be indispensible for those [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>The first lab session of my Computer Science course consisted primarily of learning the following Unix commands: <code>pwd</code>, <code>ls</code>, <code>cd</code>, <code>cp</code>, <code>mv</code>, <code>rm</code>, <code>mkdir</code>, <code>chmod</code>, <code>more</code>, <code>man</code>. Although I&#8217;ve been using nothing but Windows throughout my career &ndash; from Windows 95 to 2000 to XP &ndash; these commands have proven to be indispensible for those occasions when I need to remotely administer a Linux box.</p>
<p>Let&#8217;s go through them one by one.</p>
<p>You log in to a Linux server and all you get is a dollar sign and a cursor. The first thing you want to know is: where am I? So you want to <strong>print</strong> the <strong>working directory</strong>:</p>
<p><code>pwd</code></p>
<p>Then you want to <strong>list all</strong> the contents of the current directory in a <strong>long</strong> listing format:</p>
<p><code>ls -al</code></p>
<p>To get around, you <strong>change directory</strong>:</p>
<p><code>cd <em>/another/directory</em></code></p>
<p>Then, to <strong>copy </strong>a file from one directory to another:</p>
<p><code>cp <em>/some/directory/somefile.txt /another/directory</em></code></p>
<p>To <strong>move</strong> it instead:</p>
<p><code>mv <em>/some/directory/somefile.txt /another/directory</em></code></p>
<p>There is no command to rename, you just move it:</p>
<p><code>mv <em>oldname.txt newname.txt</em></code></p>
<p>To <strong>remove</strong> a file:</p>
<p><code>rm <em>filename.txt</em></code></p>
<p>To <strong>remove</strong> a directory and its contents <strong>recursively</strong>:</p>
<p><code>rm -r <em>dirname</em></code> (use with extreme caution!)</p>
<p>To <strong>make</strong> a <strong>directory</strong>:</p>
<p><code>mkdir <em>dirname</em></code></p>
<p>To <strong>change</strong> the <strong>mode</strong> of a file or directory to make it writeable by everyone:</p>
<p><code>chmod ugo+rwx <em>file_or_directory</em></code></p>
<p><code>ugo+rwx</code> means, for (user, group, others), add (read, write, execute) permissions. Use the minus sign instead of the plus sign to remove permissions. <code>ugo</code> and <code>rwx</code> can be used in any combination, e.g., <code>go-w</code>.</p>
<p>Finally, to get to know <strong>more</strong> about the contents of a file:</p>
<p><code>more <em>filename.txt</em></code></p>
<p>Press space to scroll to the next page, and q to quit. (Note: <code>less</code> is better than <code>more</code>. With <code>less</code>, you could go both backwards and forwards.)</p>
<p>Finally: when in doubt, consult the <strong>manual</strong>!</p>
<p><code>man <em>command</em></code></p>
<p><strong>Update 13 February 2009</strong></p>
<p>See also <a href="http://dirn.name/2008/09/commands-that-you-must-know-in-linux/">Commands that you must know in Linux…</a> by <a href="http://dirn.name/">dirn.name</a>.</p>
<iframe id="basic_facebook_social_plugins_likebutton" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnazham.com%2F2009%2F02%2F06%2Findispensible-unix-commands%2F&amp;layout=standard&amp;show_faces=true&amp;width=&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:px; height:px"></iframe>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://nazham.com/2009/02/06/indispensible-unix-commands/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Moonlight: Microsoft Silverlight in Linux</title>
		<link>http://nazham.com/2009/02/04/moonlight-microsoft-silverlight-in-linux/</link>
		<comments>http://nazham.com/2009/02/04/moonlight-microsoft-silverlight-in-linux/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 11:01:19 +0000</pubDate>
		<dc:creator>nazham</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://nazham.com/?p=814</guid>
		<description><![CDATA[
Need to view Microsoft Silverlight enabled sites, but you&#8217;re on Linux, and running Firefox as the web browser? Have no fear, Moonlight is here.
Moonlight is an open source implementation of Microsoft Silverlight for Unix or Linux platform.
The current release version is 1.0. All you have to do is, just go to their site, and install [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-815" style="border: 0pt none; margin-right: 20px;" title="moonlight" src="http://nazham.com/wp-content/uploads/2009/01/moonlight_logo.png" alt="moonlight" width="100" height="125" /></p>
<p>Need to view Microsoft Silverlight enabled sites, but you&#8217;re on Linux, and running Firefox as the web browser? Have no fear, <strong>Moonlight</strong> is here.</p>
<p><a href="http://go-mono.com/moonlight/" target="_blank">Moonlight</a> is an open source implementation of <a href="http://silverlight.net/" target="_blank">Microsoft Silverlight</a> for Unix or Linux platform.</p>
<p>The current release version is 1.0. All you have to do is, just go to their site, and install the plugin/add-on from your Firefox.</p>
<p>Enjoy!</p>
<iframe id="basic_facebook_social_plugins_likebutton" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnazham.com%2F2009%2F02%2F04%2Fmoonlight-microsoft-silverlight-in-linux%2F&amp;layout=standard&amp;show_faces=true&amp;width=&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:px; height:px"></iframe>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://nazham.com/2009/02/04/moonlight-microsoft-silverlight-in-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Automated scp on Linux</title>
		<link>http://nazham.com/2009/01/30/automated-scp-on-linux/</link>
		<comments>http://nazham.com/2009/01/30/automated-scp-on-linux/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 16:17:28 +0000</pubDate>
		<dc:creator>rizal</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://nazham.com/?p=779</guid>
		<description><![CDATA[Scenario
You would like to automate the export of SQL dump files from one Linux server to another using scp. These dump files are to be generated and exported once every two weeks. You also wish to archive these dump files on the source server.
So let&#8217;s say the servers and directories are as follows:
Source
Hostname: perak
Username: nazham
Dump [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><strong>Scenario</strong></p>
<p>You would like to automate the export of SQL dump files from one Linux server to another using scp. These dump files are to be generated and exported once every two weeks. You also wish to archive these dump files on the source server.</p>
<p>So let&#8217;s say the servers and directories are as follows:</p>
<p><em>Source</em></p>
<p>Hostname: perak<br />
Username: nazham<br />
Dump file directory: <code>/home/nazham/data_export/current</code><br />
Archive directory: <code>/home/nazham/data_export/archive/<em>yyyymmdd</em></code></p>
<p><em>Target</em></p>
<p>Hostname: selangor<br />
Username: romantika<br />
Target directory: <code>/home/romantika/data_import</code></p>
<p><strong>Passwordless scp</strong></p>
<p>First you need to set it up so that you don&#8217;t need to enter a password for scp. The overall picture is as follows:</p>
<ol>
<li>At the source server, generate a pair of public and private keys [1] using RSA.</li>
<li>Store the private key in a specific place in the source server.</li>
<li>Store the public key in a specific place in the destination server.</li>
<li>And that&#8217;s it! Now you&#8217;ll no longer be prompted for a password when using scp.</li>
</ol>
<p><strong>One-off steps</strong></p>
<p><code># login to perak with username nazham<br />
ssh-keygen -t rsa<br />
# choose default location, no passphrase - just press enter at all prompts<br />
scp ~/.ssh/id_rsa.pub romantika@selangor:/home/romantika/.ssh/authorized_keys<br />
# I'm assuming the file authorized_keys does not exist!<br />
# otherwise, you need to append the contents of id_rsa.pub to it.<br />
crontab -e<br />
# add the following:<br />
# 1 0 1,15 * * nazham /home/nazham/run_data_export &gt;&gt; /dev/null 2&gt;&amp;1<br />
# which means, run at 12:01 am every 1st and 15th of the month<br />
mkdir ~/data_export<br />
mkdir ~/data_export/current<br />
mkdir ~/data_export/archive</code></p>
<p><strong>The run_data_export script</strong></p>
<p><code>todaysDate=`date +%Y%m%d`<br />
oldDate=`date -d '1 year ago' +%Y%m%d`<br />
exportDir=data_export<br />
mysqldump -u <em>username</em> -p<em>password</em> -r ~/$exportDir/current/<em>filename</em> <em>dbname</em> <em>tablenames</em><br />
echo $todaysDate &gt; ~/$exportDir/current/importdate.txt<br />
scp ~/$exportDir/current/* romantika@selangor:/home/romantika/data_import<br />
mkdir ~/$exportDir/archive/$todaysDate<br />
rm ~/$exportDir/current/importdate.txt<br />
mv ~/$exportDir/current/* ~/$exportDir/archive/$todaysDate<br />
if [ -d ~/$exportDir/archive/$oldDate ]; then rm -r ~/$exportDir/archive/$oldDate; fi</code></p>
<p><strong>The Linux date command</strong></p>
<p>I&#8217;m very impressed by the Linux date command. This might be old news to some, but the fact that I&#8217;m able to say <code>date -d '1 year ago'</code> or <code>date -d '30 days ago'</code> completely blows the mind.</p>
<p><strong>Notes</strong></p>
<p>[1] From <a href="http://www.linuxjournal.com/article/8600">Pass on Passwords with scp</a>: &#8220;If you&#8217;re not familiar with public key cryptography, here&#8217;s the 15-second explanation. In public key cryptography, you generate a pair of mathematically related keys, one public and one private. You then give your public key to anyone and everyone in the world, but you never ever give out your private key. The magic is in the mathematical makeup of the keys; anyone with your public key can use it to encrypt a message, but only you can decrypt it with your private key.&#8221;</p>
<iframe id="basic_facebook_social_plugins_likebutton" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnazham.com%2F2009%2F01%2F30%2Fautomated-scp-on-linux%2F&amp;layout=standard&amp;show_faces=true&amp;width=&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:px; height:px"></iframe>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://nazham.com/2009/01/30/automated-scp-on-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Red Hat Linux Training and Certification</title>
		<link>http://nazham.com/2009/01/18/red-hat-linux-training-and-certification/</link>
		<comments>http://nazham.com/2009/01/18/red-hat-linux-training-and-certification/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 18:10:11 +0000</pubDate>
		<dc:creator>nazham</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Red Hat]]></category>

		<guid isPermaLink="false">http://nazham.com/?p=754</guid>
		<description><![CDATA[Red Hat Training provides classroom-based courses at convenient worldwide locations and in a variety of topics. I&#8217;ve just finished my training for RH033 Red Hat Linux Essentials, last week. Among Linux Red Hat training you can get here in Malaysia are:
RH033 Red Hat Linux Essentials
RH131 Red Hat Linux System Administration
RH253 Red Hat linux Networking and [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><a href="http://nazham.com/wp-content/uploads/2009/01/rh1.jpg"><img class="alignleft size-thumbnail wp-image-768" style="border: 0pt none; margin-right: 10px; margin-bottom: 5px;" title="rh1" src="http://nazham.com/wp-content/uploads/2009/01/rh1-150x150.jpg" alt="rh1" width="150" height="150" /></a>Red Hat Training provides classroom-based courses at convenient worldwide locations and in a variety of topics. I&#8217;ve just finished my training for RH033 Red Hat Linux Essentials, last week. Among Linux Red Hat training you can get here in Malaysia are:</p>
<p>RH033 Red Hat Linux Essentials<br />
RH131 Red Hat Linux System Administration<br />
RH253 Red Hat linux Networking and Security Administration<br />
RH142 Linux Troubleshooting Techniques &amp; Tools<br />
RH184 Red hat Enterprise Linux Virtualization</p>
<p>&#8230; and many more. Just contact your nearest training center.</p>
<p><a href="http://nazham.com/wp-content/uploads/2009/01/rh3.jpg"><img class="alignright size-thumbnail wp-image-759" style="border: 0pt none;" title="rh3" src="http://nazham.com/wp-content/uploads/2009/01/rh3-150x150.jpg" alt="rh3" width="150" height="150" /></a></p>
<p>For Kuala Lumpur, training center below offers Red Hat Courses. The center classroom and facilities are good, and the trainers are well experienced and knowledgable :</p>
<p>Iverson Associates Sdn. Bhd.<br />
Suite T113 – 114, 3rd Floor,<br />
Centrepoint, Lebuh Bandar Utama,<br />
47800 Bandar Utama, Selangor Darul Ehsan.<br />
Tel: 03-77262678<br />
<a href="http://www.iverson.com.my" target="_blank">http://www.iverson.com.my</a></p>
<p><a href="http://nazham.com/wp-content/uploads/2009/01/rh2.jpg"><img class="alignleft size-thumbnail wp-image-772" style="border: 0pt none; margin-right: 10px; margin-bottom: 5px;" title="rh2" src="http://nazham.com/wp-content/uploads/2009/01/rh2-150x150.jpg" alt="rh2" width="150" height="150" /></a></p>
<p>For more info, feel free to check Linux Red Hat courses and certification listings:</p>
<p><a href="https://www.redhat.com/training/" target="_blank">Red Hat Training and Certification</a></p>
<p><a href="https://www.redhat.com/courses/" target="_blank">Red Hat Courses</a></p>
<iframe id="basic_facebook_social_plugins_likebutton" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnazham.com%2F2009%2F01%2F18%2Fred-hat-linux-training-and-certification%2F&amp;layout=standard&amp;show_faces=true&amp;width=&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:px; height:px"></iframe>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://nazham.com/2009/01/18/red-hat-linux-training-and-certification/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Twitux and gTwitter: Twitter Clients for Ubuntu Linux</title>
		<link>http://nazham.com/2008/12/30/twitux-and-gtwitter-twitter-clients-for-ubuntu-linux/</link>
		<comments>http://nazham.com/2008/12/30/twitux-and-gtwitter-twitter-clients-for-ubuntu-linux/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 16:23:17 +0000</pubDate>
		<dc:creator>nazham</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Ubuntu 8.10]]></category>

		<guid isPermaLink="false">http://nazham.com/?p=711</guid>
		<description><![CDATA[Following my previous post nazham.com on Twitter, I&#8217;ve just beginning to get involved with Twitter.
Below are a couple of Twitter clients that I&#8217;ve used in Ubuntu:
Twitux
A Twitter client for GNOME.
Twitux is a lightweight client for the twitter messaging service, featuring time-line auto updating, a tray area icon and notification of new messages.

gTwitter
Client for tracking and [...]

Related posts:<ol><li><a href='http://nazham.com/2009/12/02/how-to-check-for-open-ports-in-ubuntu/' rel='bookmark' title='Permanent Link: How to Check for Open Ports in Ubuntu'>How to Check for Open Ports in Ubuntu</a> <small>There are various ways to view for open ports on...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Following my previous post <a href="http://nazham.com/2008/12/25/nazhamcom-on-twitter/" target="_blank">nazham.com on Twitter</a>, I&#8217;ve just beginning to get involved with <a href="http://twitter.com/nazham" target="_blank">Twitter</a>.<br />
Below are a couple of Twitter clients that I&#8217;ve used in Ubuntu:</p>
<p><a href="http://live.gnome.org/DanielMorales/Twitux" target="_blank"><strong>Twitux</strong></a><br />
A Twitter client for GNOME.<br />
Twitux is a lightweight client for the twitter messaging service, featuring time-line auto updating, a tray area icon and notification of new messages.</p>
<p><img class="alignnone size-full wp-image-716" title="twitux" src="http://nazham.com/wp-content/uploads/2008/12/twitux.jpg" alt="twitux" width="437" height="450" /></p>
<p><a href="http://code.google.com/p/gtwitter/" target="_blank"><strong>gTwitter</strong></a><br />
Client for tracking and posting to twitter.<br />
gTwitter is a client for posting and fetching updates to the twitter service.</p>
<p><img src="http://nazham.com/wp-content/uploads/2008/12/gtwitter.png" alt="gtwitter" title="gtwitter" width="371" height="410" class="alignnone size-full wp-image-723" /></p>
<p>Installation is available through Synaptic Package Manager. Just do a search for the application name, twitux or gtwitter.</p>
<iframe id="basic_facebook_social_plugins_likebutton" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnazham.com%2F2008%2F12%2F30%2Ftwitux-and-gtwitter-twitter-clients-for-ubuntu-linux%2F&amp;layout=standard&amp;show_faces=true&amp;width=&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:px; height:px"></iframe>

<br />Related posts:<ol><li><a href='http://nazham.com/2009/12/02/how-to-check-for-open-ports-in-ubuntu/' rel='bookmark' title='Permanent Link: How to Check for Open Ports in Ubuntu'>How to Check for Open Ports in Ubuntu</a> <small>There are various ways to view for open ports on...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://nazham.com/2008/12/30/twitux-and-gtwitter-twitter-clients-for-ubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
