<?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>Coding My Thoughts &#187; Ubuntu</title>
	<atom:link href="http://marianoiglesias.com.ar/category/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://marianoiglesias.com.ar</link>
	<description>A glimpse at a coder&#039;s troubled mind</description>
	<lastBuildDate>Tue, 03 Jan 2012 16:16:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Book meme</title>
		<link>http://marianoiglesias.com.ar/ubuntu/book-meme/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=book-meme</link>
		<comments>http://marianoiglesias.com.ar/ubuntu/book-meme/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 16:19:00 +0000</pubDate>
		<dc:creator>mariano</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://marianoiglesias.com.ar/1/book-meme/</guid>
		<description><![CDATA[Picking up the meme from jono and matthew, here&#8217;s my meme: &#8220;a state of emergency became the rule&#8221; &#8211; The Dachau Concentration Camp, 1933 to 1945 Grab the nearest book. Open it to page 56. Find the fifth sentence. Post the text of the sentence in your journal along with these instructions. Don&#8217;t dig for [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<div>
<p>
Picking up the meme from <a href="http://www.jonobacon.org/?p=1378" rel="nofollow" >jono</a> and <a href="http://matthewhelmke.net/wordpress/2008/11/11/book-meme/" rel="nofollow" >matthew</a>, here&#8217;s my meme:
</p>
<p><cite>&#8220;a state of emergency became the rule&#8221;</cite> &#8211; The Dachau Concentration Camp, 1933 to 1945</p>
<ol>
<li>Grab the nearest book.</li>
<li>Open it to page 56.</li>
<li>Find the fifth sentence.</li>
<li>Post the text of the sentence in your journal along with these instructions.</li>
<li>Don&#8217;t dig for your favorite book, the cool book, or the intellectual one: pick the CLOSEST.</li>
</ol>
</div>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://marianoiglesias.com.ar/ubuntu/book-meme/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MySQL update puts my box to test</title>
		<link>http://marianoiglesias.com.ar/ubuntu/mysql-update-puts-my-box-to-test/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mysql-update-puts-my-box-to-test</link>
		<comments>http://marianoiglesias.com.ar/ubuntu/mysql-update-puts-my-box-to-test/#comments</comments>
		<pubDate>Fri, 29 Aug 2008 21:01:00 +0000</pubDate>
		<dc:creator>mariano</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://marianoiglesias.com.ar/1/mysql-update-puts-my-box-to-test/</guid>
		<description><![CDATA[Wanna test your box performance, both its hard disk and memory? Try setting up a +370 table database, and then build a huge MySQL update file. Run it and get something like this: No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<div>
<p>Wanna test your box performance, both its hard disk and memory? Try setting up a +370 table database, and then build a huge MySQL update file. Run it and get something like this:</p>
<p align="center"><a href="http://cricava.com/blogs/media/el_eternauta/posts/MysqlUpdatePerformance.png" rel="nofollow" ><img src="http://cricava.com/blogs/media/el_eternauta/posts/MysqlUpdatePerformance-thumb.png" border="0" width="500" height="313" /></a></p>
</div>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://marianoiglesias.com.ar/ubuntu/mysql-update-puts-my-box-to-test/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Firefox is a hungry mother!</title>
		<link>http://marianoiglesias.com.ar/ubuntu/firefox-is-a-hungry-mother/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=firefox-is-a-hungry-mother</link>
		<comments>http://marianoiglesias.com.ar/ubuntu/firefox-is-a-hungry-mother/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 15:12:00 +0000</pubDate>
		<dc:creator>mariano</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://marianoiglesias.com.ar/1/firefox-is-a-hungry-mother/</guid>
		<description><![CDATA[Here I&#8217;m working with my humble Dual Processor, 2 GB RAM running Ubuntu 8.04.1, AMD64 edition. I was talking to a colleague / friend of mine and he told me that he (with his 7 GB RAM on a Mac OS) has his firefox eating some 750 MB. So I decided to see how much [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>Here I&#8217;m working with my humble Dual Processor, 2 GB RAM running Ubuntu 8.04.1, AMD64 edition. I was talking to a colleague / friend of mine and he told me that he (with his 7 GB RAM on a Mac OS) has his firefox eating some 750 MB. So I decided to see how much memory was firefox eating on my box. I run this command:</p>
<pre class="brush:bash">ps -C "firefox" -o pid=,vsz=,rss= | awk '{ printf "PID: %d, Virtual: %-.2f MB, Resources: %-.2f MB\n", $1, $2 / 1024, $3 / 1024 }'</pre>
<p>And I got:</p>
<pre class="brush:text">PID: 6223, Virtual: 778.06 MB, Resources: 403.70 MB</pre>
<p>And I had just a couple of tabs open. So I said, ok, let&#8217;s start fresh. Here&#8217;s the same command with a firefox with just an about:blank, having just started up:</p>
<pre class="brush:text">PID: 9139, Virtual: 462.02 MB, Resources: 56.34 MB</pre>
<p>Nice to see resources drop, but Virtual is still at over 450 MB. Why oh why are you so hungry, dear firefox?</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://marianoiglesias.com.ar/ubuntu/firefox-is-a-hungry-mother/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>My top 10 commands for July, 2008</title>
		<link>http://marianoiglesias.com.ar/ubuntu/my-top-10-commands-for-july-2008/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=my-top-10-commands-for-july-2008</link>
		<comments>http://marianoiglesias.com.ar/ubuntu/my-top-10-commands-for-july-2008/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 14:30:00 +0000</pubDate>
		<dc:creator>mariano</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://marianoiglesias.com.ar/1/my-top-10-commands-for-july-2008/</guid>
		<description><![CDATA[Taking inspiration from earobinson&#8217;s top commands, I&#8217;ve decided to publish my own list of top 10 commands. Running the following command: history &#124; awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}' &#124; sort -rn &#124; head Brings the following list of top 10 commands: 66 ls 40 sudo 37 cd 36 httperf 36 [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>Taking inspiration from <a href="http://www.earobinson.org/2008/04/10/my-top-10-commands-20/" rel="nofollow" >earobinson&#8217;s top commands</a>, I&#8217;ve decided to publish my own list of top 10 commands. Running the following command:</p>
<pre class="brush:bash">history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}' | sort -rn | head</pre>
<p>Brings the following list of top 10 commands:</p>
<pre class="brush:bash">66 ls
40 sudo
37 cd
36 httperf
36 exit
31 svn
18 mysql
17 ssh
17 chmod
15 ./amreg-vpn.sh</pre>
<p>Only custom script there is amreg-vpn.sh, which looks like the following:</p>
<pre class="brush:bash">if [ "$1" == "" ]
then
	echo "Usage: $0 &lt;start | stop&gt;"
else
	case $1 in
	start)
		echo "Starting VPN..."
		sudo vpnc /etc/vpnc/amreg.conf --natt-mode natt --dpd-idle 0
	;;
	stop)
		echo "Stopping VPN..."
		sudo vpnc-disconnect
	;;
	*)
		echo "Usage: $0 &lt;start | stop&gt;"
	;;
	esac
fi</pre>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://marianoiglesias.com.ar/ubuntu/my-top-10-commands-for-july-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wine rocks my world</title>
		<link>http://marianoiglesias.com.ar/ubuntu/wine-rocks-my-world/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wine-rocks-my-world</link>
		<comments>http://marianoiglesias.com.ar/ubuntu/wine-rocks-my-world/#comments</comments>
		<pubDate>Mon, 07 Jul 2008 10:39:00 +0000</pubDate>
		<dc:creator>mariano</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://marianoiglesias.com.ar/1/wine-rocks-my-world/</guid>
		<description><![CDATA[Ubuntu is probably the best Linux distribution out there, but sometimes you need to use software that&#8217;s only available on Windows. What do you do? Give Wine a chance. As its website states, Wine is a free implementation of Windows on Unix. Installation on Ubuntu is pretty straight forward, so you should not have problems [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<div>
<p>Ubuntu is probably the best Linux distribution out there, but sometimes you need to use software that&#8217;s only available on Windows. What do you do? Give <a href="http://www.winehq.org" rel="nofollow" >Wine</a> a chance. As its website states, Wine is a free implementation of Windows on Unix. Installation on Ubuntu is <a href="http://www.winehq.org/site/download-deb" rel="nofollow" >pretty straight forward</a>, so you should not have problems installing it.</p>
<p align="center"><a href="http://cricava.com/blogs/media/el_eternauta/posts/wine.png" rel="nofollow" ><img src="http://cricava.com/blogs/media/el_eternauta/posts/wine-thumb.png" border="0" width="500" height="313" /></a></p>
<p>The above screenshot shows <a href="http://sourceforge.net/projects/wincachegrind/" rel="nofollow" >Wincachegrind</a> working through Wine. Eventhough there&#8217;s a KDE version (haven&#8217;t looked for GNOME, which I run), I really needed the Windows version as it offers far more information than its Linux counterparts. With Wine, I installed the package with no problems, and I&#8217;m now using it as if it was a native Linux application. Awesome!</p>
</div>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://marianoiglesias.com.ar/ubuntu/wine-rocks-my-world/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Transparent Pidgin chat windows</title>
		<link>http://marianoiglesias.com.ar/ubuntu/transparent-pidgin-chat-windows/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=transparent-pidgin-chat-windows</link>
		<comments>http://marianoiglesias.com.ar/ubuntu/transparent-pidgin-chat-windows/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 18:43:00 +0000</pubDate>
		<dc:creator>mariano</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://marianoiglesias.com.ar/1/transparent-pidgin-chat-windows/</guid>
		<description><![CDATA[If you have Ubuntu with the Compiz effects enabled, it&#8217;s pretty easy to control which application windows you want with some transparency. On this post I&#8217;ll show you how to set your Pidgin windows with a 90% opacity. Go to the Compiz settings manager by clicking System -&#62; Preferences -&#62; Advanced Desktop Effects Settings. On [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<div>
<p>If you have Ubuntu with the Compiz effects enabled, it&#8217;s pretty easy to control which application windows you want with some transparency. On this post I&#8217;ll show you how to set your Pidgin windows with a 90% opacity. Go to the Compiz settings manager by clicking System -&gt; Preferences -&gt; Advanced Desktop Effects Settings. On the window that shows up, click on the General category at the left category list, and then click on the General Options button at the right. Select the Opacity Settings tab. A screen similar to the following will appear:</p>
<p align="center"><img src="http://cricava.com/blogs/media/el_eternauta/posts/CompizConfigSettingsManager.png" border="0" width="600" height="364" /></p>
<p>We will create an Opacity setting for windows that match a certain condition. Click on the button New shown right below the Window Opacities list, and enter the following details for each shown field, and then click the Close button:</p>
<ul>
<li>
<p>Opacity windows: <strong><code>class=Pidgin &amp; !title=Buddy List</code></strong></p>
</li>
<li>
<p>Opacity window values: <strong><code>90</code></strong></p>
</li>
</ul>
<p>We&#8217;ve just specified that we want 90% opacity for all windows that have &#8220;Pidgin&#8221; at its class, but do not have &#8220;Buddy List&#8221; as a title. As you see, this procedure is not limited to Pidgin windows, so you can <a href="http://wiki.compiz-fusion.org/WindowMatching" rel="nofollow" >learn from the windows matching rules</a> to apply different settings to different windows.</p>
<p>Thanks to Ryan for <a href="http://arstechnica.com/journals/linux.ars/2007/11/08/configuring-conditional-window-transparency-in-compiz" rel="nofollow" >this post</a>.</p>
</div>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://marianoiglesias.com.ar/ubuntu/transparent-pidgin-chat-windows/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Show what music you are playing on Pidgin</title>
		<link>http://marianoiglesias.com.ar/ubuntu/show-what-music-you-are-playing-on-pidgin/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=show-what-music-you-are-playing-on-pidgin</link>
		<comments>http://marianoiglesias.com.ar/ubuntu/show-what-music-you-are-playing-on-pidgin/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 07:40:00 +0000</pubDate>
		<dc:creator>mariano</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://marianoiglesias.com.ar/1/show-what-music-you-are-playing-on-pidgin/</guid>
		<description><![CDATA[So you want the world to know what cool tunes you are currently listening to on your Ubuntu? Well, perhaps not the whole world, but at least your IM contacts. First thing you need is to be using Pidgin, and your favorite music player (I use Rhythmbox), since we will install a plugin to link [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<div>
<p>So you want the world to know what cool tunes you are currently listening to on your Ubuntu? Well, perhaps not the whole world, but at least your IM contacts. First thing you need is to be using Pidgin, and your favorite music player (I use Rhythmbox), since we will install a plugin to link our music player to our messenger. Open the Synaptic Package Manager (System -&gt; Administration -&gt; Synaptic Package Manager), click the button Search, and enter &#8220;pidgin-musictracker&#8221;. Right click on the available package (it should be just one), and select &#8220;Mark for Installation&#8221;. Click Apply.</p>
<p>If you are already running Pidgin, restart it. Once it has started, click on the Tools menu, option Plugins. Look for &#8220;MusicTracker&#8221;. Enable it by clicking on the checkbox. You can optionally select it and click on Configure Plugin to have more fun. That&#8217;s it!</p>
</div>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://marianoiglesias.com.ar/ubuntu/show-what-music-you-are-playing-on-pidgin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My desktop: Windows XP on Ubuntu through VMWare</title>
		<link>http://marianoiglesias.com.ar/ubuntu/my-desktop-windows-xp-on-ubuntu-through-vmware/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=my-desktop-windows-xp-on-ubuntu-through-vmware</link>
		<comments>http://marianoiglesias.com.ar/ubuntu/my-desktop-windows-xp-on-ubuntu-through-vmware/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 19:18:00 +0000</pubDate>
		<dc:creator>mariano</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://marianoiglesias.com.ar/1/my-desktop-windows-xp-on-ubuntu-through-vmware/</guid>
		<description><![CDATA[Since I normally need to test different applications (almost all of them built with CakePHP) to make sure they work on different browsers (including IE7), I&#8217;ve recently installed VMWare over my Ubuntu Hardy to use Windows XP. This is how my desktop looks like when running it (click on the image to get the larger [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<div>
<p>Since I normally need to test different applications (almost all of them built with <a href="http://www.cakephp.org" rel="nofollow" >CakePHP</a>) to make sure they work on different browsers (including IE7), I&#8217;ve recently installed VMWare over my Ubuntu Hardy to use Windows XP. This is how my desktop looks like when running it (click on the image to get the larger version):</p>
<p align="center"><a href="http://cricava.com/blogs/media/el_eternauta/posts/VmWareUbuntu.png" rel="nofollow" ><img src="http://cricava.com/blogs/media/el_eternauta/posts/VmWareUbuntu-thumb.png" border="0" width="500" height="313" /></a></p>
<p>You can see the excellent <a href="http://htop.sourceforge.net/" rel="nofollow" >htop</a> command showing that for some reason at that precise moment my Processor #1 was at 100% while Processor #2 was resting at a 15% <img src='http://marianoiglesias.com.ar/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
</div>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://marianoiglesias.com.ar/ubuntu/my-desktop-windows-xp-on-ubuntu-through-vmware/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Simple backup script for Ubuntu</title>
		<link>http://marianoiglesias.com.ar/ubuntu/simple-backup-script-for-ubuntu/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=simple-backup-script-for-ubuntu</link>
		<comments>http://marianoiglesias.com.ar/ubuntu/simple-backup-script-for-ubuntu/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 11:10:00 +0000</pubDate>
		<dc:creator>mariano</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://marianoiglesias.com.ar/1/simple-backup-script-for-ubuntu/</guid>
		<description><![CDATA[Trying to prevent myself from another home fiasco, I&#8217;ve decided to build a simple script to backup some of my directories. There are a lot of scripts / backup tools out there, but I just wanted to build my own for the fun of it, and since what I really wanted was to create a [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>Trying to prevent myself from another <a href="http://marianoiglesias.com.ar/ubuntu/delete-files-from-command-line-to-trash-in-ubuntu-8-04/">home fiasco</a>, I&#8217;ve decided to build a simple script to backup some of my directories. There are a lot of scripts / backup tools out there, but I just wanted to build my own for the fun of it, and since what I really wanted was to create a tar.gz of the contents of a specific directory (no root path), including hidden files, and without the need to support incremental backups. Take a look at the script:</p>
<pre class="brush:bash">#!/bin/bash

function showHelp() {
	if [ "$1" != "" ]; then
		echo "ERROR: $1"
		echo ""
	fi

	echo "Usage: $0 &lt;folder&gt; &lt;file.tar.gz&gt;"
	echo "where:"
	echo "	&lt;folder&gt;	folder to backup"
	echo "	&lt;file.tar.gz&gt;	where to save the backup (.tar.gz file)"
}

if [ $# -ne 2 ]; then
	showHelp
elif [ ! -d "$1" ]; then
	showHelp "Directory $1 does not exist"
	exit 1
else
	echo -n "Creating $2 from $1: "

	if [ -f "$2" ]; then
		mv "$2" "$2.previous"
	fi

	tar -cpzf "$2" --exclude="$2" --ignore-failed-read --transform="s/"`echo "$1" | sed -e 's/^\\///g' | sed -e 's/\\/$//g' | sed s/\\\//'\\\\'\\\//g`"//" "$1" &amp;&gt;/dev/null

	if [ $? -ne 0 ]; then
		echo "ERROR"
		exit 1
	else
		echo "DONE"

		if [ -f "$2.previous" ]; then
			rm -f "$2.previous"
		fi
	fi
fi</pre>
<p>The line that probably looks scary is:</p>
<pre class="brush:bash">tar -cpzf "$2" --exclude="$2" --ignore-failed-read --transform="s/"`echo "$1" | sed -e 's/^\\///g' | sed -e 's/\\/$//g' | sed s/\\\//'\\\\'\\\//g`"//" "$1" &amp;&gt;/dev/null</pre>
<p>The complicated part comes from the transform expression, which is used to get rid of the absolute path to the directory we are backing up. The tar &#8211;directory option here is not useful since it adds the &#8220;.&#8221; special path to the packaged file, so let&#8217;s break it down:</p>
<ul>
<li><code>echo "$1"</code>: the folder to backup</li>
<li><code>sed -e 's/^\\///g'</code>: remove starting slash, if any</li>
<li><code>sed -e 's/\\/$//g'</code>: remove trailing slash, if any</li>
<li><code>sed s/\\\//'\\\\'\\\//g`</code>: convert forward slash to escaped slashes (so every / is replaced by \/)</li>
</ul>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://marianoiglesias.com.ar/ubuntu/simple-backup-script-for-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Delete files from command line to Trash in Ubuntu 8.04</title>
		<link>http://marianoiglesias.com.ar/ubuntu/delete-files-from-command-line-to-trash-in-ubuntu-8-04/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=delete-files-from-command-line-to-trash-in-ubuntu-8-04</link>
		<comments>http://marianoiglesias.com.ar/ubuntu/delete-files-from-command-line-to-trash-in-ubuntu-8-04/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 21:14:00 +0000</pubDate>
		<dc:creator>mariano</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://marianoiglesias.com.ar/1/delete-files-from-command-line-to-trash-in-ubuntu-8-04/</guid>
		<description><![CDATA[I should&#8217;ve probably entitled this post &#8220;Learn from your mistakes&#8221;. Yesterday I was getting rid of the Windows partition in favor of a VMWare installation of Windows XP on my Ubuntu Hardy Heron (8.04) so I decided it was time to reclaim the space used by Windows and use it for my home partition. No [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>
I should&#8217;ve probably entitled this post &#8220;Learn from your mistakes&#8221;. Yesterday I was getting rid of the Windows partition in favor of a VMWare installation of Windows XP on my Ubuntu Hardy Heron (8.04) so I decided it was time to reclaim the space used by Windows and use it for my home partition. No biggie, I did everything right, and fast. Wait, so fast that I didn&#8217;t notice a big boo-boo:
</p>
<pre class="brush:bash">
$ rm -fR /var/backups/home/mariano; rm -fR /home/mariano.old; rm -fR /home/mariano
</pre>
<p>
&#8220;You did what??&#8221; You ask.. Yup, that&#8217;s right, I wiped not only my Home directory, but every single backup copy I had of it. Granted, I didn&#8217;t have *much* on my home folder (except my evolution mail folders and some other documents), but I still wanted to shoot my hands for insisting in adding -fR to my rm commands (-fR means: delete recursively, and no, do not ask me for confirmation.)
</p>
<p>
So after trying without any luck to recover the deleted inodes, I&#8217;ve successfully re-setup my home folder starting fresh, which wasn&#8217;t so bad. In order not to mess up again, I&#8217;ve decided to add this little alias to my ~/.bashrc file:
</p>
<pre class="brush:bash">
# alias to make del send files to trash

alias del='mv -t ~/.local/share/Trash/files --backup=t'
</pre>
<p>
So from now on, I just need to remember to use &#8220;del&#8221; instead of &#8220;rm&#8221;, like so:
</p>
<pre class="brush:bash">
$ del example.txt
</pre>
<p>
The above command would send example.txt to the trash, instead of wiping it out from the file system. You can later on decide to Empty the trash in your Desktop, or undelete your files. The del alias also works for folders.</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://marianoiglesias.com.ar/ubuntu/delete-files-from-command-line-to-trash-in-ubuntu-8-04/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced (User agent is rejected)
Database Caching 12/65 queries in 0.024 seconds using disk: basic
Object Caching 1847/1974 objects using disk: basic

Served from: marianoiglesias.com.ar @ 2012-02-03 23:40:39 -->
