defaults命令用来对mac os x系统进行某些设置。
常用命令:
查看所使用的defaults命令:
history |grep "defaults"
分类查看defaults命令:
history |grep "defaults write"
history |grep "defaults delete"
查看关于某一个程序的defaults命令,比如finder,dock,safari:
history |grep "defaults write com.apple.finder"
注:苹果的程序一般使用"com.apple.appname"来引用.
显示finders中隐藏/显示的系统文件:
defaults write com.apple.finder AppleShowAllFiles -bool false;KillAll Finder
defaults write com.apple.finder AppleShowAllFiles -bool true;KillAll Finder
更改截屏文件存储格式JPG、PDF、PNG:
defaults write com.apple.screencapture type jpg
defaults write com.apple.screencapture type png
Finder中打开某文件时,显示相应文件路径:
defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
文本编辑时,长按键产生多个重复字符:
defaults write -g ApplePressAndHoldEnabled -bool false