O'Reilly logo

Mac OS X Panther in a Nutshell, 2nd Edition by Jason McIntosh, Chuck Toporek, Chris Stone

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

defaults

Synopsis

defaults [host] subcommand domain [option] [key]
defaults [-currentHost | -host hostname ] read [domain [key]]
defaults [-currentHost | -host hostname ] read-type domain key 
defaults [-currentHost | -host hostname ] write domain { 'plist' | domain key ' value ' }
defaults [-currentHost | -host hostname ] rename domain old_key new_key 
defaults [-currentHost | -host hostname ] delete [ domain [ key ]]
defaults [-currentHost | -host hostname ] { domains | find word | help }

Used to access Mac OS X’s user defaults database to read, write (set or change), and delete system and application preferences.

The defaults command allows users and administrators to read, write, and delete Mac OS X user defaults from a command-line shell. An application’s defaults belong to a domain, which typically correspond to individual applications; however, they can apply to system settings made via the System Preferences panels. Each domain has a dictionary of keys and values representing its defaults. Keys are always strings, but values can be complex data structures comprising arrays, dictionaries, strings, and binary data. These data structures are stored as XML property lists.

Though all applications, system services, and other programs have their own domains, they also share a domain named NSGlobalDomain. If a default isn’t specified in the application’s domain but is specified in NSGlobalDomain, the application uses the value in that domain.

Host

-currentHost

Restricts the actions of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required