How do I show hidden files in Finder with a keyboard shortcut?

⇧⌘. shows hidden files in file dialogs and in some third party applications like TotalFinder. Transmit also has a menu item for toggling hidden files, but it's assigned to ⇧⌘B by default.

There's nothing equivalent to that in Finder though. But you could assign a shortcut to a script like this with FastScripts or by creating an Automator service.

k="com.apple.finder AppleShowAllFiles"
[[ "$(defaults read $k)" == 0 ]] && b=true || b=false
defaults write $k -bool $b
osascript -e 'quit app "Finder"' && open -a Finder


defaults write com.apple.finder AppleShowAllFiles FALSE reverse it. And there is no such functionality (online hide/show without restart) built in into Finder.

That is probaly because anyone who need it will prefer ls -a anyway.) BTW If you only need to list hidden files use ls -ld .??*


There is a simple keyboard shortcut, at least since Sierra (macOS 10.12). Ensure that Finder is the active app and use this keyboard shortcut:

CommandShift. (that's a full stop/period at the end)