Friday, June 22, 2007

Dev : Checking Disk Usage on Unix

It is easy to use a UI to help you. Just like Microsoft Windows, right click and click properties from the list.

But how do we do it on the Unix console? Especially when your server does not have any UI installed. Just use df command and du command.

df is to check the disk free space from each mount point. Normally we would just
df -k
To see the list of mount points, the allocated, used and available disk space. It will also show some useful information such as percentage used and such. -k is to show the unit in 1024-byte, or in kilobyte form. In Linux, we can even use df -g or df -m to show in Gigabyte and Megabyte form.

du is known as Disk Usage. It can roughly let you know the disk usage of a certain directory, or directories. The easiest way of using it is as
du -ks /your/directory
where -k stand for 1024-byte unit, or in kilobyte form, and -s is the option to show the summarize usage of your directory. Else, every directory in the directory you specify will be shown.

Dev : HTML Comments

"Ok guys. The below HTML code is for displaying table.". So how would you write it in your HTML?

Normally, it should be something like this:
<!-- Ok guys. The below HTML code is for displaying table -->

But have do you notice that the number of hyphen, "-", at the end is always even? Else, you will commented those needed part as well. This is about something called Legal Comment. To read more, go here.

Thursday, June 21, 2007

Dev : Java Spring + Valuelist

I've been wondering, my other Valuelist seems fine when I try to call the page. But there is one page, each time when I submit my request, it will return me:
at net.mlw.vlh.web.ValueListRequestUtil.getRequestParameterMap(
at net.mlw.vlh.web.ValueListRequestUtil.buildValueListInfo(
at net.mlw.vlh.web.ValueListRequestUtil.buildValueListInfo(

Where the error comes from? It is from a my line of coding as below:
ValueListInfo oValueListInfo = ValueListRequestUtil.buildValueListInfo(request);

What could have been the problem? After changing here and there, finally, I've found the caused of my misery:
<form name="aForm" enctype="multipart/form-data">

Don't know what is the reason, but hoping soon to find out when free, after I remove the enctype="multipart/form-data", everything is running as usual. Ha!