Page 1 of 1

Executing freeBSD commands

Posted: Fri Aug 12, 2005 6:59 am
by sujin
How can we execute the freeBSD commands from PHP.
I want to know how to find the PID of a particular process using PHP and to kill that process

Any one please help me..........

Posted: Fri Aug 12, 2005 7:10 am
by feyd
use anyone of the exec() functions.. like shell_exec(), exec(), etc...

Posted: Fri Aug 12, 2005 7:17 am
by sujin
can any one provide the freeBSD command to find the PID of a particular process while using exec()/ system()
etc

Posted: Fri Aug 12, 2005 10:31 am
by timvw
The following script would kill all the programs owned by a certain user... Shouldn't be too hard to tweak it to your needs ;)

http://timvw.madoka.be/programming/bash/killuser.txt