Search code examples
javalinuxkill-process

How to stop a ksh?


I have a ksh script which I have started but now I want to stop it. The ksh, abc.ksh, takes hours to run and I want it to stop. I found the pid of the ksh using ps -ef and then did

kill -9 pid

When I did a ps -ef again the ksh is no longer here but I can see the log file where the ksh is writting still executing. The ksh I have executed call a java. Any idea how do I stop this java code from continuing to execute?


Solution

  • Probably the ksh script you are referring to, starts another process (which is the one that actually produce the log. You have to find the pid of that process and kill that one.