Ubuntu apt-get install error

I tried installing few packages using apt-get on my Ubuntu machine and it kept failing and also the Ubuntu Software Center kept crashing on launch.



Reading package lists… Error!
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/archive.canonical.com_ubuntu_dists_precise_partner_binary-i386_Packages
E: The package lists or status file could not be parsed or opened.

To fixed the issue by deleting all the package lists files inside “/var/lib/apt/lists/” and downloaded the package lists from the repositories and “updated” them to get information on the newest versions of packages and their dependencies (sudo apt-get update).

sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update

This seemed to fix the problem. Not sure what was the reason for the corruption of the files in the first place.


Splitting and joining files in Macintosh and Linux

There are lots of tools available on PC (Windows) for splitting and joining files. There are very few available on Macintosh and Linux. But on Macintosh and Linux we don’t really need a separate tool for splitting and joining files the OS comes with one for us.

Splitting and joining files are pretty straight forward. There are two simple command line tools to do it. In this entire exercise we will be using only 3 command line tools.

1. Change Directory.

cd – change the current working directory to a specific Folder.
cd [-L | -P] [directory]

2. Splitting the File.

split — split a file into pieces
split [-a suffix_length] [-b byte_count[k|m]] [-l line_count]
[-p pattern] [file [name]]

3. Joining the File.

cat — concatenate and print files
cat [-benstuv] [file …]

Lets get down to business and start splitting the file.

File Split
I didn’t have any big file to try the commands on. So I compressed Google Chrome application.

Created Google Chrome Zip File

Get into the folder containing the huge file using cd (change directory) command

cd path/to/the/folder/containing/file
split -b 50m “Google Chrome.app.zip” ChromePieces

“Google Chrome.app.zip” -> Name of the file to be split
ChromePieces -> Prefix of output file name.
-b -> Create smaller files byte_count bytes in length.
50 ->byte_count value.
m -> indicates megabyte pieces. k can be used instead for kilo-byte pieces

Used “split” command to split the file

The zip file size was 93.1 MB. So it ended up creating two files. As can be seen from the image above.

Joining Files

Used “cat” to join the files

cat ChromePieces* > Chrome.zip

We are joining all the files that have prefix file name “ChromePieces” and the resultant file will be created as Chrome.zip

A new (Chrome.zip) file is created.

Unzipped the newly created zip file.

You can unzip the Chrome.zip file and Google Chrome application extracted would work as normal. Split and cat can be used on most of the files. I have tried it on binaries(Application & Installers), Audio and Video Files, Text files.

HDFC Alerts (R) Account Attempt Error User Login

I recently got this mail. It turned out to be fake but it almost caught be unguarded. This is the contents of the mail.


Dear Esteemed Customer,

Your Account has been flagged for Security issues within the last 24 hours. You are hereby mandated to confirm with our customer care your Online Login Information to quickly access this error. To ensure Smooth Banking Operation, You are also informed to correctly fill in your Secure Online Questions and Answers which you had already updated with our Bank upon your Registration.

Please click the link below to verify your account with us.

Click Here To Resolve The Issue

This Notice is strictly for Third Party Account Holders Only.

Thank You
Customers Service

Please endeavour To Open the Your Account Update Link using Internet Explorer 5.5 or Above .

Thank you for using HDFC Bank Ltd !
Copyright© 2010 – HDFC Bank Ltd. All rights reserved.

Information on protecting yourself from fraud, please review the Security Tips in our Security Center.

This is actually a form of phishing.

Phishing is the criminally fraudulent process of attempting to acquire sensitive information such as usernames, passwords and credit card details by masquerading as a trustworthy entity in an electronic communication.

Quoted from Wikipedia.

There were four things which saved me.

1. The mail went to spam section. Credit goes to Google mail(Gmail) for this because unlike Yahoo mail it doesn’t put useful mails into spam. So I trusted Google mail to do its job.

2. On checking the sender email id, I realized it was from commercial Internet domain name (.com) instead of it being .net. All the mails from HDFC bank comes on domain ending with .net. This mail was from “customercare@hdfcbank.com” instead of net“.

3. Importantly I had never received this message despite trying to logging in with wrong passwords, Accidentally of course.

4. The most important point, the URL didn’t work. It was brought down for performing illegal action.

The fourth point also meant I could not see the html file, which also meant the end of the investigation. May be it’s a good thing that I don’t use Windows OS and there is no risk of using Internet Explorer, since the mail requested me to use IE. Somehow using Ubuntu and Macintosh(without Safari) makes me feel a little safer.

If you ever come across such mails be careful, because banks normally don’t ask you to login to Update your Account.

Please make time to go through the link, it contains a list of other spam mails.

Merry Christmas and Happy Holidays!

Ubuntu: Super Cow Powers

When I first thought of using Ubuntu I was warned by some of my friends that it would not be a pleasant experience but I decided to take the plunge. Now after few months of using Ubuntu. I can assure you there weren’t many hassles. On the contrary I found out that Ubuntu has a good sense of humor too. To illustrate it, consider the two commands


They are used for installing and uninstalling software on Ubunu. I was curious to find out the difference between these commands, Since they performed the same task.

First I typed “apt-get” and in the response I received the text “This APT has Super Cow Powers.” caught my eye.

Next I typed “aptitude“. It didn’t give the desired results. So I typed “aptitude -23“(You can type any wrong input) and this time I got another text “This aptitude does not have Super Cow Powers.“.

I dumped what I was looking for and decided to investigate the “Super Cow Powers” and I came across few Easter eggs in apt-get and aptitude. I have listed some of them down for you.

1. Type “apt-get moo

2. Type “aptitude moo

3. Type “aptitude -v moo

4. Type “aptitude -vv moo

5. Type “aptitude -vvv moo

6. Type “aptitude -vvvv moo

7. Type “aptitude -vvvvv moo

8. Type “aptitude -vvvvvv moo

If you want information on difference between apt-get and aptitude visit aptitude versus apt-get. I didn’t discover all the above Easter eggs on my own. I found it in the thread Super Cow Powers vs No Super Cow Powers. Lastly I would like to thank Bharat Pawar was convincing me to find out more about “Super Cow Powers”.

Silly Me

There is something special about Monday mornings. For starters I don’t really feel like working and secondly I hardly remember any work I had done the previous week. Break of two days clears my mind.

Monday mornings are a new beginning forgetting the failures of the previous week and starting up new. I don’t like to keep any work pending over the weekend. But there are times when this can’t be done. The ghosts of my previous week come back to haunt me. What I am writing now was one of those experiences.

It was another lazy Monday morning and as usual I was late to office, I met my manager who assigned me work for the entire week and I came back to my cubicle to start-up with the assigned work.

I have two machines in my cubicle one is a Dell machine running Linux OS and the other a Mac mini running Macintosh(Snow Leopard). I know it sounds stupid “a Mac mini running Macintosh” but trust me when I say I have seen people using Windows XP on Mac book Pro and also I am sorry Apple fan boys, I don’t use my Macintosh machine a lot! I am currently hooked on to Linux(Ubuntu). I usually start my day by checking my mail on my Linux machine. So first think I did was to check my official mail and then I tried to open Gmail page and I got the following error.


A shocker


I saw the error code “sec_error_expired_certificate” which mean that the certificate has expired. This actually makes sense but I know you would agree with me when I say, it is very hard to believe that Google hasn’t renewed their certificate. Then I happen to read the description “The certificate will not be valid till until Friday 18 December 2009 05:30 AM”. Holy cow! that day was 23 August 2010! Add to that the error message and the error code were contradictory to each other. I have seen Windows XP display such contradictory messages but never expected Firefox to follow Microsoft’s lead.

Since I had worked a bit on internet security related stuff, the first thing I did was to check the certificate.


Tried to make some sense of the certificate


