Danial @ 2 months

One of my friends ask where is the pictures of Danial. I'm too lazy to transfer from camera to laptop then to this blog. Anyway, tonight is my not-too-lazy-night. So, here is Danial@2 months old. Okay, okay, I'm a bit backdated here since my son will age 3 months old this month.



Danial's exactly @ 2 months old.


This pic taken around 1 week ago. I've just wanted to experiment with some technique that I think of. No, it's not Photoshop-ed.

Sushi craving

Somehow last Monday, I really wanted to eat sushi especially anything that is associated with unagi. Usually when it is time to buy something to break fast for the day, my wife and I discuss what we want to eat that day. Because we were at Jusco that time (buy another toys for Danial at Toys r Us) and some clothes for him (he's growing, remember?), we decided to buy Sushi at LG (lower ground, I think). We take a look at Jusco sushi shop and I decided to buy Unagi-don.

Actually, I'm craving to eat ten-don but since it is not available, so I bought Unagi-don. My wife think its better to buy at Sushi King because its look much nicer (the sushi). We walked to the shop that is not far from Jusco sushi shop. We bought ten-don for my wife, some ebi-ten and chiki (what is it, can't remember). Got a discount since we are member of Sushi King.

Despite its appearance, the unagi-don sell at Jusco are suprisingly good and filling. It's not too much but not too less. Its portion is moderate and much better for us that are fasting. The unagi is not smelly at all and the soy sauce that come with it are much nicer.

The 'chiki' is a sushi that contains scallops. If you see it, maybe some of you will not eat it. I know my wife will not eat it. So, I just eat it alone. 4 of them actually. Its good. And I think they already cook the scallops before they prepare it for the sushi.

I'm not sure how the ten-don will taste but my wife said its good. Anyway, all the sushi craving cost me a lot. Everything I craved for sushi, it will cost me. But luckily, I only eat it a few times a month. I discussed with my wife about the possibility to extend our membership with Sushi King (if they offer to us again). We agree that we should extend our membership.

Tesco still not sending me my voucher despite having cross the 150 mark points weeks ago. Maybe Tesco want to award me with RM100 vouchers. Muahahaha..

Anyway, happy fasting to Muslim. Only two more weeks to go before Hari Raya. I'm not looking forward to it because I will sit for my exam next week. Wish me luck guys.

p/s: Sorry for not attaching any pictures (the sushi pics). We were too hungry to snap a pic. Maybe later. ;)

Learning Linux - The basic

I've taken this post from my previous blog. I'm searching for various articles that I think will benefit lots of people. Oh, and I will put the comments also in the articles (if any).

Disclaimer : Warning! Long post.

1. Knowing basic directory in Linux

/ is the starting directory for Linux. It is known as root directory where it will store every directories and files available in the OS. Usually, common user like you and me, cannot write in the / directory. Only root or super-user can write into this directory. By controlling / directory, that person virtually can do any changes that he/she like into the system.

/boot
contains files that needed by boot loader such as LILO and GRUB to start the system. By deleting a certain file in this directory, may cause failure during booting process.

/etc contains most configuration files for the system. It range from configuration file for system look and feel, mount configuration to starting up the system daemons. The user's information is also stored in this directory.

/bin contains binary files that needed during bootup that might be used by normal users.

/sbin contains binary files that needed during bootup that might be used by super-user.

/usr/bin contains binary files that might be used by normal users.

/usr/sbin
contains binary files that might be used by super-user.

/tmp - all temporary files will be saved in here.

/var - this directory mostly contains files that need to be change by the system such as log files, spool directories, manual pages and etc.

/proc - this directory exist physically on the hard disk but the files are created during system uptime. I call the directory as virtual directory because all the files are stored in the RAM which mean after you shutdown the system, the files are gone from the directory.

/home - this directory purpose is to store user's home directory and user's files. Your home directory will be located in this directory. For example, user1 will have his/her home directory in /home/user1.

