The default path for Apache web server log is:
To find out top 10 IP address accessing your Apache web server for domain, just run the following command.
Sample Output
In the command above:
awk
– prints the access.log.2016-05-08 file.sort
– helps to sort lines in a access.log.2016-05-08 file, the-n
option compares lines based on the numerical value of strings and-r
option reverses the outcome of the comparisons.uniq
– helps to report repeated lines and the-c
option helps to prefix lines according to the number of occurrences.
No hay comentarios:
Publicar un comentario