显示全部文件
defaults write com.apple.finder AppleShowAllFiles -bool true osascript -e \'tell application "Finder" to quit\'
不显示全部文件
defaults write com.apple.finder AppleShowAllFiles -bool false osascript -e \'tell application "Finder" to quit\'
快捷键
在 macOS Sierra,我们可以使用快捷键 ⌘⇧.(Command + Shift + .) 来快速(在 Finder 中)显示和隐藏隐藏文件了。