Last active
January 6, 2019 20:15
-
-
Save igreg/9a5409fc65877553b602e8dd543456d2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
filter='processImagePath contains "backupd" and subsystem beginswith "com.apple.TimeMachine"' | |
if [ "$1" = "12h" ]; then | |
# show the last 12 hours | |
start="$(date -j -v-12H +'%Y-%m-%d %H:%M:%S')" | |
echo "" | |
echo "[History (from $start)]" | |
echo "" | |
log show --style syslog --info --start "$start" --predicate "$filter" | |
fi | |
echo "" | |
echo "[Following]" | |
echo "" | |
log stream --style syslog --info --predicate "$filter" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment