Last Updated: October 08, 2019
·
333
· Lars Van Casteren

Always get the latest file to tail!

Our Apache is configured to output access/error log files with full datestamp in the filename, this can be a PITA when you need to quickly tail the access https access file, this oneliner just selects the latest one.

tail -F `ls -alcht *https*|head -1 | awk '{print $9}'