Last active
December 21, 2015 21:18
-
-
Save vxf/6366907 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# total apache hits by vhost on a log | |
cat other_vhosts_access.log | awk '{ print $1 }' | sort | uniq -c | sort -nr | |
# total apache hits by day on a log | |
cat other_vhosts_access.log | awk '{ print substr($5, 2, 11) }' | uniq -c | |
# total apache hits by month on every other_vhosts_access.log* | |
zcat other_vhosts_access.log.*.gz | cat - other_vhosts_access.log other_vhosts_access.log.1 | awk '{ print substr($5, 5, 8) }' | sort | uniq -c | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment