Skip to content

Instantly share code, notes, and snippets.

@denislutz
Last active December 16, 2015 02:38
Show Gist options
  • Save denislutz/5363599 to your computer and use it in GitHub Desktop.
Save denislutz/5363599 to your computer and use it in GitHub Desktop.
tail latest log file in folder, assuming all log files have the name console*.log
#!/bin/bash
tail -f -n500 $(find . -name "console*.log" -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" ")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment