unixorn/tumult.plugin.zsh

View on GitHub
bin/time-machine-log-viewer

Summary

Maintainability
Test Coverage
#!/usr/bin/env bash
#
# Show time machine log
#
# Original source - https://discussions.apple.com/thread/250226175

set -o pipefail
if [[ -n "$DEBUG" ]]; then
  set -x
fi

if [[ "$(uname -s)" != 'Darwin' ]]; then
  echo 'Sorry, this script only works on macOS'
  exit 1
fi

# show --last 6h instead of stream will only dispay the last 6h, then quit.
log stream --color always --predicate 'subsystem == "com.apple.TimeMachine"' --info | grep -v ' SmCp'