See All Defaults Commands Executed
To see all defaults commands, including defaults write, defaults read, defaults delete, and even those requiring sudo:
history |grep "defaults"
See Only Defaults Write Commands
To see only defaults write commands, including those requiring sudo:
history |grep "defaults write"
The results will look the same as above, but without showing any defaults read or defaults delete commands.
See Only Defaults Delete Commands
To see which defaults write commands have been reverted, grep for ‘delete’ rather than ‘write’:
history |grep "defaults delete"
See Defaults Commands Related to Specific App
By changing the text within grep to an application or process name, we can see which defaults commands were used only for that specific application. For example, to see only defaults commands that impacted the Finder:
history |grep "defaults write com.apple.finder"
