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.

link|improve this question

You can use this keyboard shortcut. It works for me on Lion, though YMMV. It's especially handy for "Open File..." dialogs produced by applications like browsers because I've found these do not observe the defaults write com.apple.finder AppleShowAllFiles True flag. – chb Mar 14 at 8:37
feedback

3 Answers

up vote 5 down vote accepted

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
link|improve this answer
And defaults write com.apple.finder AppleShowAllFiles FALSE takes them back. Great! – OscarRyz Oct 9 '09 at 18:28
feedback

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

link|improve this answer
feedback

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';
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.