Disk space usage command line

Quite often, after a computer or laptop has been used for a while, we may need to know what is taking up all of the hard drive space.

An open source command-line utility called ‘du’ allows us to check file and directory sizes.

Here is a little snippet to check the size of the items in the present wording directory (also known as `pwd` ).

du -hs ./*|grep ^\.*[0-9]\.[0-9]*G\.*$|sort -n

You should now have a list of files and folders that are 1 Gigabyte or greater in size.

Imapsync migration from Zimbra to Kerio

If you are setting up a new Kerio mail server and want to use imapsync to port across your emails, this following command helps to re-locate your email folders from the existing server into a nice way on your tidy new Kerio server.

imapsync –syncinternaldates –subscribe –ssl1 –ssl2 –authuser1 admin –user1 user1 –passfile1 /home/user1/.passwordfile –user2 olduser1 –passfile2 /home/user1/.oldpasswordfile –sep2 / –prefix2 “INBOX/” –nofastio1 –nofastio2

That should nicely transfer all existing emails into their respective folders underneath your new Kerio Inbox folder.

replace admin; user1; user2; /home/user1/{.passwordfile, .oldpasswordfile} with your details.



Zimbra Imapsync problems

Seems there has been a breakdown in communication between Imapsync developers and main distro developer teams – perhaps even perl – – who knows !!

Anyhow there is a problem at hand between Imapsync and Mail::Client.


Subroutine Authuser redefined at /usr/bin/imapsync line 2557.

imapsync needs perl lib Mail::IMAPClient release 2.2.9 exactly, future imapsync release may suppoort 3.0.x, but sorry not now. See file BUG_IMAPClient_3.xx

# Looks like your test died before it could output anything.


rpm --nodeps -e perl-Mail && rpm -ivh ftp://rpmfind.net/linux/dag/redhat/el5/en/i386/dag/RPMS/perl-Mail-IMAPClient-2.2.9-1.2.el5.rf.noarch.rpm


SSH Certificate No Password not working

Hi all,

For Linux administrators ,SSH is as important ,if not more so, than a watch.

Typing in a password every time a remote connection is established is detrimental to both workflow and security.

Using the tried and tested

cat .ssh/id_rsa.pub | ssh admin@remote.com 'cat >> .ssh/authorized_keys'

to bypass the password prompt is a great help.

However, it has been found that sometimes this doesnt work, the answer might be the permissions on the ‘authorized_keys’ file.

The solution (on the remote server – after executing the above command)

cd .ssh && chmod 600 authorized_keys

Now logoout and try to re-connect using ssh again

Hope this helps

How to re-install a package using YUM

If you use many distros you probably think ‘why hasn’t yum got a re-install’..

me too

But i found a work-around

rpm -e --justdb --nodeps %packagename%

yum install %packagename%

Thats a way to ensure you only remove the specified package allowing you to use yum to reinstall it again.

Found the original article and info here


Linux DHCP server bind eth0

So I installed VMWare server and wanted to know how to set my DHCP server to listen on just eth0.

Simple answer on Fedora is to edit


adding the following


Setting up VNC as a service

Hi all,

Question: Many times I wondered why is there a vnc service and why does it always fail on startup?

Answer: Simple configuration of the /etc/sysconfig/vncservers


this sets up a remote desktop service for user ‘john’ with a resolution of 1024×768

edit /etc/sysconfig/vncservers


VNCERSVERARGS=[2]="-geometry 1024x768"

If you want more than one user to have access, do the following:

VNCSERVERS="2:john 3:paul 4:harry"

VNCSERVERARGS[3]="-geometry 800x600"

VNCSERVERARGS[4]="-geometry 1600x1200"

That’s it.

Restart your vnc service and add it to the startup line:

/etc/init.d/vncserver restart

chkconfig vncerver on