/root - this is a home directory for root.

2. Navigating Linux directories

cd is a Linux command that is use to navigate directories in Linux OS. The syntax for cd command is like this :

$ cd [/specify/your/directory/here]

For example, let's say that I want to go from my home directory to /usr/bin directory. I just use the cd command like this :

$ cd /usr/bin

After I execute the command, I'm now at /usr/bin directory. If I want to go back to my home directory, I can use either of these commands

$ cd

or ,

$ cd ~

Now, I'm back at my home directory.

3. Where am I?

Most newbie get lost when traversing Linux directories. To make sure you know where you are now you can use pwd command. pwd stands for 'print name of working directory'. For example, if I'm now at /var/www/htdocs, it will print /var/www/htdocs when you run pwd command.

$ pwd
/var/www/htdocs


The above is the example on how to use the command.

4. Show me the files

ls that stands for list is use to list files and directories available in a directory. Let say, you want to list files and directories in your home directory. You only have to type like this:

$ ls

If I run the command, I will get input like this (maybe you'll get a different result):

 Desktop/    examples/                lamtests-7.1.1.tar.gz
LINUX/ lam-mpi_examples.tar.gz pvm3/
OBJECT.tga lamtests-7.1.1/

If you see the files properly, you will notice that each of the files will have their own color. These coloring reflect the type of each file. For example, directory type will be represented by dark blue, maroon is for tar and compress files, green is for executable or binary files and etc. The coloring scheme can be changes based on the user needs but in the system we use the default coloring scheme.

Let's get back on how to use ls command. These are other ways of using ls command.

$ ls -a

The option will list all files in the directory including hidden files or also known as system files. Hidden files can be recognized easily because it's name start with .(dot) characters. For example, .mydir is a hidden file. Let's look what happen when we use ls -a option.

 ./             .bash_profile  .povrayrc       .ssh/         examples/           
../ .bashrc .qt/ .thumbnails/ lam-mpi_examples.tar.gz
.ICEauthority .gconf/ .recently-used Desktop/ lamtests-7.1.1/
.Xauthority .gconfd/ .rhosts LINUX/ lamtests-7.1.1.tar.gz
.bash_history .gnome/ .screenrc OBJECT.tga pvm3/

As you can see from the output, the hidden files and directories will be shown when you use ls -a command.

Some of us might one to view the details for each files and directories in a particular directory. It's not that hard to do it. Just type ls -l in the terminal and you can see the details for each files and directories. Let's look at the example.

 $ ls -l
total 452
drwx------ 3 ruzaimi users 136 2005-01-24 15:00 Desktop/
drwxr-xr-x 2 ruzaimi users 48 2005-01-28 12:35 LINUX/
-rw-r--r-- 1 ruzaimi users 18 2005-01-24 15:02 OBJECT.tga
drwxr-xr-x 13 ruzaimi users 432 2005-01-27 16:03 examples/
-rw-r--r-- 1 ruzaimi users 99074 2005-02-14 13:12 lam-mpi_examples.tar.gz
drwxr-xr-x 16 ruzaimi users 744 2005-01-28 11:32 lamtests-7.1.1/
-rw-r--r-- 1 ruzaimi users 342140 2005-01-28 11:24 lamtests-7.1.1.tar.gz
drwxr-xr-x 4 ruzaimi users 96 2005-02-13 14:10 pvm3/

That's the output that you get when you run ls -l command. The first column from the left is a file description, the second column is the number of object in the files or directories (for file the number is 1 but for directories the second column will reflect how much files or directories available in that particular directory), the third column is the files or directories owner, the fourth column is the name of group who own the files or directories, fifth column indicate the files or directories sizes, the sixth column is the date when the file is last modify, the next column is the time when the file is last modify and the last column indicate the files or directory names.

Beside using only one option at one time, you can also combine the options available for the command. For example, I can combine a and l option in ls command like this :

$ ls -al

To see other options for ls command, just type ls --help in the terminal. The command will list all options available for ls command.

5. I want to change my password

The first thing you need to do when login into your account is you need to change your password. To do this, use passwd command. You must supply the old password before entering a new password. Use a good password for your account like [*mYpaSswOrD8700*], that combine upper case and lower case letters, numbers and special characters.

 $ passwd
Changing password for testuser1
Old password:
Enter the new password (minimum of 5, maximum of 127 characters)
Please use a combination of upper and lower case letters and numbers.
New password:
Re-enter new password:
Password changed.

You've succesfully changed your password. It's a straight forward comamnd, isn't it?

6. Copying my files

To copy your file from one file to another, you need to use cp command. The command can be used like this :

$ cp file_A file_B


This example will copy file_A to file_B.

You can also copy multiple files into a directory.

$ cp file_A file_B file_C directory_Z

This command will copy file_A, file_B and file_C into directory_Z. If you run ls command in directory_Z, you will see the copy of these files in the directory.

7. Moving file(s)

We can move a file in Linux OS by using mv command. Like cp command, it will create another file at another place. The difference is only mv file will remove the original file. For example :

$ mv file_A file_B

This command will move file_A into file_B. file_A will be deleted afterwards. We can also move multiple files into a directory. Example :

$ mv file_A file_B file_C directory_Z

We can also move a directory to another place

$ mv directory_A directory_B

The above command will move all contents in directory_A into directory_B. If directory_B exist prior to the execution of the command, directory_A will be moved into directory_B.

8. How to make a new directory?

Directories can be used to store file(s) and other directories. In Linux OS every user has permission to create new directories in their respective home directory. We use mkdir command to create a new directory in the system. Example :

$ mkdir my_directory


The command will create a new directory name my_directory. How about if you want to create a new directory that reside on another new directory? We will use the options in mkdir.

$ mkdir -p directory_A/directory_B

The above command can be interpreted like this : "Create directory_B in directory_A. If directory_A is not exist, create directory_A before creating directory_B

9. I want to remove unuse file(s) and directory(ies)

For this purpose you need to use 2 command. rm command is use to remove file(s) but sometimes we also use to remove directory(ies). rmdir commmand is use to remove directory(ies). Look at the example below :

$ rm file_A

$ rm file_A file_b

$ rmdir directory_Z


The first command will remove file_A from the system, while the second command is a way to remove two or more files from the system. The third command is to remove an empty directory_Z. What if your directory is full of files and other directories? Let us try.

$ rmdir directory_Z
rmdir: `directory_Z/': Directory not empty


To remove un-empty directory, we need to use rm command with -r option. Sometimes, I also use -rf options to remove un-empty directory. Either two of these examples can remove un-empty directory :

$ rm -rf directory_Z

$ rm -r directory_Z


10. All process, show yourself!

We can view process using a few or several commands. Its all depends on the distro that you use. Basically, there are 3 command that can view process that running on your computer, ps, top and chkconfig. Depending on your distro, chkconfig may not work on some distro. So, what will this commands do?

ps is used just to print the snapshots of all the current processes run on your computer. There are several options that can be used with ps but I usually used it with -aux. -a is list all process, -u is list of process by users and -x is (err..I forgot..hehehe). If you want to use ps -aux command, I advised you to pipe the command with more. What is a pipe in Linux? I will explained it later if I have some free time. So, let's try.

$ ps -aux | more
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 628 52 ? S Sep10 0:04 init [4]
root 2 0.0 0.0 0 0 ? S Sep10 0:00 [keventd]
root 3 0.0 0.0 0 0 ? SN Sep10 0:00 [ksoftirqd_CPU0]
root 4 0.0 0.0 0 0 ? S Sep10 0:00 [kswapd]
root 5 0.0 0.0 0 0 ? S Sep10 0:00 [bdflush]
root 6 0.0 0.0 0 0 ? S Sep10 0:00 [kupdated]
root 11 0.0 0.0 0 0 ? S Sep10 0:00 [kreiserfsd]
root 73 0.0 0.2 1632 676 ? Ss Sep10 0:00 /usr/sbin/syslogd

That is among the process that will display itself if you use ps command. Sometimes the list is long (as in my case) but sometimes the list is short. It is depends on what are the process run on your computer.

top is used to display real time information about all process running on your computer. What I mean by real time is that it will display all the necessary information such as number of tasks currently running on your computer, CPU, memory and swap usage and all related information regarding the process. Try it yourself.

$ top
top - 07:48:33 up 10 days, 19:45, 2 users, load average: 0.00, 0.00, 0.00
Tasks: 66 total, 2 running, 56 sleeping, 8 stopped, 0 zombie
Cpu(s): 0.7% user, 0.3% system, 0.0% nice, 99.0% idle
Mem: 239628k total, 232684k used, 6944k free, 38408k buffers
Swap: 996020k total, 8176k used, 987844k free, 59860k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
27941 root 16 0 1084 1084 844 R 0.3 0.5 0:00.34 top
1 root 8 0 60 52 32 S 0.0 0.0 0:04.57 init
2 root 9 0 0 0 0 S 0.0 0.0 0:00.02 keventd
3 root 19 19 0 0 0 S 0.0 0.0 0:00.02 ksoftirqd_CPU0


So, as you can see, my computer is currently running 66 taks but only 2 are running and the others are sleeping (maybe because of the 'cold' weather in the laboratory). Anyway, as you can see both list PID for the process. PID is process id and it is very very important when you want to stop the process (if the process is hanging or to your horror you discover that your program is running on infinite loop and can't be stopped using Ctrl + C or Ctrl + Z key functions).

I will not touch chkconfig in here. If you used Fedora Core, CentOS or any other Linux distro that is derived from Red Hat Linux, just type chkconfig --list or you can read the manual of chkconfig using man chkconfig.

11. You, nasty process! Begone!
Beside knowing on how run applications and daemons in Linux environment, you also need to know how to stop nasty apps from terrorizing your computer. If your process is hanging in command environment or terminal, it can be easily stop using Ctrl + C and Ctrl + Z. But sometimes you also want to stop daemons and apps that currently running at the background or if your Firefox freeze. What can you do?

First, you need to find the ID for the process. Type ps command with pipe option like this :

$ ps -aux | grep type_your_process_name_in_here

If you expected that the list will be long, add other pipe options :

$ ps -aux | grep type_your_process_name_in_here | more

For example, just imagine my Firefox is currenly hang right now. So, what can I do. I just type this command :

ps -aux | grep firefox
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
root 3961 0.0 0.5 2472 1308 ? S Sep10 0:00 /bin/sh /usr/bin/firefox
root 3972 0.0 0.5 2512 1340 ? S Sep10 0:00 /bin/sh /usr/lib/firefox-1.5.0.7/run-mozilla.sh /usr/lib/firefox-1.5.0.7/firefox-bin
root 3977 0.1 15.2 53812 36536 ? S Sep10 20:23 /usr/lib/firefox-1.5.0.7/firefox-bin
root 3979 0.0 15.2 53812 36536 ? S Sep10 0:00 /usr/lib/firefox-1.5.0.7/firefox-bin
root 3980 0.0 15.2 53812 36536 ? S Sep10 0:00 /usr/lib/firefox-1.5.0.7/firefox-bin
root 3981 0.0 15.2 53812 36536 ? S Sep10 0:00 /usr/lib/firefox-1.5.0.7/firefox-bin


See that the firefox has several PID. So, what can you do? Try to get the earliest process ID (that is true for process or apps that fork itself). In this example, the earliest PID for firefox is 3961. Kill the process using kill PID command.

$ kill 3961

Try to use ps command once again after you finish killing the process. See, the process is now gone.

Too tired to add more. I will add later.

Lazy to write

Nowadays I feel lazy to write in this blog. Although I think about too many things but unluckily I always think when I'm far away from a computer. Since the start of fasting month, I always come early to the office. 6.30 - 7.30 a.m, I already at the office. Like today, I came at 6.15 a.m with the hope I can pray with other 'jemaah' at Masjid Al-Malik Khalid. Unfortunately, I can't. When I arrived, they already at the end of second rakaat. Oh well, maybe tomorrow. And since the first day of Ramadan, my wife and I didn't miss any sahur yet. Maybe it is because of Danial. ;)

Usin has a new hobby. Capturing bird's photos. He has a lot of nice photos of birds (and cats and the 'Transformers' of his) in his blog.

My work still evolve around the cluster and smartcard projects. Although, sometimes I feel want to move to other projects but I managed to motivate myself to continue. I keep saying, if I want to go to other projects, I need to train other officer to take this project.

The cluster already work now. The only part that I still failed is to integrate my certificate into Globus. I read and read and try and try again and again but failed. Maybe I miss some step. The OGCE portal still stubbornly don't want to use MY Apache Tomcat setup. It still want IT Apache Tomcat setting although I copy and paste the configuration file into my setting. I copied everything from library to .jsp files. Its seems that the portal has a master configuration file that lurking behind the scenes. And somehow I heard the file keep laughing at me each time I try to twist the portal to accept my tomcat. Oh well. If I found that file, I will torture it and let it spit out every secret it keep from me.

Danial is growing. He already smiles and talks a lot now. And when he talks and nobody is around to talk back to him, he will call us. Ahaks. He will be a smart kid when he grow up later. He can already hold thing in his hand. Not only our fingers but also his toys. He also touch a lot if he saw something or someone near him. He like to watch cartoon on TV especially Spongebob. Maybe because the characters in the show are in bright color.

Hari Raya songs already been played at shopping complex. Sometimes, I feel its so stupid to play the songs earlier. This is only second weeks of Ramadan and when they play the song, its look like Hari Raya is tomorrow. Haiya, at least wait la until 7 days before Hari Raya. Its still early now.

One of my friend from ITAC courses got invitation to attend Bridge SE programme at Osaka. Lucky him.

I also struggled learning Nihongo. Trying to recognize Katakana, Hiragana and kanji writing. Hehehe..Maybe if I live in Japan, I can speed up the process. :)

What else? I think that's all about me that I can write. Most of the things are about work and since all work related is classified information, I can't talk much else I will write about the information. Hehehe..

So, that's all folks. Ja, matta ne!

Selamat Menyambut Ramadan

Ramadan datang lagi dengan membawa seribu satu keberkatan kepada umat manusia. Segala perbuatan baik yang kita lakukan akan mendapat pahala yang lebih daripada bulan-bulan lain.

Kedatangan Ramadan telah lama dinantikan. Rindunya untuk kembali berpuasa di bulan Ramadan semakin menjadi-jadi seminggu dua sebelum kedatangan bulan yang berkat ini. Di bulan inilah selalunya aku mendapat ilham yang lebih dalam melaksanakan kerja-kerja yang diamanahkan.

Buat semua muslimin dan muslimat walau di mana sahaja dirimu berada, selamat menyambut Ramadan dari saya dan keluarga. Semoga kedatangan Ramadan kali ini akan membawa rahmat yang berkekalan sehingga akhir hayat kita semua.

Lai Yok Shan

I think most of you know about Lai Yok Shan, the little girl that will lose her arm because of the doctor's mistake. When I read that she will be treated by specialist to help from getting her hand amputate by the doctor, I pray hard for her arm to 'survive'. But sadly her arm will be amputated soon. Poor little girl. I pray that she will be well soon. Hope God will save her.