Monday, August 10, 2009

Process status (ps command in unix)

Command to print the last column in ps -eaf command(UNIX):

> ps -aef -0 comm

This would serve as an alternate for awk command to print the column values.

If you want to print the user alone in the ps command then

> ps -aef -o user

If you want to print the pid alone in the ps command then

> ps -aef -o pid

If you want to print the ppid(Parent process id) alone in the ps command then
> ps -aef -o ppid

1 comment:

Karthikeyan said...

Good to see you blogging useful technical tips. It would be better if you can post with a bit of writeup and flow :)
Technical writing would be indexed easily in Google. Keep Blogging !!

Powered By Blogger