defaults write

Greetings,
I spent some time today with the defaults command. I came to the conclusion that it is difficult if not impossible for (me) to figure out how to create a successful write command by looking at an xml version (plutil -convert xml1) of a plist file. I parsed through some known "defaults write" commands on the web but I couldn't relate those to their respective plist files, i.e, grepping the plist file for the argument failed to produce a hit. An example of what I am trying to do would be trying to set AppleShowAllExtensions = 1 in .GlobalPreferences.plist.

Should I keep at this, or give up? It would seem that the few commands I have found out there must have been leaked by someone at Apple. I would be grateful for any tips you could offer me on how to do this. I looked at man and help but regrettably I am failing.

Thanks for your input.

Mac OS X (10.5.7)

Posted on May 26, 2009 6:00 PM

Reply
2 replies

May 26, 2009 6:08 PM in response to Tim Semic

Without seeing what you've tried it's hard to know where you're going wrong, but you can just:

cd ~/Library/Preferences
defaults write ./.GlobalPreferences AppleShowAllExtensions 1


The main thing I see people doing wrong is in specifying the path to the preference that they're trying to change. That's why I typically cd to the appropriate directory and use the ./ notation.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

defaults write

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.