linux

Linux: delete files for a given year

After a short conversation with my friend and colleague Carlos Limpinho about how to delete files from a given year within a directory when ls doesn’t output the year for the modification date, I suggested the following solution based on a bash statement (example for 2010):

for f in *; do if [ `stat --format %y $f|cut -d "-" -f1` -eq 2010 ]; then rm $f; fi; done

Another possible solution would be to use find but the time options require one to calculate the days and make a range.
Feel free to comment and share if you have other solutions.

I moved on to Fedora

It happened. After years of Debian and Ubuntu I changed my personal laptop’s Linux distribution to Fedora.

Why I changed to Fedora

  • GNOME 3! GNOME 3′s integration in Fedora 15 (beta) was the best around, in my humble opinion. The Ubuntu + GNOME 3 ppa wasn’t a satisfying solution;
  • I needed the challenge. For sure that I can still learn with a debian based system but I have much more to learn with a rpm based system at the moment;
  • Fedora package upstream;
  • It wasn’t because Ubuntu is a bad Linux distribution. I still think it’s great, I still use it on my work laptop and I will still advise people to use it.

Two days have passed since I changed to Fedora and I can say that yum doesn’t let me miss apt-get. It seams like a very complete and robust package manager.

In Ubuntu things were kind of automatic, I knew which files I had to tweak after each install, how to add repositories, etc.

Things I usually do after a fresh install:

  • Update the system;
  • Install the usual apps;
  • Tweak the system to my needs.

Here’s a detailed guide of what I did in Fedora, might come in handy for some other newb like me:

  • System update using Software Update (Apps, System Tools in GNOME Shell);
  • Install extra repositories (Free and Nonfree);
    • RPM Fusion
    • Install the downloaded rpm’s (rpm -ivh FILE.rpm)
  • I use Chromium (Google Chrome) so I installed it next. Followed the guide available in the Fedora Project wiki;
  • I also followed the guide available in the wiki to install Flash Player;
    • The page has lots of info, so for you lazy guys on a x86_64 system, follow this link
  • Installing the equivalent to ubuntu-restricted-extras package;
    • I followed the info available in this page (it’s in Portuguese)
    • Getting the fonts right. Specially in the browser.
      • yum localinstall http://fedora.missingbox.co.nz/core-fonts.rpm –nogpgcheck
      • yum install freetype-freeworld
      • I also had to add to .fonts.conf (~/.fonts.conf) some lines. Because it’s a XML file, it’s easier for you to download it: .fonts.conf
  • Installed all the software I normally use…

And that was all. Everything after was absolutely normal…

WD Scorpio Black 320GB

I didn’t buy myself any birthday present this year and since Google has been so generous with me, accepting me for SoC and paying the first $505… I bought a new hard drive for my laptop (sony vaio fw). What I really needed was a external hard drive but I thought to myself, what the heck, I’ll buy a new hard drive for the laptop and pass the old drive to a external case. That was exactly what I did! I bought the WD Scorpio Black 320GB, a 320 GB, SATA 3 Gb/s, 16 MB Cache, 7200 RPM hard drive!
I’m not expecting any miracle, it’s just a nice upgrade. :)
Here’s a picture of the new and the old hard drive:

DSC00751

The bad part of this history:
It took two days for the hard drive to arrive at my home, It arrived today by 08:45 (am). I had a all morning battle with Windows Vista/7. The f* thing just wouldn’t install! I always got the error code 0×80070017, I burned 4 DVDs at different speeds, 2 at the lowest speed possible. It reminded me of my first CD burner.. anyway, no go! The solution was to install unetbootin on Ubuntu and burn a Windows ISO to my pen drive. Then it worked. Once again linux proves it self to be a life savior!

By the way, you may be thinking “WTF! Why spend any time installing Windows?!”. Sometimes I join a group of friends (about 10 of them) to play some lan games and relax a bit. This is the only reason for me to have windows on my machine and spending all morning trying and trying…

PS: Thanks to Google

My two cents about pidgin

pidginavatarlarge2The most used instant message network in Portugal is MSNP (MSN Messenger). That fact doesn’t bother me that much. What bothers me is the lack of compatibility between the linux msn messenger clients and the windows one (the __original__ one).

Pidgin is a universal chat client. It supports many instant messaging protocols like for example IRC and jabber and it also supports MSNP (the MSN Messenger protocol). Although it supports MSNP I have the sensation that the pidgin team despises MSNP. I say this because pidgin hasn’t evolved as much as it should or as much as I think it should have.

There are two features that I use with my friends, the file transfer and the webcam/video. The webcam/video I don’t use much but I like to think that I can use it when I want to. The file transfer I use allot, almost every day, and recently when almost every one on my contact list started to use Windows Live Messenger 2009 I started to have trouble sending/receiving files.. which sucked.

The solution for my main problem was to install msn-pecan. It’s a plug-in for pidgin that implements some MSNP features that pidgin doesn’t support.

While reading the msn-pecan FAQ I confirmed what I was thinking about the pidgin developer team, they have some problems/issues.
The lack of support for MSNP (pidgin or others) is also bad for the linux community. I have seen people going back to windows because they can’t do the things they are used to do with there MSN Messenger contacts.

Good alternatives for pidgin (MSNP) are empathy and emesene.

For know I’m sticking with pidgin but I hope that empathy evolves quickly, it looks like a really good project.
A comparsion of instant messaging protocols, enjoy.

New Ubuntu 9.04 Jaunty Jackalope

Yesterday the new Ubuntu was released. Its know as Ubuntu Jaunty Jackalope.

I had the opportunity to test it yesterday. It looks greate and has some goode new features that I really apreciate but what impressed me allot was the boot time. It just flys to GDM.

Sadly it has some glitches with my Sony Vaio FW. Compiz goes slow with my ATI Mobility Radeon HD 3470 and by default the brightness control does not work (needs a kernel patch).

I also had the sensation that the hole system was a little slow, slower than on 8.10.

So for me it’s back to 8.10.