How to show hidden files in OSX Finder

If you came here only to do this, he command you’re looking for is defaults write com.apple.finder AppleShowAllFiles YES.

NOTE: To see this change reflected in any previously open window, you’ll need to close, change location, or, in the case of the desktop, kill the Finder entirely (killall Finder).

This is something I toggle on and off quite frequently though as the additional hidden files definitely add unwanted noise.

To reduce typing, I made a bash simple bash alias that utilises a function (as it does not appear bash aliases can accept arguments).

# Add an alias `hidden_files` that requires either YES or NO to indicate whether they should be shown or hidden # Usage - show hidden files: hidden_files YES # Usage - hide hidden files: hidden_files YES hidden_files_fn() { defaults write com.apple.finder AppleShowAllFiles $1 } alias hidden_files=hidden_files_fn

You can also find this as a gist at https://gist.github.com/ryan-blunden/127b13e496e4f055d440

Written by

Helping teams make sense of the Cloud, Containers, Microservices and DevOps.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store