Skip to content

Instantly share code, notes, and snippets.

@fstorr
Last active September 24, 2018 17:16
Show Gist options
  • Save fstorr/f62c91c6c73194d811dd2f45a4c32669 to your computer and use it in GitHub Desktop.
Save fstorr/f62c91c6c73194d811dd2f45a4c32669 to your computer and use it in GitHub Desktop.
Various terminal commands for dealing with OS stuff

Version of macOS

$ sw_vers

System logs

  1. cd /Library/Logs/DiagnosticReports
  2. `grep -ir ".panic" *
  3. Note: can also use Console app → System Reports

Last shutdown code

log show --predicate 'eventMessage contains "Previous shutdown cause"' --last 24h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment