Tuesday 23 October 2012

Random interesting system thing of the day

Just a short one. When you have delayed job (Or anything with lots of children)t gets tedious writing ps aux | grep del then 100x kill -STOP 11992, kill -STOP 11993, kill -STOP 11998...
Turns out pkill takes regex, meaning you can pkill -STOP delayed which will pause everything with delayed in the process name.
Also pgrep -l delayed finds all PID's of processes with Delayed in it.
Really handy!

Reference: http://linux.about.com/library/cmd/blcmdl1_pkill.htm

No comments:

Post a Comment