Skip to content

Instantly share code, notes, and snippets.

@skwid138
Last active May 3, 2021 17:33
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 skwid138/ebd4f74bf320767dafe8e55a0d526414 to your computer and use it in GitHub Desktop.
Save skwid138/ebd4f74bf320767dafe8e55a0d526414 to your computer and use it in GitHub Desktop.
# Apache logs location on Ubuntu
cd /var/log/apache2
# Apache logs location on my local macOS
cd ~/Sites/logs
# Tail Logs, only show rows with specific info (like my ip address)
tail -f /var/log/apache2/[site].log | grep [search term]
# Search through zipped log files for some piece of data (ip/email etc.)
zgrep "73.11.123.45" /var/log/apache2/sa* | grep -v ajax | grep -v dist | grep -Ev onesignal | grep -v css | grep -v js | grep -v linkout | grep -v uploads
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment