显示隐藏文件及文件夹
defaults write com.apple.finder AppleShowAllFiles -boolean true
隐藏文件及文件夹
defaults write com.apple.finder AppleShowAllFiles -boolean false
参考:https://www.jianshu.com/p/ac682cf53cea