• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: defaults command line tool and multiple plists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: defaults command line tool and multiple plists


  • Subject: Re: defaults command line tool and multiple plists
  • From: Nicholas Riley <email@hidden>
  • Date: Thu, 25 Sep 2003 13:43:16 -0500
  • Mail-followup-to: mwalker <email@hidden>, Cocoa-Dev <email@hidden>

On Thu, Sep 25, 2003 at 10:22:01AM -0600, mwalker wrote:
> Hi, all.
>
> We've got a collection of applications (both Cocoa and Carbon) and
> command-line tools and daemons (ditto) that create several preference
> files in /Library/Preferences. We use the standard
> "com.companyname.toolappname.plist" naming convention for the files,
> because we're using CFPreferences and NSUserDefaults.
>
> What we would like to do is, as part of an install perhaps, is
> manipulate these files from the command line. I was ready to write a
> custom tool for this, but then I remembered the "defaults" tool, which
> seemed perfect. However, when I type "defaults domains", I only see the
> name of the first preferences file (of ours) in the list,
> "com.companyname.startswithA.plist". Is this a restriction of defaults?
> Should I just say "to heck with it" and write a custom tool?
>
> I'd hate to duplicate Apple's work; the tool isn't especially urgent;
> and I'd like to understand why defaults doesn't work like I expected it
> to.

You can use an absolute pathname (minus the .plist extension) as a
domain for defaults, so specifying
/Library/Preferences/com.companyname.toolappname should work.

--
=Nicholas Riley <email@hidden> | <http://www.uiuc.edu/ph/www/njriley>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: defaults command line tool and multiple plists
      • From: mwalker <email@hidden>
References: 
 >defaults command line tool and multiple plists (From: mwalker <email@hidden>)

  • Prev by Date: Application Not Terminating
  • Next by Date: Re: loadNibNamed:owner: Who disposes of the loaded objects?
  • Previous by thread: defaults command line tool and multiple plists
  • Next by thread: Re: defaults command line tool and multiple plists
  • Index(es):
    • Date
    • Thread