Using the PS Command
Greetings,
How do you use the PS command to see if a particular program (demon) is running. PS -ef gives a whole lot of information but it's just to much and I only am looking for one program. Thanks |
If you know the full name, use "-C" - documented in the manpage.
If not, pipe it to grep. |
If you know the process name, just ask for the pid using
Code:
pidof <process> |
pgrep is also handy
|
http://linuxcommand.org/man_pages/ps1.html
example: Code:
erik@mymachine:~$ ps aux | grep erik | grep kde |
Note that it's "ps" and not "PS", linux is case sensitive.
$ COLUMNS=300 ps -FlAw | grep -i X And +1 to pgrep being useful. $ kill -9 $(pgrep chrome) Poor mans killall. Or at least for those too lazy / underprivileged to install killall. |
All times are GMT -5. The time now is 10:07 PM. |