Visual Disk Usage Analyser From the Command Line Ubuntu

When you are trying to analyse disk usage there are a limited set of command line tools on Linux. Most people use either of ‘find’ or ‘du’. However using these tools it can be a lot of work to get an overall picture and drill down into directories to find the problems. Enter ncdu (short for ncurses-based disk usage). Simply put ncdu is a fanatastic graphical disk usage analyser.

It could not be simplier to install.

sudo apt-get install ncdu

To use:


And you get a lovely screen like the one below. You can then navigate around using the cursor keys.


Thanks ncdu people 🙂

How to install imapsync on Ubuntu 12.04

Imapsync is a really useful script from syncing imap mail boxes.  I used it when migrating from Zimbra to Google Mail.  I wanted to install imapsync from source on my Ubuntu server but found the instructions a little ridiculous.  The start of the instructions are:

Go into the directory imapsync-x.xx and read the INSTALL file.
You’re already reading the INSTALL file.

Here is what I did it:

1) Download the source from github and extract it.

2) Install a few dependences:

aptitude install libmail-imapclient-perl libdigest-md5-file-perl libterm-readkey-perl libio-socket-ssl-perl libdigest-hmac-perl makepasswd

3) In the source folder run:

make -n install

make install

You should then have a working imapsync.  To test it try:

imapsync -version

Magento PDF Invoices not appearing…

…is that another bug with Magento? Surely not. Here is the apache error log:

Declaration of Zend_Pdf_FileParserDataSource_File::__construct() must be compatible with Zend_Pdf_FileParserDataSource::__construct() in /var/www/lib/Zend/Pdf/FileParserDataSource/File.php on line 41

The solution is to change the constructor function of lib/Zend/Pdf/FileParserDataSource.php

abstract public function __construct();


abstract public function __construct($filePath);

Again – this bug has been around since 2010. It’s 2012…

Magento php extensions 0 must be loaded

I’ve just been installing Magento (which for some reason is a real pain!). I got a really random error message when trying to setup the database. I get an error message just saying:

"php extensions 0 must be loaded"

You need to edit app/code/core/Mage/Install/etc/config.xml changing:


to this:


Given that this bug has been around since for about 3 years – surely Magento can fix it?