The most common way to show the hidden files and folders on a mac is via the terminal. Although it gets the job done, its a tedious process requiring me to:
- Fire up the terminal
- google the command to show hidden files
- paste ‘defaults write com.apple.finder AppleShowAllFiles YES’
- relaunch the finder
And once done with my job, i don’t want to keep seeing all the hidden system files everywhere so I need again:
- fire up the terminal
- google the command to hide hidden files
- paste ‘defaults write com.apple.finder AppleShowAllFiles NO’
Well all this makes me try and avoid the task whole together. Ideally it should be just one call to toggle the hidden mode state. I find the best way to to do this is have a workflow app. This app just checks and toggles the status of hidden files flag. As a bonus it relaunches the finder for you.
So in essence all you need to do is:
- Hit command + space (to bring up spotlight)
- type ‘sh’ or ‘sho’ or ‘show’ etc.
- hit return
And when you are done, you just need to do the same again!
Here is a download link to this app/widget. (just make sure you put it in a location that spotlight can search, Applications folder will do nicely)
This is based on a apple script I found on some online forum.
# check if hidden files are visible and store result in a variable
isVisible=”$(defaults read com.apple.finder AppleShowAllFiles)”
# toggle visibility based on variables value
if [ “$isVisible” = FALSE ]
defaults write com.apple.finder AppleShowAllFiles TRUE
defaults write com.apple.finder AppleShowAllFiles FALSE
# force changes by restarting Finder