|
|
|
|
|
by xorcist
155 days ago
|
|
The commands in their example are not equivalent. The ps | grep thing searches the full command line including argument while ps -C (and, presumably, the psc thing) just returns the process name. Should you for some reason want to do the former, this is easiest done using: pgrep -u root -f nginx
which exists on almost all platforms, with the notable exception of AIX.Their other slightly convoluted example is: psc 'socket.state == established && socket.dstPort == uint(443)'
which is much more succinct with: lsof -i :443 -s TCP:ESTABLISHED
|
|