3 ms·
Yes! It doesn't work 100% of the time, but what I've been doing for my setup script is: `defaults read > old` -> change setting in GUI -> `defaults read > new`
by citruscomputing 4y ago
Yes! It doesn't work 100% of the time, but what I've been doing for my setup script is:
`defaults read > old` -> change setting in GUI -> `defaults read > new` -> `diff old new`
If nothing is there, you're out of luck, most likely. (I think I've had luck using -currentHost or maybe sudo sometimes though...) If there is something, `less new` and search for the string, then find the path to the key. Do a test read with `defaults read <domain> <item>` to see if you got the path right.
You can also copy plist files (cp -r /Library/Preferences, or wherever) and then diff those. A useful alias to convert to xml:
alias plist='plutil -convert xml1 -o /dev/stdout'