changeset 506:44f1d686dff1

tm-log: new tool to show time machine logs on macOS I keep needing this, and it keeps being a hassle.
author Augie Fackler <raf@durin42.com>
date Mon, 04 Jan 2021 13:35:28 -0500
parents b78aa03c0c00
children 7d298a83fceb
files unixSoft/bin/tm-log
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
new file mode 100755
--- /dev/null
+++ b/unixSoft/bin/tm-log
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+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"