(no title)
foobarqux | 1 month ago
ps aux | grep nginx | grep root | grep -v grep
can be done instead (from memory, not at a Linux machine ATM): ps -u root -C nginx
which is arguably better than their solution: psc 'process.name == "nginx" && process.user == "root"'
xorcist|1 month ago
Should you for some reason want to do the former, this is easiest done using:
which exists on almost all platforms, with the notable exception of AIX.Their other slightly convoluted example is:
which is much more succinct with:wang_li|1 month ago
dundarious|1 month ago
mxey|1 month ago
ss -o state established '( dport = :ssh or sport = :ssh )'