I was trying to find out how to run a script at startup and during shutdown during which I got to know that level 6 corresponds to reboot in ubuntu. When I opened the /etc/rc6.d every link's name started with K which is for kill I suppose.
The K does indeed stand for “kill”. The symlinks link all the init scripts which are supposed to be called to stop the corresponding service when the system switches to runlevel 6; this tries to ensure that all the system’s services are stopped correctly before the system reboots. Each link is called with a