Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AlexeySetevoi/822aec8609317a7ff74fda15191a021a to your computer and use it in GitHub Desktop.
Save AlexeySetevoi/822aec8609317a7ff74fda15191a021a to your computer and use it in GitHub Desktop.
Nginx log triks
awk -vDate=`date -d'now-24 hours' +[%d/%b/%Y:%H:%M:%S` ' { if ($4 > Date) print Date FS $4,$7}' access.log |grep aaa > similar24.txt
https://stackoverflow.com/questions/7706095/filter-log-file-entries-based-on-date-range
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment