Is there a key combination I can use to show/hide hidden items in Finder?

  • 1
    No - it's not a thing Finder wants to do at run time. There are plenty of ways to automate changing the hidden preference and killing finder - launchd will make a new finder which will read the changed settings - but it's more like substituting in a new player in a sports match.
    – bmike
    Jul 25, 2011 at 19:44

3 Answers 3


I don't think you can do this by default.

I myself use Hidden Files widget. it's so easy to use.

alt text


You can do it with two small shell scripts:

This will reveal the "invisible" files:

# make invisible files visible
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

This will hide the "invisible" files made visible:

# make visible files invisible
defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder

Save each into an appropriately named file, set their executable bits using chmod, then you can run them to set or unset the visibility.

Alternately, you could use the following code, and toggle back and forth by executing the code repeatedly:


showFiles=`defaults read com.apple.finder AppleShowAllFiles`
if [ "$showFiles" = 1 ]
 then defaults write com.apple.finder AppleShowAllFiles -bool FALSE
 else defaults write com.apple.finder AppleShowAllFiles -bool TRUE

killall Finder

I have an AppleScript I use to toggle things like these off and on:


The code:

property showAllFiles : missing value -- missing value is AppleScript equivalent of nil or NULL

    set showAllFiles to (do shell script "/usr/bin/defaults read -g AppleShowAllFiles")
on error
    set showAllFiles to "0"
end try

tell application "Finder" to quit

if showAllFiles = "0" then
    do shell script "/usr/bin/defaults write -g AppleShowAllFiles 1"
    say "AppleShowAllFiles 1"
    --say "Now showing invisible files"
else if (showAllFiles = "1") then
    do shell script "/usr/bin/defaults write -g AppleShowAllFiles 0"
    say "AppleShowAllFiles 0"
    --say "Now hiding invisible files"
end if

tell application "Finder" to activate

(Note, you can open up the downloaded AppleScript by dragging it to the icon of AppleScript Editor.app).

I generally prefer to tell applications to quit rather than kill them (though, with the sudden termination feature introduced in 10.6, that can sometimes be the same thing).

Oh, mine differs from Greg's in that I set it for the global preference domain (so that it affects all apps, including the Open and Save dialogs). (Though you can always toggle invisible files off or on in Open or Save panels using Command-Shift-period ).

You must log in to answer this question.

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