Category Archives: Uncategorized

Blog going down

It is with a heavy heart that I announce that I will soon be retiring this blog. I’ve exported and imported it into where it will live on. The code samples will look terrible as does not support plugins (to syntax highlight the code) and the most recent two posts including this one did not make it into the export so it’ll just be everything else.

I started this blog in late 2008 with the two-fold intention of creating a professional presence for my employer and to catalog, reinforce and grow what I was learning and it’s served that purpose. However since then it’s suffered years of neglect for various reasons. Also – I want everything I do from now on to be part of a long term perspective and this blog no longer fulfills that criterion so it must go.

It will be replaced with something new perhaps here or perhaps elsewhere on the web. If you were a reader at any point I’d like to thank you for your time and your comments if any and I hope that the blog added value to you however little.

Here’s to bigger and better things.

Comparison of Linux compression commands

Recently I had to back up a virtual machine server I had in the US before decommissioning it. As I had a lot of large folders I realised that compressing them would take some time. Being the lazy administrator that I am I took some time out to find the fastest compression command on Linux before I began my backup process.

Here is what I found for a 117Mb folder.


dhruba : /backup # time tar -cjf root.home.tbz /root/
real    0m34.600s
user    0m34.040s
sys     0m0.357s


dhruba : /backup # time tar -czf root.home.tgz /root/
real    0m6.255s
user    0m5.672s
sys     0m0.415s


dhruba : /backup # time tar --use-compress-program=lzop -cf root.home.tlzo /root/
real    0m2.624s
user    0m2.061s
sys     0m0.383s

The file sizes for the three commands were as follows.

dhruba : /backup # ls -lShr
-rw-r--r-- 1 root root 81M Dec 14 20:46 root.home.tbz
-rw-r--r-- 1 root root 83M Dec 14 20:43 root.home.tgz
-rw-r--r-- 1 root root 88M Dec 14 20:43 root.home.tlzo

As you can see lzop has by the fastest compression size but the largest compressed file size. If, like me, this is the trade-off you are looking for then lzop is your answer.