显示Mac隐藏文件:
defaults write com.apple.finder AppleShowAllFiles -bool true
#或
defaults write com.apple.finder AppleShowAllFiles YES
隐藏Mac隐藏文件
defaults write com.apple.finder AppleShowAllFiles -bool false
#或
defaults write com.apple.finder AppleShowAllFiles NO
执行完毕重启Finder:鼠标单击窗口左上角的苹果标志–>强制退出–>Finder–>重新开启