Firstly I have a confession to make, the private and the public keys don’t really make any sense to me! The only thing that made sense was the date which seemed alright. So my conclusion was that, there was no problem with the certificate and this entire issue had something to do with my system. Although I love using Linux I don’t trust the OS completely. After all it’s a software and all software’s have bugs!

And since I couldn’t think of anything, I switched on my mac mini and connected to the Gmail page using Firefox. The page loaded without any issues.

I stared at my monitor with my mouth open and it was at this moment I felt like being hit by a lightning. I checked my Linux machine and did a change and Gmail was up and running on my Linux machine.

Okay, now it’s time to unlock the mystery. The lightning was actually the moment I remembered that I had changed the time and date settings of my Linux machine last week for a silly reason.

The reason

My silly reason : I wanted to fake the modified time of a file, so that I could fool my colleague(I am not telling who it is.). As they say “I was impaled by my own sword”.

New Rupee Symbol of Indian – How to use it in Computers.

You can download the Rupee_Foradian font file from Rupee_Foradian.ttf

Installing and using on Linux

1. Copy Rupee_Foradian.ttf file to /home/Home_Name/ .fonts/ (create this directory, if not exists)
2. Open any word process applications (like open-office, Thunderbird etc), choose “Rupee Foradian” from the drop down box of fonts (If it was already open, restart the application).
3. Press the key just above the Tab button (with “~” symbol) to get the rupee symbol (`)

The button to press

Installing and using on Windows

1. Copy Rupee_Foradian.ttf file to OSDrive:/Windows/Fonts. Normally it would be “C:/Windows/Fonts”. When you paste the file to this location, OS would display say that it is installing the font.
2. Open your word processor and select the “Rupee_forindian” (If it was already open, restart the application).
3. Press the key just above the Tab button (with “~” symbol) to get the rupee symbol (`). Refer the previous image

Installing and using on Macintosh

1. Copy Rupee_Foradian.ttf file to /System/Library/Fonts if all the users need to use it and for a single user it should be /Users/Home_Name/Library/Fonts
2. Open your word processor and select the “Rupee_forindian” (If it was already open, restart the application).
3. Press the key just above the Tab button (with “~” symbol) to get the rupee symbol (`). Refer the previous image

NOTE: Since it is a true type font am not sure whether it will work on Tiger(10.4) version of Macintosh. There shouldn’t be any problems in Leopard(10.5) and Snow Leopard(10.6) version of Macintosh.

It's working!

The images and Windows OS installation is thanks to Joanne Debrass and Linux OS installation is thanks to Satheesh Prabu.

Missing days and Fools’ day

Have you every used cal command on Linux and Unix. Well those of you, who haven’t cal stands for calendar. It shows the month/years calendar.

I recently got a mail from my friend Pearl Fernandes. It had details about some missing days. The days were missing in the month of September in the year 1752(09/1752).

Not the one to accept the fact given by others I decided to give it a try to typed

cal 9 1752

on the terminal of both my Linux and Macintosh machine.

I found the following baffling results. The day following September 2nd is September 14! Strange but it’s true.

Calender on Macintosh

Calender on Linux(Ubuntu)

I didn’t have to work hard to find out the reason. Pearl’s mail had an explanation for this too. I verified the facts but there are multiple theories for this. The one below is one of the theory

Explanation :

A month with whole of eleven days missing. This was the time England shifted from Roman Julian Calendar to the Gregorian Calendar, and the king of England ordered those 11 days to be wiped off the face of the month of September of 1752. (What couldn’t a King do in those days?!) And yes, the workers worked for 11 days less, but got paid for the entire 30 days. And that’s how Paid Leave was born. Hail the King!!!

Before that April was the first Month of the year. Even then people didn’t agree to use the Roman Julian Calendar and celebrated 1st April as a New Year then the King announced that, those who celebrate April as the New Year are fools… (April fools…)
Histories are really interesting!!!

So now you know the origin of Paid leave and April Fools’ Day. Hopefully I get few days of paid leave this August.