DEV Community

Discussion on: What are your UNIX pipeline commands that saved you from lot of coding/time?

Collapse
 
speedmeup_net profile image
SpeedMeUp • Edited

Top client IP in apache logs.

# cut -d" " -f1 apache.access.log | sort | uniq -c | sort -rn | head
 349963 22.208.1.241
  16434 15.99.2.62
   8685 7.8.27.98
   2047 52.14.4.76
    265 83.12.37.3
    149 3.71.24.250
     78 14.213.14.6
     13 182.37.3.88

Work also for any field : top URL, top browser etc. Damn fast !