Skip to content

Instantly share code, notes, and snippets.

@mattghali
Last active March 24, 2016 09:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattghali/00b66ebc6e5b51ca144c to your computer and use it in GitHub Desktop.
Save mattghali/00b66ebc6e5b51ca144c to your computer and use it in GitHub Desktop.
browse osx defaults
# dumps all default domains visible from your user account.
# happy dumping! matt ghali - @bizzyunderscore
rm /tmp/stop
touch /tmp/defaults-read
defaults domains | tr , '\n' | sed 's/^ //' \
| while read pref; do
[ -f /tmp/stop ] && break
grep -q -- "$pref" /tmp/defaults-read || defaults read "$pref" \
| less -P "$pref" ; echo "$pref" >> /tmp/defaults-read
done
@mattghali
Copy link
Author

Usage:

  • 'less' will pause at EOF, hit 'q' for next default.
  • your terminal title will show the default you're viewing.
  • touch /tmp/stop to break out of loop.
  • script will remember where you left off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment