refer to:
How to show and hide files in mac system
Show and hide files on Mac OSX
1. Show hidden files:
Open Terminal and enter the following commands:
defaults write com.apple.finder AppleShowAllFiles -bool true
// 或
defaults write com.apple.finder AppleShowAllFiles YES
2. Hide hidden files:
defaults write com.apple.finder AppleShowAllFiles -bool false
// 或
defaults write com.apple.finder AppleShowAllFiles NO
Then restart Finder to see the effect. How to restart Finder: Mouse click on the Apple logo in the upper left corner of the window => Force Quit => Finder => Restart.
2018.5