08 August 2009

Howto: Remove processes in Unix by searching their names

I sometimes have the situation where I am left with some stuck processes from previous sessions. I'm sure this could be done better by the application, but it's not in this case. I therefore have the following command line (bash on Solaris) that solves my problem:

$ ps -ef | grep {myuserid} | grep {procname in ps} | awk '{ print $2 }' | xargs -l1 kill -9

Might be of use for anybody out there.

No comments:

How to solve the "volume doesn't distinguish between upper- and lowercase letters" with an Apple Photos library?

Preface Although this article's title focuses on the problem I had with the Photos library, I will start with the initial problem statem...