one line identify and kill PID (scriptable)
I need to write a one line command to find the PID by process name and kill it.
Here is how I would MANUALLY do it: Code:
Doing this: Code:
I need a one line command that would get that done, and I could put it into a shell script. Thanks in advance. |
Code:
kill `pidof aoeu` Code:
pkill aoeu |
Also, changing:
Code:
ps aux | grep /usr/bin/X11/X Code:
ps aux | grep /usr/bin/X11/[X] Code:
ps aux | grep /usr/bin/X11/[X] | awk '{print $2}' Code:
PID=`ps aux | grep /usr/bin/X11/[X] | awk '{print $2}'` |
Quote:
|
All times are GMT -5. The time now is 10:24 PM. |