Sunday 24 October 2010

grep for users running ssh-agent for keyloading

ps -C ssh-agent -o "pid,user" --no-headers

6648 sperumal
11356 root


ps -C ssh-agent -o "pid,user" --no-headers |awk '$2=="'sperumal'" {print $1; exit}'

6648

No comments:

Post a Comment

Tweets by @sriramperumalla