显示隐藏文件:

defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder

隐藏文件:
defaults write com.apple.finder AppleShowAllFiles -boolean false ; killall Finder