pgrep / pkill
List or send signal to processes based on names and other attributes
List processes called sshd and owned by root:
pgrep -u root sshd
List all processes owned by root or daemon (special account)
pgrep -u root,daemon
pkill -x -signal 9 -u khai httpd
is way better than
kill -9 `ps -elf | grep khai | grep httpd | gawk '{ print $4 }'`
page revision: 0, last edited: 13 Oct 2008 07:12