Killing Processes and Starting Them!

Hey guys! I need some help with a couple of things here:

First: To kill all the processes under a user's acct that have to do with screen or just the game servers. cmd is like screen ./hlds_run.....
I found this cmd off of google:
kill -9 `ps -u USERNAME -o "pid="`
but that kills every process the user has open! So it could cut them out while they were in the middle of doing something. So if there is a way to just kill the processes called screen owned by that user.

ALSO!

how do I start a process under root. Just start it like normal
-screen A -m -d -S username ./hlds_run..
but start that under root and then change it so that the user is the owner of the process. thanks a million!

-Chris

 

 

 

 

Top