Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: How do i obtain the PID of a program already running.by cwest (Friar) |
on Jun 29, 2000 at 19:21 UTC ( [id://20395]=note: print w/replies, xml ) | Need Help?? |
ps -C program_name
From the Chatterbox earlier today, you were wanting to kill all the apache PID's with Perl...
shell> ps -C httpd | perl -pe '($_)=/(\d+)/;`kill -9 $_`'That should work as root Enjoy! -- Casey
In Section
Seekers of Perl Wisdom
|
|