Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neto-developer/074ccc015e2f300a2cdce4b3d2336597 to your computer and use it in GitHub Desktop.
Save neto-developer/074ccc015e2f300a2cdce4b3d2336597 to your computer and use it in GitHub Desktop.
Filter a Apache Log in a Range of DateTime
Considering $4 is the position of DataTime on access_log file
cat /var/log/httpd/access_log | awk '$4 >= "[14/Apr/2020:09:50:00" && $4 < "[14/Apr/2020:10:15:00"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment