Reading and modify OS X plist file by command line
来源:互联网 发布:中国经济现状数据 编辑:程序博客网 时间:2024/05/16 09:12
OS X uses plist file to store configuration information.
1. to read a plist can use:<span style="white-space:pre"></span>sudo defaults read /Library/Preferences/com.apple.CrashReporter
2. and similarly to write a value to a plist<span style="white-space:pre"></span>sudo defaults write /Library/Preferences/com.apple.CrashReporter SomeKey -bool TRUE
<span style="white-space:pre"></span>sudo defaults write /Library/Preferences/com.apple.CrashReporter SomeKey -string "somevalue"3. and delete<span style="white-space:pre"></span>sudo defaults delete /Library/Preferences/com.apple.CrashReporter SomeKey
You can also use plutil to dump an XML version to stdout:<span style="white-space:pre"></span>plutil -convert xml1 -o - filename.plist
as well as convert between binary and XML formats. Xcode also ships with a plist editor (standalone prior to XCode 4, built-in since then).And if that wasn't enough there's also PlistBuddy, here's an example command to print a particular key 'BluetoothVersionNumber':
/usr/local/bin/PlistBuddy -c Print:BluetoothVersionNumber /Library/Preferences/com.apple.Bluetooth.plist
0 0
- Reading and modify OS X plist file by command line
- Xcode Command Line Tools for Mac OS X 10.9 Mavericks
- command line tools for OS X的安装
- Apple OS command line
- Xcode3.2.X 中找不到Mac OS X - Command Line Utility - Foundation Tool
- mac restart by command line
- MAC OS X command
- Rename file with command line
- C# modify file (read all and modify and write all)
- Create & delete user accounts from the command line on Mac OS X
- 创建一个Mac OS X 下的Command Line Tool程序
- OS X 10.9 Mavericks下如何安装Command Line Tools(命令行工具)
- OS X 10.9 Mavericks下如何安装Command Line Tools(命令行工具)
- OS X 10.9 Mavericks下如何安装Command Line Tools(命令行工具)
- OS X 10.9 Mavericks下怎么安装Command Line Tools(命令行工具)
- An A-Z Index of the Apple OS X command line
- OS X 10.9 Mavericks下如何安装Command Line Tools(命令行工具)
- OS X 10.9 Mavericks下如何安装Command Line Tools(命令行工具)
- 2010年诺基亚移动创新大赛决赛入选作品公布
- Java之LinkedHashMap
- tomcat下配置https环境
- UVA247- Calling Circles
- Java abstract修饰符
- Reading and modify OS X plist file by command line
- 捕鱼修改游戏进出记录
- Cadence Orcad 无法启动出现Capture.exe找不到cdn_sfl401as.dll问题
- 八皇后问题的python代码
- hdoj1162 Eddy's picture
- 直接插入排序的三种实现
- HDU4407 Sum【容斥原理】
- MFC 带标题栏 不带标题栏全屏显示
- 块级元素的margin合并\共存实验