How can I show hidden files/folders in Finder

How can I see the hidden files in Finder?

For instance, if I have a file named: .something is is not listed.

Right now I have to open the terminal and type ls -la.


Solution 1:

Open a Terminal and enter:

defaults write com.apple.finder AppleShowAllFiles TRUE

Then, relaunch Finder by typing:

killall Finder

To reverse that, just enter:

defaults write com.apple.finder AppleShowAllFiles FALSE

Solution 2:

The better way I found is using an Automator service. So I can toggle directly from Finder menu without needing to launch an App

Toggling hidden files

Toggling Hidden Files:

  • Service
  • App

To install just unzip, double click the file, you will be asked to install it, just click Install and then click Done.

Control+Click or Right-Click > Open

Solution 3:

You can use this script toggle between states:

# check if hidden files are visible and store result in a variable
isVisible=”$(defaults read com.apple.finder AppleShowAllFiles)”

# toggle visibility based on variables value
if [ "$isVisible" = FALSE ]
then
defaults write com.apple.finder AppleShowAllFiles TRUE
else
defaults write com.apple.finder AppleShowAllFiles FALSE
fi

# force changes by restarting Finder
killall Finder

You can also download an Automator application which will toggle hidden file visibility here:

http://www.brooksandrus.com/downloads/show_files.zip

Solution 4:

You can also create alias for this to something that you can remember. Just add the following into your .bash_login:

alias show_hidden_files='defaults write com.apple.finder AppleShowAllFiles TRUE && killall Finder';

alias hide_hidden_files='defaults write com.apple.finder AppleShowAllFiles FALSE && killall Finder';