How to list currently running shell scripts

scriptingshell

I think I have a shell script (launched by root's crontab) that's stuck in a loop. How do I list running scripts and how can I kill them?

I'm running Ubuntu 9.04, but I imagine it's similar for all *nix systems…

Best Answer

ps -ef will show you list of the currently running processes. Last field is the process name and parameters. Find the process you are looking for, and look at the 2nd column. 2nd column is process id or pid.

Then do kill -9 <pid> to kill that particular process.