In the terminal to show:
defaults write com.apple.Finder AppleShowAllFiles -bool true && killall Finder
In the terminal to hide:
defaults write com.apple.Finder AppleShowAllFiles -bool false && killall Finder
In the terminal to show:
defaults write com.apple.Finder AppleShowAllFiles -bool true && killall Finder
In the terminal to hide:
defaults write com.apple.Finder AppleShowAllFiles -bool false && killall Finder