Better HN
topnewbestaskshowjobs
Log inSign up

gerst20051

1 karma · joined Nov 23, 2013 (13y ago) · 1 submissions

Submissions

comment 3y ago · link · parent

I compare previous to current settings using a pattern like this.

  # backup defaults to a file in the home directory with the current timestamp
  alias backup.defaults='defaults read > ~/.backups/defaults_$(date +%Y%m%d-%H%M%S).txt'

  # compare the most recent defaults backup file to the current defaults config
  alias diff.defaults='diff -u <(cat ~/.backups/$(ls -1 ~/.backups | grep defaults | tail -1)) <(defaults read) | delta'