Mercurial > dotfiles
annotate unixSoft/bin/tm-log @ 526:852565046ed0 default tip
zsh: fidget with screen/tmux message
This should speed things up very slightly by avoiding some `grep` action
in the common case of no detached screens/tmuxes.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Mon, 14 Nov 2022 11:02:35 -0500 |
parents | 44f1d686dff1 |
children |
rev | line source |
---|---|
506
44f1d686dff1
tm-log: new tool to show time machine logs on macOS
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
1 #!/bin/sh |
44f1d686dff1
tm-log: new tool to show time machine logs on macOS
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
2 |
44f1d686dff1
tm-log: new tool to show time machine logs on macOS
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
3 filter='processImagePath contains "backupd" and subsystem beginswith "com.apple.TimeMachine"' |
44f1d686dff1
tm-log: new tool to show time machine logs on macOS
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
4 |
44f1d686dff1
tm-log: new tool to show time machine logs on macOS
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
5 # show the last 12 hours |
44f1d686dff1
tm-log: new tool to show time machine logs on macOS
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
6 start="$(date -j -v-12H +'%Y-%m-%d %H:%M:%S')" |
44f1d686dff1
tm-log: new tool to show time machine logs on macOS
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
7 |
44f1d686dff1
tm-log: new tool to show time machine logs on macOS
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
8 echo "" |
44f1d686dff1
tm-log: new tool to show time machine logs on macOS
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
9 echo "[History (from $start)]" |
44f1d686dff1
tm-log: new tool to show time machine logs on macOS
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
10 echo "" |
44f1d686dff1
tm-log: new tool to show time machine logs on macOS
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
11 |
44f1d686dff1
tm-log: new tool to show time machine logs on macOS
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
12 log show --style syslog --info --start "$start" --predicate "$filter" |
44f1d686dff1
tm-log: new tool to show time machine logs on macOS
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
13 |
44f1d686dff1
tm-log: new tool to show time machine logs on macOS
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
14 echo "" |
44f1d686dff1
tm-log: new tool to show time machine logs on macOS
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
15 echo "[Following]" |
44f1d686dff1
tm-log: new tool to show time machine logs on macOS
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
16 echo "" |
44f1d686dff1
tm-log: new tool to show time machine logs on macOS
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
17 |
44f1d686dff1
tm-log: new tool to show time machine logs on macOS
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
18 log stream --style syslog --info --predicate "$filter" |