Ravi Sir's Cards › AWS
Top IPs in an access log?
This interview card answers: Top IPs in an access log? Cut, sort, count. Sort -u removes dups. -h sorts sizes.
Read card text
What this card says
What it is
Cut, sort, count.
cut -d" " -f1 access.log | sort | uniq -c | sort -rn | head
Why it matters
sort -u removes dups.
How / example
-h sorts sizes.
du -sh * | sort -h