Bash - Show / Hide dot files in OSX Finder

# # show_dotfiles - turn on/off OS X Finders ability to display hidden files # # @param Boolean $view determines if hidden files should be displayed. # Allowed values: yes, true, no, false # function show_dotfiles() { case "$1" in true|yes) defaults write com.apple.finder AppleShowAllFiles $1 killall Finder ;; false|no) defaults write com.apple.finder AppleShowAllFiles $1 killall Finder ;; *) echo "usage: show_dotfiles yes|no|true|false" 1>&2 esac }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.