Is there a keyboard shortcut to enable/disable hidden files in Finder? [duplicate]

Is there an easy way to show and then hide and then show and then hide (as in toggle) “hidden” files in macOS High Sierra?

I’ve found I can use the following terminal commands to show them:

 defaults write com.apple.finder AppleShowAllFiles TRUE

killall Finder

and then use these terminal commands to hide them:

defaults write com.apple.finder AppleShowAllFiles FALSE

killall Finder

but this is clumsy!

I then came across Onyx which allows me to do this at will, but unless I want to keep it open, it’s not a good option because it takes forever to launch!

I did check the list of keyboard shortcuts at this Apple website in the hope it may be that simple, but no go.

What is the absolute easiest way to enable/disable this option? If there's no keyboard shortcut, what's the next best option?


Actually, there is a keyboard shortcut you can use in macOS High Sierra. More specifically, you can use command + shift + ..

In case that last key isn’t clear, it’s a period (aka full stop).