打开终端,输入以下命令
显示Mac隐藏文件:defaults write com.apple.finder AppleShowAllFiles -bool true
隐藏Mac隐藏文件:defaults write com.apple.finder AppleShowAllFiles -bool false
或者
显示Mac隐藏文件:defaults write com.apple.finder AppleShowAllFiles YES
隐藏Mac隐藏文件:defaults write com.apple.finder AppleShowAllFiles NO
回车,退出终端,重启Finder
重启Finder:鼠标单击窗口左上角的苹果标志-->强制退出-->Finder-->重新启动