Created
November 4, 2019 21:40
-
-
Save davidmerrick/7f6f705f73eecdf56169b07531a0b41c to your computer and use it in GitHub Desktop.
Time Machine log
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 | |
# This script shows the previous 12 hours of Time Machine activity, then shows live logs | |
# Reference: https://superuser.com/questions/1126990/how-to-view-time-machine-log-in-macos-sierra | |
filter='processImagePath contains "backupd" and subsystem beginswith "com.apple.TimeMachine"' | |
# 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" | |
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