Hiding and viewing dot files in Mac's Finder
Hi,
I was talking about the problem that Finder is per default hiding dot files before. In most cases you get away with the default, but sometimes it really sucks that you cannot drill down into your 'hidden' directories. Since I work a lot with bash I added the following function to my ~./bashrc :
function switchFinderOptions() { SHOW_DOT_FILES="defaults write com.apple.Finder AppleShowAllFiles YES" HIDE_DOTFILES="defaults write com.apple.Finder AppleShowAllFiles NO" echo "Choose finder mode:" echo $SHOW_DOT_FILES '[1] ' ; echo $HIDE_DOTFILES '[2] ' ; read ans case "$ans" in 1) `$SHOW_DOT_FILES`;; 2) `$HIDE_DOTFILES`;; esac killall Finder }
After adding this function it becomes very easy to switch the Finder mode and quickly drill down a hidden directory structure.
Hope it helps.
--Hardy
Old comments
2010-12-31Frank
I like the idea of a command line function if that's the best we can do; though I would prefer to pass in flags. I'd show you my code, but I can't find a way to allow formatting to be preserved here. Oh well.