I need an easy way to switch files visibility on Mac. I know about Terminal commands how to show hidden files and hide files. However, I need a tool to make this task faster and easier. I was trying to find a special app in the App Store, but found nothing. Is there any way to show/hide hidden files without launching Terminal? Any tips or apps?
6 Answers
On MacOS Sierra you can use shift ⇧ + cmd ⌘ + . shortcut on keyboard to toggle between 2 states. No need for any plugin/app. It works out of the box.
You can see it here in action: https://www.youtube.com/watch?v=pdLjJU_kAT8&feature=youtu.be
-
-
4
-
1This works fine; however, it relies on the
com.apple.finder AppleShowAllFiles
key existing (as do most of these solutions). This key does not exist by default, so you must create it by runningdefaults write com.apple.finder AppleShowAllFiles -bool FALSE
to create and initially set the key. Also this is nice in that the Finder does not need to restart for it work!– sdmeyersMar 28, 2019 at 15:26
Since Sierra this is no longer necessary - see the answer by Olgab
I just realised I've already posted this before - with instructions on how to persuade the use of Cmd ⌘ H , which otherwise is used for 'Hide frontmost app'
https://apple.stackexchange.com/a/177138/85275
This version has a fuller explanation of precisely how to create the service, so I'll leave it in, with the link.
You could write an Applescript, place it in an Automator Service, then trigger it by Key Command...
The following will toggle the hidden state with each trigger of the hot key
- Launch Automator [Applications/Utilities]
- Select New Service
- In the Actions list on the left, Select Automator, then Run Applescript from the 2nd column.
- Copy/Paste the script [full text at the end of this answer]
Make sure you don't get the on run/end run section twice when pasting. - Save [It will automatically save to the correct place for Services.
- Open System Preferences > Keyboard > Shortcuts > Services. Your new service will be right at the bottom of the list.
- Add a hot key
Script text...
on run {input, parameters} --Toggle Invisibles, El Capitan Version set newHiddenVisiblesState to "YES" try set oldHiddenVisiblesState to do shell script "defaults read com.apple.finder AppleShowAllFiles" if oldHiddenVisiblesState is in {"1", "YES"} then set newHiddenVisiblesState to "NO" end if end try do shell script "defaults write com.apple.finder AppleShowAllFiles " & newHiddenVisiblesState do shell script "killall Finder" return input end run
Since El Capitan you do need to explicitly relaunch the Finder. Prior OSes, you could refresh the views.
I like Tetsujin's approach. In fact, it's a shame most Mac users never familiarise themselves with AppleScript and Automator.
However, if you're after an off-the-shelf solution you can opt for Onyx. Onyx is a powerful tool that can perform a lot of functions. It is free to use and no registration is necessary.
In particular reference to your question, to hide/unhide hidden files and folders, go to the Parameters page, select the Finder tab and check/uncheck the relevant option. See screenshot below:
NOTE: I have no affiliation with the Onyx product.
-
This is perfect. The version you need for El Capitan is 3.1.9, and you can find all previous versions here: titanium-software.fr/en/onyx.html– zeepleFeb 21, 2018 at 0:23
"invisible" is a free app in appstore that I am using to see the hidden files on my mac. It works actually great for me. Why not give it a try?
You can try the long way to show hidden Mac OS X files is as follows:
- Open Terminal found in Finder > Applications > Utilities
- In Terminal, paste the following: defaults write com.apple.finder AppleShowAllFiles YES
- Press return
- Hold the ‘Option/alt’ key, then right click on the Finder icon in the dock and click Relaunch.
This will show all hidden files. To hide them again, follow the same steps but replace the Terminal command with:
defaults write com.apple.finder AppleShowAllFiles NO
It’s not the longest set of instructions or the biggest command to commit to memory but if you’re doing this a lot, it’s worth spending a few minutes now to save yourself a lot more time in the future.
-
2The question says "Is there any way to show/hide hidden files without launching Terminal?" your step 4 says "In terminal ... ". Have you read the question? Oct 26, 2016 at 9:58
-
2