Grepping for a list of processes and then e.g. killing them

If you e.g. want to kill a list of processes you can all grep but are too lazy to type all the pids. Or e.g. as part of a service script on a server:
ps -ef | grep something | awk '{print }' | xargs -i kill {}

No comments:

Post a Comment

I appreciate comments. And I do read them.