Created
April 16, 2021 14:50
-
-
Save mcunha98/62d85080234f27f29fd60f0e4733d593 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Count the access_log , group by ip and hits, sort by desc and cut to 50 top results | |
CC='\033[1;33m' | |
NC='\033[0m' | |
printf "Lista dos top ${CC}50${NC} enderecos IP e visitas na data de hoje\n" | |
echo "Baseado no arquivo /var/log/httpd/access.log" | |
cat /var/log/httpd/access.log | awk '{print $1}' | sort -t":" -k2,2 | uniq -c | sort -fr | head -n50 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment