Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:03
What would you like to do?
Tailf lastest PostgreSQL Log
path=`ps ax | grep -i 'postmaster' | grep -o '\-D\(/Library/Post.*\)' | awk -F D '{print $NF}'`
log_name=`sudo ls -1t ${log_dir} | head -n1`
echo ""
echo "=========== $log_file =========="
echo ""
sudo tail -f "$log_file"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment