Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5: Monitor Time Machine activity via GeekTool' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Monitor Time Machine activity via GeekTool
Authored by: taylorcc on Dec 04, '10 05:25:39PM

#!/bin/sh

lastbackupdate=$(grep "Backup completed" /var/log/system.log | tail -n 1 | awk '{print $1" "$2" "$3}')

if [ "$lastbackupdate" = "" ] ; then
echo "There has never been a successful backup!"
exit 0
else
date -j -f "%b %d %T" "$lastbackupdate" "+Last successful backup was %a, %b %d %Y, at %I:%m%p"
fi

Gives output like

Last successful backup was Sat, Dec 04 2010, at 06:12PM



[ Reply to This | # ]