Show hidden files in Finder (macOS/OSX)
Create an alias to quickly show hidden files or hide them again.
Add these aliases to your .bash_profile
or .zshrc
file.
alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES;
killall Finder /System/Library/CoreServices/Finder.app'
alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO;
killall Finder /System/Library/CoreServices/Finder.app'