Skip to content

Instantly share code, notes, and snippets.

@mohanpedala
Last active April 15, 2019 19:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mohanpedala/2fd1919d29db36809d0da021f1a51157 to your computer and use it in GitHub Desktop.
Save mohanpedala/2fd1919d29db36809d0da021f1a51157 to your computer and use it in GitHub Desktop.
mac show hidden files
  1. In Terminal, paste the following: defaults write com.apple.finder AppleShowAllFiles YES
  2. Press return
  3. Hold the ‘Option/alt’ key, then right click on the Finder icon in the dock and click Relaunch.\

Show/Hide Hidden Files using Terminal Aliases

  1. In Terminal, paste the following: sudo nano ~/.bash_profile or sudo nano ~/.zshrc
  2. Enter your Mac’s administration password if required, then hit return At the bottom of the open .bash_profile file, paste the following:
alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
  1. Below that, paste the following:
alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
  1. Press ctrl + O and hit return to save the file
  2. Press ctrl + X to exit the file and return to the command line
  3. In Terminal, paste the following: source ~/.bash_profile or source ~/.zshrc to refresh your profile and make the aliases available
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment