Mac : Show/Hide Hidden Files on OS X Yosemite & Mavericks


In Mac OS X, it’s hard to switch hidden file visibility. But you can quickly switch hidden files visibility with Funter – a free app.

funter hidden files viewer

XHiderPRO is a another great app to control file visibility. If you want to hide/unhide some folder or file, just drag and drop the file or folder on XHiderPRO icon in menu bar.

How to show/hide hidden files on Mac using Terminal

  1. Open Terminal (You can open it via Finder -> Applications -> Utilities)
  2. Type or paste the following command: defaults write com.apple.finder AppleShowAllFiles YES
  3. Then press return
  4. Now press and hold the ‘Alt’ key on the keyboard, then right click on the Finder icon and choose Relaunch (in the dock).

Finder relaunch

This will view all hidden files.

If you wan t to hide these files again, do the same steps but replace the Terminal command with the following one:

defaults write com.apple.finder AppleShowAllFiles NO

Use Terminal aliases to show/hide hidden files

  1. Open Terminal and type or paste the following command: sudo nano ~/.bash_profile
  2. Enter the Mac admin password if it required, then press return
  3. At the bottom of the file (open .bash_profile) copy and paste the following command: alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
  4. Below that, copy and paste the following command: alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
  5. Now press return or Ctrl+O to save the file.
  6. Then press Ctrl+X for file exit and return to the command line.
  7. In Terminal, copy and paste the following command to make the aliases available and refresh your profile: source ~/.bash_profile

Terminal alias hidden file

That’s all. Now if you need to view hidden files, just type the following aliases in terminal : showFiles

If you want to hide them again, in Terminal paste the following : hideFiles

5:40 pm

3 responses to Mac : Show/Hide Hidden Files on OS X Yosemite & Mavericks

Hi

I have Yosemite 10.10 and tried this, but it still doesn't work.
defaults write com.apple.finder AppleShowAllFiles YES

Dear Fresrik
After you change everything please open new terminal and use command in normal '$' again not root 'showFiles' and 'hideFiles'

Leave a Reply