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.
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
- Open Terminal (You can open it via Finder -> Applications -> Utilities)
- Type or paste the following command:
defaults write com.apple.finder AppleShowAllFiles YES
- Then press return
- Now press and hold the ‘Alt’ key on the keyboard, then right click on the Finder icon and choose Relaunch (in the dock).
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
- Open Terminal and type or paste the following command:
sudo nano ~/.bash_profile
- Enter the Mac admin password if it required, then press return
- 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'
- Below that, copy and paste the following command:
alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
- Now press return or Ctrl+O to save the file.
- Then press Ctrl+X for file exit and return to the command line.
- In Terminal, copy and paste the following command to make the aliases available and refresh your profile:
That’s all. Now if you need to view hidden files, just type the following aliases in terminal :
If you want to hide them again, in Terminal paste the following :