show and hide dot files in Finder of OS X El Capitan
August 4, 2016
Fish
Run the following code in fish shell. Then it works as a charm. :-)
function showFiles
defaults write com.apple.finder AppleShowAllFiles YES
killall Finder /System/Library/CoreServices/Finder.app
end
funcsave showFiles
function hideFiles
defaults write com.apple.finder AppleShowAllFiles NO
killall Finder /System/Library/CoreServices/Finder.app
end
funcsave hideFiles
:joy:
zsh
Add the following code to ~/.zshrc
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'
then run source ~/.zshrc
bash
Add the code the same as zsh
above to ~/.bashrc
. Then run source ~/.bashrc
- Then, if you want to show hidden files in Finder, just execute
showFiles
in Terminal. If you want to hide hidden files, usehideFiles
instead.
:joy: