DirectNET

Data Center Management Solutions including UPS Systems, Data Center Cooling, KVM over IP & IP Power Strips, Server Racks and Server Rack accessories; KVM Switches and KVM Extenders; Rackmount Monitors and Rackmount Keyboards.


NAVIGATION
Home
Store
INSIDE MAC
Television Shows
Broadcast Shows
Daily News Shows
Special Shows
EVENTS
DAILY TIPS
Design
Mac OS X
Mac OS X UNIX
COMMUNITY
Surveys
NEWS
Current
Press
Archive
FEATURES
Editorial
Dr. Mac
Reviews
Reader Reports
RESOURCES
FAQ
Documentation
Learning Center
MAN pages
Glossary
Tutorials
Tips
Links

OUR PARTNERS


       defaults - access the Mac OS X user defaults system


SYNOPSIS

       defaults read [ domain_name [ key ] ]

       defaults  write  domain_name  { 'domain_rep' | domain_name
       key 'value_rep' }

       defaults delete [ domain_name [ key ] ]

       defaults { domains | find word | help }


DESCRIPTION

       defaults allows users to read, write, and delete Mac OS  X
       user  defaults from a command-line shell.  Mac OS X appli-
       cations and other programs  use  the  defaults  system  to
       record user preferences and other information that must be
       maintained when the applications aren't running  (such  as
       default  font  for  new  documents,  or the position of an
       Inspector panel).  Much of this information is  accessible
       through an application's Preferences panel (or the equiva-
       lent), but some of it isn't, such as the position  of  the
       Inspector  panel.   You  can  access this information with
       defaults.

       Note: Since applications do  access  the  defaults  system
       while  they're  running, you shouldn't modify the defaults
       of a running application.  If you change a  default  in  a
       domain that belongs to a running application, the applica-
       tion won't see the change and  might  even  overwrite  the
       default.

       User  defaults  belong  to domains, which typically corre-
       spond to individual applications.  Each domain has a  dic-
       tionary  of keys and values representing its defaults; for
       example, "Default Font" = "Helvetica".   Keys  are  always
       strings,  but  values  can be complex data structures com-
       prising arrays, dictionaries, strings,  and  binary  data.
       These  data  structures  are stored as property lists; see
       PropertyList(5) for more information.

       Though all applications, system services, and  other  pro-
       grams  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,
       then the application uses the value in that domain.


OPTIONS

       read   Prints  all  of  the  user's  defaults,  for  every
              domain, to standard output.

              Prints  all  of the user's defaults for domain_name
              to standard output.

       read domain_name key
              Prints the value for  the  default  of  domain_name
              identified by key.

       write domain_name key 'value_rep'
              Writes   value_rep   as   the   value  for  key  in
              domain_name.  value_rep must be  a  property  list,
              and  must  be enclosed in single quotes.  For exam-
              ple:

                 defaults write MyApplication "Default Color" '(255, 0, 0)'

            sets the value for Default Color to an array contain-
            ing  the  strings 255, 0, 0 (the red, green, and blue
            components).  Note that the key is enclosed in quota-
            tion marks because it contains a space.

       write domain_name 'domain_rep'
              Overwrites  the defaults information in domain_name
              with that given as domain_rep.  domain_rep must  be
              a property list representation of a dictionary, and
              must be enclosed in single  quotes.   For  example,
              this command:

                 defaults write MyApplication '{ "Default Color" = (255, 0, 0);
                 "Default Font" = Helvetica; }'

            erases  any  previous  defaults for MyApplication and
            writes the values for the two names into the defaults
            system.

       delete domain_name
              Removes all default information for domain_name.

       delete domain_name key
              Removes the default named key from domain_name.

       domains
              Prints  the  names  of  all  domains  in the user's
              defaults system.

       find word
              Searches for word in the domain  names,  keys,  and
              values  of  the  user's  defaults, and prints out a
              list of matches.

       help   Prints a list of possible command formats.


SEE ALSO

       Defaults can be structured in very complex ways, making it
       difficult for the user to enter them with this command.

Copyright © 2000-2010 Inside Mac Media, Inc. All rights reserved.
Apple assumes no responsibility with regard to the selection, performance, or use of the products or services. All understandings, agreements, or warranties, if any, take place directly between the vendors and prospective users.
Apple, the Apple logo, Mac, PowerMac G4, PowerMac G5, Xserve, Xserve RAID, PowerBook, iBook, Airport, AirPort Extreme, iMac, eMac, iLife, iMovie, iCal, iPhoto, iTunes, QuickTime, FireWire, iPod, iSight, AppleWorks, Macintosh, Jaguar, Panther, Mac OS, Mac OS X and Mac OS X Server are trademarks of Apple Computer, Inc.