3 ms·
Using "wc -l" or "sort | uniq -c | sort" to count and classify things. Count processes and threads by user on Linux: # ps -Teo euser=,comm= | sort | uniq -c |
by criticas 5y ago
Using "wc -l" or "sort | uniq -c | sort" to count and classify things.
Count processes and threads by user on Linux:
# ps -Teo euser=,comm= | sort | uniq -c | sort -nr
- FriedrichN 5y agoAnother application of this is counting unique IPs in Apache access logs. zgrep -Po '^[0-9.]+' /var/log/apache2/test.access.log | sort | uniq -c | sort -n