This is really something i need to learn, and never forget. But this is kind of stuff, I always forget. So I write it up right now.
ps aux|gawk '$11 == "ssh" {print $2}'
This is really something i need to learn, and never forget. But this is kind of stuff, I always forget. So I write it up right now.
ps aux|gawk '$11 == "ssh" {print $2}'
There’s the pidof command too :
I don’t remember exactly why, but last time, pidof doesn’t work for me. and awk does .. Anyway, this can be a quick awk introduction
Somebody tells me that pidof isn’t portable too .. :)
pidof is only valid in Linux and maybe not every distro.
not forgetting pgrep…
Cool. Thanks. It’s been on my when I get around to it list for a long time.