<?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>dimitar.me &#187; Linux</title>
	<atom:link href="http://dimitar.me/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://dimitar.me</link>
	<description>Dimitar Darazhanski&#039;s blog.</description>
	<lastBuildDate>Wed, 01 Sep 2010 13:50:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Change the date and time (or any other EXIF image meta-data) of pictures with Ubuntu</title>
		<link>http://dimitar.me/change-the-date-and-time-or-any-other-exif-image-meta-data-of-pictures-with-ubuntu/</link>
		<comments>http://dimitar.me/change-the-date-and-time-or-any-other-exif-image-meta-data-of-pictures-with-ubuntu/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 20:04:06 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=984</guid>
		<description><![CDATA[There is a very flexible and easy Linux tool that helps you change the EXIF meta-data of images. It allows you to change individual files or whole bunch of them with one command. You can also put different rules about what files and how you want to change them if you need to. The program [...]]]></description>
			<content:encoded><![CDATA[<p>There is a very flexible and easy Linux tool that helps you change the EXIF meta-data of images. It allows you to change individual files or whole bunch of them with one command. You can also put different rules about what files and how you want to change them if you need to.</p>
<p>The program is called <em>exiftool</em>. So let&#8217;s install it first. </p>
<p>In terminal execute:</p>
<pre><code>sudo apt-get install libimage-exiftool-perl</code></pre>
<p>Now you are ready to start changing the meta-data of the images.</p>
<p>For example, if I wanted to change all the dates and times (DateTimeOriginal, CreateDate and ModifyDate) of the IMG_01.jpg file to the 8th of August 2010 at 3:35:33 PM I would do:</p>
<pre><code>exiftool -AllDates='2010:08:08 15:35:33' -overwrite_original IMG_01.jpg</code></pre>
<p>If I wanted to change the dates on all the files in the <em>&#8220;images&#8221;</em> directory, I would do:</p>
<pre><code>exiftool -AllDates='2010:08:08 15:35:33' -overwrite_original images</code></pre>
<p>The<em> &#8220;-overwrite_original&#8221;</em> option is necessary if you want to change the meta-data of the original images. If you omit that option, then exiftool will back-up the originals by making a copy of them and adding <em>&#8220;_original&#8221;</em> to the end of the file names.</p>
<p>If you want to change the dates to all the files in the &#8220;images&#8221; directory that were taken by a Cannon camera (and not touch the rest) I would do:</p>
<pre><code>exiftool -AllDates='2010:08:08 15:35:33' -if '$make eq "Canon"' -overwrite_original images</code></pre>
<p>As far as changing dates and times, there is another option of exiftool that lets you do time calculation. </p>
<p>For example, the other day I found out that my camera&#8217;s time was correct but the date was ahead by 30 days. That meant that all the photos I had taken lately had dates that were off by exactly 30 days. If I were to use the above examples I could set the dates individually (which would be a long and tedious process) or set all the images to the same date and time (which would be wrong). In this case I used the date calculating option and just executed:</p>
<pre><code>exiftool -AllDates-=720:00 -overwrite_original images</code></pre>
<p>That command subtracts 720 hours (30 days) off the dates of each image file in the images directory. Now every image has the exact date and time it was taken.</p>
<p>I have only scratched the surface of what this tool is capable of. For more information look at the man pages of the exiftool command.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/change-the-date-and-time-or-any-other-exif-image-meta-data-of-pictures-with-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Just Upgraded my Nexus One from Android 2.1 to Android 2.2</title>
		<link>http://dimitar.me/just-upgraded-my-nexus-one-from-android-2-1-to-android-2-2/</link>
		<comments>http://dimitar.me/just-upgraded-my-nexus-one-from-android-2-1-to-android-2-2/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 19:52:05 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=937</guid>
		<description><![CDATA[The latest Android OS version 2.2 (&#8220;Froyo&#8221;) was announced at the Google I/O conference on the 11th of May. As you already probably know it adds multiple enhancements like tethering, wifi hotspot functionality, full support for Flash, etc. Since I use my Nexus One phone for Android development, I did not want to download the [...]]]></description>
			<content:encoded><![CDATA[<p>The latest Android OS version 2.2 (&#8220;Froyo&#8221;) was announced at the Google I/O conference on the 11th of May. As you already probably know it adds multiple enhancements like tethering, wifi hotspot functionality, full support for Flash, etc. Since I use my Nexus One phone for Android development, I did not want to download the update from Google and then install it with adb. I just wanted to wait for the over the air update.</p>
<p>And to my surprise, the first time I looked at my phone this morning, I had this message on the screen:</p>
<div id="attachment_935" class="wp-caption aligncenter" style="width: 310px"><a href="http://dimitar.me/wp-content/uploads/2010/07/Android_2.2_Upgrade_Message.png"><img src="http://dimitar.me/wp-content/uploads/2010/07/Android_2.2_Upgrade_Message-300x225.png" alt="Android 2.2 Upgrade Message" title="Android_2.2_Upgrade_Message" width="300" height="225" class="size-medium wp-image-935" /></a><p class="wp-caption-text">Android 2.2 Upgrade Message</p></div>
<p>I was not sure how long it would take, so I just hit &#8220;Install Later&#8221;. Then a couple of hours later, when I was ready, I just went to Settings -> About Phone -> Software Update and hit &#8220;Restart &#038; Install&#8221;:</p>
<div id="attachment_936" class="wp-caption aligncenter" style="width: 235px"><a href="http://dimitar.me/wp-content/uploads/2010/07/Android_2.2_Settings_SystemUpdates.png"><img src="http://dimitar.me/wp-content/uploads/2010/07/Android_2.2_Settings_SystemUpdates-225x300.png" alt="Android 2.2 Settings -&gt; About Phone -&gt; System Updates" title="Android_2.2_Settings_SystemUpdates" width="225" height="300" class="size-medium wp-image-936" /></a><p class="wp-caption-text">Android 2.2 Settings -> About Phone -> System Updates</p></div>
<p>The phone rebooted and started the upgrade. The whole process with the installation took less than 5 minutes.</p>
<p>I am not going to go into details what the features of Android 2.2 are. There are so many announcements and blog posts on this matter already out there&#8230;</p>
<p>But what I am going to say is that Android is the leading OS in the mobile phone market right now. I can say this definitively, since I have been using iPhones for the past 2 years. I have a 3G and a 3GS phones. I encourage any iPhone user to go and check out an Android device. Please do not look at the low end hardware that runs Android (like the Cliq, the old G1, etc.). Check out the HTC Evo, the HTC Incredible, the Nexus One etc. See for yourselves before you make your decision to get another phone and lock into a 2 year contract. I will mention only a few things you will discover on the Android device that your phone probably does not have right now:</p>
<ol>
<li>Turn by turn voice navigation</li>
<li>Built in tethering</li>
<li>Built in WiFi hotspot capability supporting multiple devices</li>
<li>Full support for Flash</li>
<li>Full blown multitasking on the OS level (no need for the programmer to do anything special)</li>
<li>Integrated speech recognition across the board. Voice input could be used anywhere in place of the text input.</li>
<li>Over the air updates and syncing. That means no iTunes or the like!</li>
</ol>
<p>And many other features that I do not want to get into details right now. I am sure you can fill in the gaps for yourselves&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/just-upgraded-my-nexus-one-from-android-2-1-to-android-2-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find the Geopgraphical Location of an IP Address</title>
		<link>http://dimitar.me/find-the-geopgraphical-location-of-an-ip-address/</link>
		<comments>http://dimitar.me/find-the-geopgraphical-location-of-an-ip-address/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 15:31:45 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=921</guid>
		<description><![CDATA[There are a few applications that give the geographical location of an IP address *. My favorite one is VisualRoute. It not only maps the location of the source and destination IP addresses, but also all the hops in between. The down side to it is that it is not available for Linux and it [...]]]></description>
			<content:encoded><![CDATA[<p>There are a few applications that give the geographical location of an IP address <em>*</em>. My favorite one is <a href="http://www.visualroute.com/" onclick="pageTracker._trackPageview('/outgoing/www.visualroute.com/?referer=');">VisualRoute</a>. It not only maps the location of the source and destination IP addresses, but also all the hops in between. The down side to it is that it is not available for Linux and it costs $50 per user.</p>
<p>The <a href="http://mapulator.com" onclick="pageTracker._trackPageview('/outgoing/mapulator.com?referer=');">http://mapulator.com</a> site gives you pretty much the same information online for free, but it has been down for quite some time now.</p>
<p>Lately I have been using <a href="http://whatismyipaddress.com/ip-lookup" onclick="pageTracker._trackPageview('/outgoing/whatismyipaddress.com/ip-lookup?referer=');">http://whatismyipaddress.com/ip-lookup</a>. But it only maps the destination IP address.</p>
<p>If anyone knows of a Linux application that would map all the hops and the final IP destination, please leave a comment!</p>
<p><em>* IP addresses do not have a geographical location per se. Any program that maps IP addresses can only give you where the whole class of IP addresses (that the specified IP address belongs to) is registered to be located at. They do this by querying a database that has that information. This is accurate down to a city level at best. Do not expect to find where someone lives by their IP address! </em></p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/find-the-geopgraphical-location-of-an-ip-address/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Subversion and Subclipse for Eclipse on Ubuntu</title>
		<link>http://dimitar.me/install-subversion-and-subclipse-for-eclipse-on-ubuntu/</link>
		<comments>http://dimitar.me/install-subversion-and-subclipse-for-eclipse-on-ubuntu/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 19:03:32 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=875</guid>
		<description><![CDATA[If you do not have Eclipse installed yet, run: sudo apt-get install eclipse Install Subversion sudo apt-get install subversion Install the Subversion plugin for Eclipse Get the Java bindings for Subversion: sudo apt-get install libsvn-java Now we are ready to install the plugins in Eclipse. Open Eclipse. Go to Help -> Install New Software Then [...]]]></description>
			<content:encoded><![CDATA[<p>If you do not have Eclipse installed yet, run:</p>
<pre><code>sudo apt-get install eclipse</code></pre>
<p><b>Install Subversion</b></p>
<pre><code>sudo apt-get install subversion</code></pre>
<p><b>Install the Subversion plugin for Eclipse</b></p>
<p>Get the Java bindings for Subversion:</p>
<pre><code>sudo apt-get install libsvn-java</code></pre>
<p>Now we are ready to install the plugins in Eclipse.</p>
<p>Open Eclipse.</p>
<p>Go to Help -> Install New Software</p>
<p>Then hit the &#8220;Add&#8221; button.</p>
<p>Put &#8220;Subclipse 1.6.x (Eclipse 3.2+)&#8221; under Name and &#8220;http://subclipse.tigris.org/update_1.6.x&#8221; under Location:</p>
<div id="attachment_892" class="wp-caption aligncenter" style="width: 530px"><a href="http://dimitar.me/wp-content/uploads/2010/06/Subclipse1.png"><img src="http://dimitar.me/wp-content/uploads/2010/06/Subclipse1.png" alt="Add the libraries for Subclipse" title="Subclipse Libraries" width="520" height="409" class="size-full wp-image-892" /></a><p class="wp-caption-text">Add the libraries for Subclipse</p></div>
<p>The above is for Elclips 3.2+ and Subversion 1.6.x.</p>
<p>If you have different Eclipse or Subversion versions, check this list and substitute accordingly:<br />
<em><br />
Name: Subclipse 1.6.x (Eclipse 3.2+)<br />
URL:  http://subclipse.tigris.org/update_1.6.x</p>
<p>Name: Subclipse 1.4.x (Eclipse 3.2+)<br />
URL:  http://subclipse.tigris.org/update_1.4.x</p>
<p>Name: Subclipse 1.2.x (Eclipse 3.2+)<br />
URL:  http://subclipse.tigris.org/update_1.2.x</p>
<p>Name: Subclipse 1.0.x (Eclipse 3.0/3.1)<br />
URL:  http://subclipse.tigris.org/update_1.0.x<br />
</em><br />
More info about the different versions: <a target="_blank" href="http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA" onclick="pageTracker._trackPageview('/outgoing/subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA&amp;referer=');">http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA</a></p>
<p>Then hit &#8220;OK&#8221;. You will now be presented with these options:</p>
<div id="attachment_902" class="wp-caption aligncenter" style="width: 530px"><a href="http://dimitar.me/wp-content/uploads/2010/06/Subclipse2.png"><img src="http://dimitar.me/wp-content/uploads/2010/06/Subclipse2.png" alt="Subclipse Installation Options" title="Subclipse Installation Options" width="520" height="513" class="size-full wp-image-902" /></a><p class="wp-caption-text">Subclipse Installation Options</p></div>
<p>If you are unsure what Subclipse component you will need, you can check all of them. Also, keep in mind that you can always go back to this in the future and install/uninstall any of the components as needed.</p>
<p>Then &#8220;Next&#8221; and &#8220;Finish&#8221; on the subsequent screens.</p>
<p>After the plugins are installed, it will prompt you to restart Eclipse. Go ahead and do so.</p>
<p><b>You are not done yet. You need to fix the JavaHL.</b></p>
<p>Edit the <em>eclipse.ini</em> file:</p>
<pre><code>sudo vi /usr/lib/eclipse/eclipse.ini</code></pre>
<p>Add the following line under -vmargs:</p>
<p>-Djava.library.path=/usr/lib/jni</p>
<p>Here is what my <em>eclipse.ini</em> file looks like:</p>
<pre><code>$ cat /usr/lib/eclipse/eclipse.ini
-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.200.v20090520
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-startup
--launcher.library
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-startup
/usr/lib/eclipse/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
/usr/lib/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.200.v20090520
-vmargs
-Djava.library.path=/usr/lib/jni
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=//usr/share/eclipse/dropins
-Xms40m
-Xmx256m
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=//usr/share/eclipse/dropins</code></pre>
<p>For more info on fixing JavaHL if you need it: <a target="_blank" href="http://subclipse.tigris.org/wiki/JavaHL#head-bb1dd50f9ec2f0d8c32246430c00e237d27a04fe" onclick="pageTracker._trackPageview('/outgoing/subclipse.tigris.org/wiki/JavaHL_head-bb1dd50f9ec2f0d8c32246430c00e237d27a04fe?referer=');">http://subclipse.tigris.org/wiki/JavaHL#head-bb1dd50f9ec2f0d8c32246430c00e237d27a04fe</a></p>
<p>You should be able to use Subversion with Eclipse for your projects at this point.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/install-subversion-and-subclipse-for-eclipse-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extract Audio (.mp3) from Video Files Like .flv, .mov, .avi and Others with Ubuntu</title>
		<link>http://dimitar.me/extract-audio-mp3-from-video-files-like-flv-mov-avi/</link>
		<comments>http://dimitar.me/extract-audio-mp3-from-video-files-like-flv-mov-avi/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 20:49:26 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=807</guid>
		<description><![CDATA[It is very easy to extract the audio track from video files using Linux. All you need is ffmpeg and some codecs. Let&#8217;s get started&#8230; Note: The commands below are for Ubuntu (or Debian derivatives) but you can do the same with any other Linux distribution provided you can install the necessary packages. 1. Add [...]]]></description>
			<content:encoded><![CDATA[<p>It is very easy to extract the audio track from video files using Linux. All you need is <em>ffmpeg</em> and some codecs.</p>
<p>Let&#8217;s get started&#8230;</p>
<p><em>Note:</em> The commands below are for Ubuntu (or Debian derivatives) but you can do the same with any other Linux distribution provided you can install the necessary packages.</p>
<p><strong>1. Add the Medibuntu&#8217;s repository to your sources.list:</strong></p>
<pre><code>sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list &#038;&#038; sudo apt-get --quiet update &#038;&#038; sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring &#038;&#038; sudo apt-get --quiet update</code></pre>
<p><strong>2. Install ffmpeg:</strong></p>
<pre><code>sudo apt-get install ffmpeg</code></pre>
<p><strong>3. Let&#8217;s get the restricted packages and some codecs installed:</strong></p>
<pre><code>sudo apt-get install ubuntu-restricted-extras libmp3lame0 libdvdcss2 w32codecs</code></pre>
<p>The above command is for i386 architecture. If you have an amd64 architecture, substitute <em>w32codecs</em> with <em>w64codecs</em>.</p>
<p><em>Note:</em> This is not a complete list of codec packages by any stretch of the imagination. It will get you started though and you will be able to do most formats, but you might have to add codecs as you go along.</p>
<p><strong>4. Now we are ready to extract the audio from the video files:</strong></p>
<pre><code>ffmpeg -i input_file.flv output_file.mp3</code></pre>
<p>The above command will extract the audio from a Flash video file. You can do the same for a QuickTime file as well:</p>
<pre><code>ffmpeg -i input_file.mov output_file.mp3</code></pre>
<p>Or for an Audio Video Interface file:</p>
<pre><code>ffmpeg -i input_file.avi output_file.mp3</code></pre>
<p><strong>YouTube and other video web sites:</strong></p>
<p>Having done all this, now we can download flash files from places like YouTube and strip the audio from them. All you need besides the steps above is a way to save the Flash files (.flv) from YouTube. An easy way to do that is by using Firefox Add-ons like <a href="https://addons.mozilla.org/en-US/firefox/addon/53003?src=api" onclick="pageTracker._trackPageview('/outgoing/addons.mozilla.org/en-US/firefox/addon/53003?src=api&amp;referer=');">Download Flash and Video</a> or <a href="https://addons.mozilla.org/en-US/firefox/addon/6584?src=api" onclick="pageTracker._trackPageview('/outgoing/addons.mozilla.org/en-US/firefox/addon/6584?src=api&amp;referer=');">Flash Video Downloader</a>.</p>
<p>The quality of the audio in the YouTube videos for example is 64 bit/sec. Most of the mp3 files are normally compressed to 128 bit/sec or above. Obviously the quality will not be the same, but a human year cannot tell the difference. </p>
<p>The quality of the extracted mp3 will depend on the quality of the audio track in the video file. So the above statement about the 64 bit/sec audio is mostly the case for the files on some video sharing sites.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/extract-audio-mp3-from-video-files-like-flv-mov-avi/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Resume Partial File Transfers</title>
		<link>http://dimitar.me/how-to-resume-partial-file-transfers/</link>
		<comments>http://dimitar.me/how-to-resume-partial-file-transfers/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 05:03:11 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MacOS X]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=793</guid>
		<description><![CDATA[I work primarily with UNIX and Linux machines and scp is my main choice to transfer files with. It is both convenient, short and secure. Example: scp localfile user@remotecomputer:/path/to/target/dir Recently I was transferring an 8GB file and due to a network issue, the transfer was interrupted at nearly 40%. I found a solution at joen.dk [...]]]></description>
			<content:encoded><![CDATA[<p>I work primarily with UNIX and Linux machines and <em>scp</em> is my main choice to transfer files with. It is both convenient, short and secure.<em></em><em></em></p>
<p>Example:</p>
<pre><code>scp localfile user@remotecomputer:/path/to/target/dir</code></pre>
<p>Recently I was transferring an 8GB file and due to a network issue, the transfer was interrupted at nearly 40%.</p>
<p>I found a solution at <a href="http://joen.dk/wordpress/?p=34" onclick="pageTracker._trackPageview('/outgoing/joen.dk/wordpress/?p=34&amp;referer=');">joen.dk</a> ,which uses <em>rsync</em> to resume the transfer:</p>
<pre><code>rsync --partial --progress --rsh=ssh host:remote_file local_file</code></pre>
<p>Now we can improve this slightly by shortening the above command. We can substitute <em>&#8211;rsh=ssh</em> with <em>-e ssh</em>, and use <em>-P</em> instead of <em>&#8211;partial &#8211;progress</em>. Also, you can add <em>user@host</em> if you need to specify a different remote shell user:</p>
<pre><code>rsync -P -e ssh user@host:remote_file local_file</code></pre>
<p>This above example will work with any file that was partially transfered. How the transfer was started does not really matter. It could be through scp, nc or even ftp. After you execute the above command it will take <em>rsync</em> a little time to verify the previously downloaded part before it continues with the rest. Be patient, depending on your network speed <em>rsync</em> could take some time to go through what you have already transfered. Of course this is much faster than if you were to start the download all over again and it shows you the progress in percentages.</p>
<p>Keep in mind that there have to be a couple of requirements in place in order to resume the file transfer with <em>rsync</em>:</p>
<p>1. You should have remote shell access.<br />
2. The remote machine should have rsync installed. Since rsync is by default on most Linux distributions that generally should not be an issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/how-to-resume-partial-file-transfers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert Quicktime Movies to AVI encoded with MPEG-4 (MOV to AVI) with Linux/Ubuntu</title>
		<link>http://dimitar.me/convert-quicktime-movies-to-avi-encoded-with-mpeg-4-mov-to-avi-with-linuxubuntu/</link>
		<comments>http://dimitar.me/convert-quicktime-movies-to-avi-encoded-with-mpeg-4-mov-to-avi-with-linuxubuntu/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 05:31:15 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=764</guid>
		<description><![CDATA[A lot of camcorders record in the .mov (Quicktime) format. It has high quality video and depending on the underlying codec it provides a good compression, but it is too proprietary and very often you might not be able to play it on different devices. AVI on the other hand is more widely accepted format. [...]]]></description>
			<content:encoded><![CDATA[<p>A lot of camcorders record in the .mov (Quicktime) format. It has high quality video and depending on the underlying codec it provides a good compression, but it is too proprietary and very often you might not be able to play it on different devices.  </p>
<p>AVI on the other hand is more widely accepted format. AVI, like MOV, is a media container that envelops encoded media. In this example we will convert Quicktime video (.mov) to .avi that contains media encoded with mpeg-4.</p>
<p>If you want to preserve the original quality and resolution with pcm_u8 (analog 8bit) audio:</p>
<pre><code>ffmpeg -i inputfile.mov -sameq -vcodec msmpeg4v2 -acodec pcm_u8 outputfile.avi</code></pre>
<p>Obviously I would prefer something better for the sound so I normally use the mp3 as an audio codec. To do this make sure that you have the libmp3lame0 package installed to do that:</p>
<pre><code>sudo apt-get install libmp3lame0</code></pre>
<p>And then:</p>
<pre><code>ffmpeg -i inputfile.mov -sameq -vcodec msmpeg4v2 -acodec libmp3lame outputfile.avi</code></pre>
<p>If you want to change the resolution then add the -s option and specify the horizontal and vertical resolution. Make sure to preserve the original aspect ratio:</p>
<pre><code>ffmpeg -i inputfile.mov -s 960x540 -sameq -vcodec msmpeg4v2 -acodec libmp3lame outputfile.avi</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/convert-quicktime-movies-to-avi-encoded-with-mpeg-4-mov-to-avi-with-linuxubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Broadcom Wireless Chipset (BCM4311, BCM4312, BCM4321, and BCM4322) on Ubuntu Karmic.</title>
		<link>http://dimitar.me/broadcom-wireless-chipset-bcm4311-bcm4312-bcm4321-and-bcm4322-on-ubuntu-karmic/</link>
		<comments>http://dimitar.me/broadcom-wireless-chipset-bcm4311-bcm4312-bcm4321-and-bcm4322-on-ubuntu-karmic/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 21:24:32 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=728</guid>
		<description><![CDATA[If you have a Broadcom wireless chipset BCM4311, BCM4312, BCM4321, or BCM4322 it will not work with Ubuntu Karmic after an upgrade or an install. To get it working, you need to install the STA driver. You can get it from the Broadcom site: http://www.broadcom.com/support/802.11/linux_sta.php Follow the instructions in the README.txt file which is on [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a Broadcom wireless chipset BCM4311, BCM4312, BCM4321, or BCM4322 it will not work with Ubuntu Karmic after an upgrade or an install.</p>
<p>To get it working, you need to install the STA driver. You can get it from the Broadcom site:</p>
<p><a href="http://www.broadcom.com/support/802.11/linux_sta.php" onclick="pageTracker._trackPageview('/outgoing/www.broadcom.com/support/802.11/linux_sta.php?referer=');">http://www.broadcom.com/support/802.11/linux_sta.php</a></p>
<p>Follow the instructions in the README.txt file which is on same page.</p>
<p>After you have finished installing it the wireless will work, but only until the next reboot. To make this permanent follow these steps:</p>
<p>1. Run:</p>
<pre><code>sudo rmmod ssb</code></pre>
<p>For some reason you cannot blacklist the ssb module. It always runs on boot even if it is in the blacklist.conf file.<br />
After that you need to run this to get rid of the ssb module permanently:</p>
<pre><code>sudo update-initramfs -u</code></pre>
<p>2. Now that we got rid of ssb, we need to make sure that lib80211 is loaded on boot. To do that add lib80211 to the end of the /etc/modules file:</p>
<pre><code>echo "lib80211" | sudo tee -a /etc/modules</code></pre>
<p>I went ahead and added wl to it as well:</p>
<pre><code>echo "wl" | sudo tee -a /etc/modules</code></pre>
<p>So the /etc/modules file looks like this:</p>
<pre><code>
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
lp
rtc
lib80211
wl
</code></pre>
<p>3. Now we need to make sure that &#8220;insmod wl.ko&#8221; as specified in the README.txt file runs every time we boot. There might be a better way to do this but I just added it to the /etc/rc.local file.</p>
<p>Before I did this I copied the wl.ko file to the /lib/modules/2.6.31-14-generic/kernel/lib directory. This way we can get rid of the source files we downloaded from the Broadcom site along with the binaries we compiled and not worry about losing the wl.ko file:</p>
<pre><code>sudo cp wl.ko  /lib/modules/2.6.31-14-generic/kernel/lib</code></pre>
<p>Then add the line &#8220;insmod /lib/modules/2.6.31-14-generic/kernel/lib/wl.ko&#8221; at the end of the rc.local file, right above the exit 0 line:</p>
<pre><code>sudo gedit /etc/rc.local</code></pre>
<p>Here is how the rc.local file looks:</p>
<pre><code>cat /etc/rc.local

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

insmod /lib/modules/2.6.31-14-generic/kernel/lib/wl.ko
exit 0
</code></pre>
<p>4. Last step is to pin down the linux kernel so that we don&#8217;t upgrade the kernel accidentally along with the other updates:</p>
<p>System -> Administration -> Synaptic Package Manager</p>
<p>Then click on the &#8220;Status&#8221; button and select &#8220;Installed&#8221;. Then search for &#8220;linux-&#8221;. Select all packages that start with &#8220;linux-&#8221; and then Package -> Lock Version.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/broadcom-wireless-chipset-bcm4311-bcm4312-bcm4321-and-bcm4322-on-ubuntu-karmic/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>When a Linux User Buys Apple</title>
		<link>http://dimitar.me/when-a-linux-user-buys-apple/</link>
		<comments>http://dimitar.me/when-a-linux-user-buys-apple/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 20:00:11 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MacOS X]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=717</guid>
		<description><![CDATA[I just came upon two articles by Thomas Driemeyer. The author seems to be very sincere in his attempt to describe his experiences in switching from Linux to Apple (and subsequently back) and his good sense of humor makes the reading pleasant and amusing: When a Linux user buys Apple&#8217;s Mac mini When an Apple [...]]]></description>
			<content:encoded><![CDATA[<p>I just came upon two articles by Thomas Driemeyer. The author seems to be very sincere in his attempt to describe his experiences in switching from Linux to Apple (and subsequently back) and his good sense of humor makes the reading pleasant and amusing:</p>
<p><a href="http://bitrot.de/macswitch.html" onclick="pageTracker._trackPageview('/outgoing/bitrot.de/macswitch.html?referer=');">When a Linux user buys Apple&#8217;s Mac mini</a></p>
<p><a href="http://bitrot.de/macswitchback.html" onclick="pageTracker._trackPageview('/outgoing/bitrot.de/macswitchback.html?referer=');">When an Apple Mac mini user gets disenchanted</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/when-a-linux-user-buys-apple/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clone Disk Drives with Ubuntu. Make an Exact Copy of Your Hard Drive.</title>
		<link>http://dimitar.me/clone-disk-drives-with-ubuntu/</link>
		<comments>http://dimitar.me/clone-disk-drives-with-ubuntu/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 05:16:02 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=660</guid>
		<description><![CDATA[Before I start, I would like to clarify that this step by step tutorial applies not only to duplicating hard drives that have Linux OS on them. You can clone pretty much any drive. What is on the hard disk is irrelevant; it could be Windows, Mac OS, Linux, just data, etc. There have to [...]]]></description>
			<content:encoded><![CDATA[<p>Before I start, I would like to clarify that this step by step tutorial applies not only to duplicating hard drives that have Linux OS on them. You can clone pretty much any drive. What is on the hard disk is irrelevant; it could be Windows, Mac OS, Linux, just data, etc. There have to be just a few basic things in place:</p>
<ol>
<li>The target drive should be the same size or bigger than the source disk drive.</li>
<li>Have a Linux Live CD or a Linux bootable USB drive or some other way of booting into Linux (we will be using Ubuntu&#8217;s Live CD for this tutorial).</li>
<li>Access to the internet.</li>
<li>There is a presumption that you know how to install a hard drive.</li>
</ol>
<p>Making an exact copy of a hard drive (or any drive for that matter &#8211; CD, DVD, USB, etc.) is very easy and quick with Linux. One of the most popular commands on Linux to do this is <em>dd</em>. It is a very powerful utility that was originally developed for the UNIX operating system and is now default on every Linux distribution. It does a bit for bit copy of the data and it does not care about cylinders, partitions or files. Here is an example of a dd command that would make an exact copy of one disk to another:</p>
<p><em>dd if=/dev/sda of=/dev/sdb bs=64k</em></p>
<p>The <em>bs</em> option specifies the block size and it could be omitted, but it would speed up the process since the default block size is only 512 bits. <em>dd </em>is very effective and powerful command but it is not very suitable when you are trying to make a copy of a failing or failed disk. <em>dd</em> is not designed to read and recover bad sectors.</p>
<p>There are a number of other open source programs developed since <em>dd</em> (<em>dd</em> variants) that would address situations where there might be some bad drive sectors and they perform faster and more efficient than dd. Some of those are: <em>dd_rescue</em>, <em>dd_rhelp</em> and <em>GNU ddrescue</em>. <em>GNU ddrescue</em> is the one that I would recommend using if you want to clone a drive. It works both for a perfectly good drives that you would like to clone and for failed drives that you would want to recover data from.</p>
<p><strong>Install the new drive.</strong></p>
<p>The new drive should be of the same or bigger size. You might have to get the BIOS to recognize the new disk; in most cases that is not necessary. After you have put the drive in, boot into Linux from another device. An Ubuntu Live CD would be perfect for that. You can download an ISO image from <a href="http://www.ubuntu.com/getubuntu/download" onclick="pageTracker._trackPageview('/outgoing/www.ubuntu.com/getubuntu/download?referer=');">here</a>.</p>
<p>Now you have to find out what the drives&#8217; logical names are. Open up a terminal window: <em>Accessories -&gt; Terminal</em> or<em> Alt + F2</em>, then type in <em>gnome-terminal</em> and hit Enter.<br />
In the terminal window type <em>sudo lshw -C disk</em>:</p>
<pre><code>
sudo lshw -C disk
  *-disk:0
       description: ATA Disk
       product: WDC WD400BB-75FJ
       vendor: Western Digital
       physical id: 0
       bus info: scsi@0:0.0.0
       logical name: /dev/sda
       version: 14.0
       serial: WD-WMAJA3488275
       size: 37GiB (40GB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5 signature=000b280f
  *-disk:1
       description: ATA Disk
       product: ST340016A
       vendor: Seagate
       physical id: 1
       bus info: scsi@0:0.1.0
       logical name: /dev/sdb
       version: 3.75
       serial: 3HS63J2C
       size: 37GiB (40GB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5 signature=000b280f
  *-cdrom:0
       description: SCSI CD-ROM
       physical id: 2
       bus info: scsi@1:0.0.0
       logical name: /dev/cdrom
       logical name: /dev/scd0
       logical name: /dev/sr0
       capabilities: audio
       configuration: status=nodisc
</code></pre>
<p>In my case I have two disks- <em>disk:0</em> and <em>disk:1</em>. The logical name of <em>disk:0</em> is <em>/dev/sda</em> and the one for the second disk is <em>/dev/sdb</em>. Make a note of that. In your case that might be different. Identify which drive will be the source and which one the copy. There are 2 things in the above output that will help you do that- the <em>product</em> and the <em>size</em>. You can also use the command <em>sudo fdisk -l</em>. It will show you the hard drives and their partitions.</p>
<p><strong>Prepare the target drive.</strong></p>
<p>Now that you have identified the target drive you need to put an initial partition on it. In the terminal window you have opened execute:</p>
<pre><code>cfdisk -z /dev/sdb</code></pre>
<p>The cfdisk program will start, then type <em>W</em> and then <em>yes</em> to confirm. This is simple enough but you could also use the GParted program that comes with Ubuntu to do the same.</p>
<p><strong>Install the GNU ddrescue program</strong></p>
<p>Before you can install ddrescue you need to enable the Universe Software Repository. Go to <em>System -&gt; Administration -&gt; Software Sources</em> and then check the box next to &#8220;<em>Community-maintained Open Source software (universe)</em>&#8220;. Close the window. It will ask you to whether you want to refresh the list of software- go ahead and agree to that. After it finishes you can install <em>ddrescue</em> by running this in the terminal window:</p>
<pre><code>sudo apt-get install gddrescue</code></pre>
<p><strong>Clone the disk.</strong></p>
<p>Now you are ready to clone the drive by executing <em>ddrescue</em>. Specify the source disk first and then the target disk. You can use the -v option to be able to see the progress of the operation:</p>
<pre><code>sudo ddrescue -v /dev/sda /dev/sdb</code></pre>
<p><em>Make sure you get the order of the drives right or you could overlay the old drive with the new drive and loose all the data!</em></p>
<p>Depending on the size of your source drive this operation could take a couple of hours or even more. Once it finishes the new drive will be an exact copy of the old one. You can run a quick check on the file systems of the new drive:</p>
<pre><code>e2fsck -fp /dev/sdb1</code></pre>
<p>If the new drive is bigger than the old one you need to extend the partition(s) on it or create another one to make use of the rest of the space. The GParted program that comes with Ubuntu is ideal for this.</p>
<p>Once you are done, remove the old drive and boot from the new disk.</p>
<p>Credit: <a href="http://www.amazon.com/exec/obidos/asin/1934356220/vasoft-20" onclick="pageTracker._trackPageview('/outgoing/www.amazon.com/exec/obidos/asin/1934356220/vasoft-20?referer=');">Ubuntu Kung Fu</a>. <a href="http://www.linux.com/learn/tutorials/8225-clone-your-ubuntu-installation-onto-a-new-hard-disk" onclick="pageTracker._trackPageview('/outgoing/www.linux.com/learn/tutorials/8225-clone-your-ubuntu-installation-onto-a-new-hard-disk?referer=');">Published article from the book</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/clone-disk-drives-with-ubuntu/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
