awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head -10

Category: Web Servers & Proxies

awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head -10

Show the top 10 IPs hitting nginx

This pipeline counts access log lines per client IP: awk takes the first field, sort groups identical IPs, uniq -c counts each group, and sort -rn orders by count descending. The top entries reveal heavy crawlers, scanners, or your own monitoring. Repeat after an hour to spot attack patterns.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.