Concise, compact list of all 'defaults' currently configured and their values?

I am wondering what (if any) way there is to get a concise list of all defaults currently configured on a system?

This post suggests that they are configured by application, which I get, and it has some good suggestions about how to get a list, for instance:

defaults read

will produce a decent list of configurations, but it's a bit cumbersome. As well, I'm not sure that's what I'm looking for, or if it's just a bunch of reference information. I couldn't find some corresponding defaults in there that I know I set.

Anyhow, say hypothetically you only care about out of the box defaults that would be on most systems, is there a way to produce a list of them and their corresponding values?


Solution 1:

There is/was an preference pane which documented a lot of these called Screts by Blacktree, no idea where that little gem has gone, but was live last week, so maybe it is just down right now...

Anyway... the Google Code page has info about finding them...

https://code.google.com/p/blacktree-secrets/wiki/FindingSecrets

Solution 2:

So after poking around in bash builtins, I came across the defaults command again and decided to look at it's help file.

defaults read

will output all the defaults, but this is just an output of them all with no formatting and no indication as to what domain or default it belongs to.

defaults domains

will output all the default domains so I decided that I could recreate the defaults read with extra output and formatting, so as a test I ran this:

for i in `defaults domains | tr ',' '\n'`; do echo "********* READING DEFAULT DOMAIN $i **********"; echo; defaults read $i; done

Which will do the following:

run defaults domains, then format it so each domain is on a single line, then run through each line and run defaults read against it while adding the READING DEFAULT DOMAIN text to output before dumping the default to output. Obviously it could use some more formatting, etc, but at least this is a way of separating each domain and adding custom formatting. From there You could go and dig into each section and see how best to format them.

I'll play with it some more and see if I can come up with a decent report that doesn't look like total crud.