Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|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 AppleShowAllFiles True flag. – chb Mar 14 '12 at 8:37
up vote 7 down vote accepted

Open a Terminal and enter:

defaults write AppleShowAllFiles TRUE

Then, relaunch Finder by typing:

killall Finder

To reverse that, just enter:

defaults write AppleShowAllFiles FALSE
share|improve this answer

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:

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

share|improve this answer
The link doesn't work for me, and you don't explain HOW to add it to the Services Menu. Can you edit your question to include the information? – Canadian Luke Oct 20 '12 at 18:55
This service/app are essentially Run AppleScript Automator actions that wrap the defaults and killall calls in a dialog-driven ("Do you want to relaunch Finder?") workflow. – Daniel Beck Oct 20 '12 at 21:01

You can use this script toggle between states:

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

# toggle visibility based on variables value
if [ "$isVisible" = FALSE ]
defaults write AppleShowAllFiles TRUE
defaults write AppleShowAllFiles FALSE

# force changes by restarting Finder
killall Finder

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

share|improve this answer
It doesn't work on Mavericks. – Altaveron Oct 28 '13 at 8:00
for Mavericks use instead of – Antonio Oct 28 '13 at 12:21
It doesn't work too. Something wrong on if section. – Altaveron Oct 28 '13 at 12:51
With Mavericks, the default value is apparently 0; 0 and 1 work as values as well as TRUE, true, FALSE, false, yes, and no. So it is indeed the condition in the if statement that is the problem here. I'd rather use case here for the multiple possible values. – JyrgenN Aug 21 '14 at 7:25

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 AppleShowAllFiles TRUE && killall Finder';

alias hide_hidden_files='defaults write AppleShowAllFiles FALSE && killall Finder';
share|improve this answer

Save this applescript into a service to make it available from the Finder menu. It will allow you to toggle hidden files on or off and when you relaunch Finder it will reopen to the directory you were previously in:

tell application "Finder"
    set windowTargets to target of Finder windows
end tell

set OnOff to do shell script "defaults read AppleShowAllFiles"
    if OnOff = "NO" or OnOff = "OFF" then
        set OnOffCommand to "defaults write AppleShowAllFiles ON"
        set OnOffCommand to "defaults write AppleShowAllFiles OFF"
    end if

    do shell script OnOffCommand
    delay 1

    tell application "Finder" to launch
    tell application "Finder"

    repeat with aTarget in windowTargets
        make new Finder window at aTarget
    end repeat
end tell
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .