Shell Script to Tail Today’s Syslog-NG logs
Laziness is powerful, so if you are tired of typing the full path to today’s syslog-ng log files, for your device, here is a simple method to use it. You will need to change the 192.168.1.1 IP Address to the address of your device (or hostname, if applicable).
tail -f /Logs/firewalls/192.168.1.1/`/bin/date +\%Y`/`/bin/date +\%m`/192.168.1.1-`/bin/date +\%Y-%m-%d`.log
If you like a little color, when displaying your logs, here is the same example using colortail instead of tail.
colortail -f /Logs/firewalls/192.168.1.1/`/bin/date +\%Y`/`/bin/date +\%m`/192.168.1.1-`/bin/date +\%Y-%m-%d`.log
Enjoy logging in and running ./logtail.sh instead of typing in the full command line every time!