4 ms·
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
by gerst20051 4y ago
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'