Sunday, May 16, 2010

OpenJDK or Sun's JDK?

Did you just install Ubuntu and noticed that OpenJDK is the default Java Virtual Machine? I have nothing against OpenJDK but some programs require the Sun version.

The good news is that you don't have remove neither of them cause both can live happily next to each other and all it takes to switch from one version to another is the following command:

sudo update-alternatives --config java 

Wednesday, May 12, 2010

Number of files and folders in a Linux folder

Recently I transfered a folder with big a mount of archives and something seemed to be missing, obviously I wanted to verify that the amount of files was correct and probably just like you, I couldn't find a simple Linux command to help me with this, in fact I found crazy commands like:

"echo $(($(ls -l | grep -v ^d | wc -l)-1))"

Until I found the simple and elegant "tree", if you don't have it already just run a simple:

"sudo apt-get install tree"

And then you'll have the simple response you were looking for:

"234 directories, 1786 files"

Simplest way to test mod_rewrite in Apache

Are you looking for a way to test if mod_rewrite is enabled in your Apache server? here is an easy one, create a .htaccess file in a folder like for example "www/rewrite_test_folder" with the following code in it:

Options +FollowSymLinks
RewriteEngine On

Then try to access it via http://localhost/rewrite_test_folder and you should get one of these:

- No errors, mod_rewrite engine is enabled
- 500, Internal Server Error, this means that mod_rewrite was not installed/enabled in your computer

Tuesday, May 4, 2010

First 5 minutes with Kubuntu Lucid Lynx


During the weekend I ran into the news that Lucid Lynx 10.04 LTS, the new upgrade of Ubuntu, was already available. As a Linux fan this is always good news, but at the same time I'm wary about bugs an problems that can delay what I'm doing at the moment or even break something and make my system unusable for a couple of days.
It was time to check the features included in this version and see if they were interesting enough to make me go “lucid”.

It turned out that most of the things were already somehow available for me, but what mainly caught my attention was the new Ubuntu One music store, open for many European countries including Estonia, unfortunately not so sure about Venezuela and other Latin American countries yet.

One of the best things of the store is that it will be synched with Ubuntu One, the cloud storage solution offered by Canonical, which means that all my songs will be available in my work and personal computer automatically. Besides this, if you buy through the store you’ll get to help the Iberian Lynx:

To contribute to the charity all you have to do is buy a track at the normal cost. That's it. Canonical will give away 50% of our take of the revenue up to a total of $1004. You can of course directly contribute to the charity if you prefer.”

After reading all this I decided to go for the upgrade, which took around 7 hours with a 80KB/s average download speed and around 1 hour to install, remove deprecated packages and configure the whole thing. In the end, it was the smoothest upgrade ever! Though I have to warn that some people with dual partition (I removed Windows a while ago) have had problems after reboot, so it might be wise for you to check this out before doing it.

My first impression? Awesomeness! The UI seems more stable and integrated, boot up time reduction is obvious, in general you can feel that it was totally worth doing the upgrade J

So that’s it, I hope this gives you enough interest to give a try to the new Lucid Lynx!