Category Archives: Other

other

Quick Disk Usage Bash Script

Posted on .

The command, du (estimate file space usage) is a core Linux program I use often.

When trying to find where space is being used on a disk I run the following command:

du --max-depth=1 -xh

This produces a list of all directories with their total size in human readable format. However it isn’t sorted, and it doesn’t tell me how much is being used in the current directory.

So I wrote a script which lists the directory sizes in human readable format, sorts them by size, and also has a seperate entry for the current directory, along with total.

Typical output:

$ ddu
0K ./proc
0K ./run
0K ./sys
4K [.]
4K ./boot
4K ./data
4K ./dev
4K ./lib64
4K ./media
4K ./mnt
4K ./opt
4K ./selinux
4K ./tmp
12K ./srv
32K ./home
76K ./root
5.5M ./sbin
5.5M ./bin
5.7M ./etc
12M ./lib
341M ./var
761M ./usr
--
1.1G [total]

 
Download
  ddu.sh (846 bytes, 1,754 hits)

WordPress reinstall

Posted on .

This wordpress installation had been originally installed in 2004 with WordPress version 1.0. I was having problems installing some new plugins and it was about time I reinstalled from a fresh code base.

Also created a child-theme of TwentyTelve with a few changes for a simplistic, functional layout.

Site move


Not that anyone follows this site. I have moved the services that were once hosted on a virtual machine onto a physical box.

Learning how all this was put together again was a pain in the a**!