Skip to content

Instantly share code, notes, and snippets.

@OsamaShabrez
Created March 12, 2015 17:49
Show Gist options
  • Save OsamaShabrez/2f3c41ecbf395e1e08f8 to your computer and use it in GitHub Desktop.
Save OsamaShabrez/2f3c41ecbf395e1e08f8 to your computer and use it in GitHub Desktop.
Quickly show/hide hidden files in mac osx
Open a terminal and paste this command
defaults write com.apple.finder AppleShowAllFiles YES
Press return and relaunch finder
To hide these files again follow the same steps replaing terminal
command with
defaults write com.apple.finder AppleShowAllFiles NO
==========
Alternatively you can create an alias in your bash profile
if you use these commands frequently by follwing thse steps
open ~/.bash_profile in your favorite editor
paste these two lines at the bottom and save
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'
Reload your terminal with source ~/.bash_profile to use showFiles and hideFiles to switch between the two file view modes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment