defaults read
prints out all the preferences for all apps.
defaults write … …
can be used to set preferences
But write
cannot use the format that comes from read
I would like a way to get all the defaults on demand, save the results, and later restore them all. I don't want to do it with Time Machine, because that would also revert changes I have made in content.
The reason is that Apple keeps changing settings. Seems like almost every week I try to open an image file and find that Apple has changed it from GraphicConverter to Preview, or .csv from LibreOffice to Numbers, or .mp3 from Amadeus to Music. I have many times restored all of these to my preference, and it keeps happening. It's been filed in bugreporter long ago with no response.
I have an AppleCare on this laptop. Might it be worthwhile calling them? When I had a problem with Mai.app, it was weeks of trial and error before the guy declared it "fixed." They have ignored two or more messages saying "no, it is NOT fixed."
Update: Maybe "all the prefs" is an oversimplification of what's in the man page. Point is, it spits a very different format than it can accept.
defaults
is fine, however your claim "defaults read
prints out all the preferences for all apps." is erroneous! I does not print the complete data for the value of any key that is itself a binary plist. In other words, check the output of any key whose value is e.g.{length = $integer, bytes = 0x62706c69 73743030 ...
and in that example62706c69 7374
isbplist
. Just keep a Time Machine backup and you can selectively restore various.plist
files or read the setting from them to reset a changed setting.