This method has been posted all over the place, but I haven’t found a good step-by-step walkthrough that explains how and why to show hidden files on a Mac. As my students frequently ask for it, I’m posting here to keep in a reference.
I haven't found a solution, how to show hidden files in Finder since the update to OS X 10.9. I know how to show them in the Terminal but I want to see them in the Finder too. I know the Terminal-commands for showing hidden files in OS X 10.8. ('defaults write com.apple.finder AppleShowAllFiles TRUE&&killall Finder') but this doesn't work anymore.
How To Show Hidden Files On Mac
- How to show hidden files and folders in Mac OS X Viewing Hidden Files and Folders is extremely easy, well that is if you are using Windows Operating System, as you can just select view hidden files and folder option in it to toggle the display, but I did not even recognise that there are hidden files and folders in Mac OS.
- 1 Comment on How To Show Hidden Files in OS X In following the tutorials here at Almost Geek, you will often need to look at your systems hidden files for copy or move things around. OS X makes showing hidden files a chore, in fact I had to search for how to do it.
- How to Show Hidden Files and Folders on a Mac. This wikiHow teaches you how to view and unhide hidden files and folders on Mac OS X by using the Terminal app. If you don't have any hidden folders on your Mac, you can make one.
Update Aug 2019: you can do it with a simple keyboard shortcut
– (jump down to keyboard update).
Update 2014: there’s a third-party app for this now
– (jump to app update)
Who’s hiding what?
Have you ever noticed the “extra” files that you can see in your FTP client, yet seem to be missing from the local version of the site on your computer? Chances are, those files are on your local computer too, you just can’t see them. Mac OSX (and other operating systems) hide them by default so there’s less clutter, and so you don’t accidentally delete something important.
The most common example that I come across is the .htaccess file, because I work with WordPress frequently. Note how it begins with the period (dot) because htaccess is actually the file extension, not the file name. Most hidden files will begin with a period.
Show Hidden Files On Mac Os X
Sometimes when you’re coding for the web, you need to see the .htaccess and other hidden files to change something about your server setup, usually permalink and server configurtations.
Show hidden files on a Mac
To show hidden files, first open up the Terminal app. If you’ve never used this, it’s here:
Applications → Utilities → Terminal
The terminal window that pops up should look something like this, with your hard drive and user name in place of mine.
A quick note before you do anything: using Terminal without knowing what you’re doing can really screw up your computer. It’s not unsafe to do, you just have to be very careful not to type in any commands that you don’t intend to. As such make sure you’ve read the code below carefully and have typed it exactly as written! You have been warned.
Okay now, right after the dollar sign you can go ahead and type or paste in the code below, and press enter.
Nothing will happen yet, because you need to restart Finder for the changes to take effect. To do this, you can either press option+command+esc to open the Force Quit Applications window, select Finder from the list and hit “Relaunch”, or simply type in the code below in the Terminal window, and again press enter.
If you typed those lines correctly, your desktop icons should disappear for just a second while Finder restarts and the code in your finder window will look like the image screenshot below.
Now any hidden files on the system should be visible. If you’re not seeing the file you expected, it’s possible that your FTP client is not configured to pull down those hidden files, so you may need to check those settings also. And remember, deleting any system files can break stuff on your computer—if you’re going to go through this process, make sure you’re only editing stuff you know is pertinent to your site, like the .htaccess file.
And, since you don’t want to delete something by mistake, you probably want to hide the files again when you’re done editing your site…
Hide the files again
Back in the Terminal window, we need to basically write the same code again—this time we’re just changing the value of AppleShowAllFiles back to the default of FALSE:
Again, you need to restart Finder just like you did before with killall Finder or the Force Quit Applications window. And that’s, that.
Update: there’s an app for that.
I just came across a free, lightweight app called Funter that does this for you, and runs unobtrusively in the task bar. (There were lots of apps that did this previously, but they were neither free, nor lightweight.)
Maybe that’s a better option for some folks.
Update Aug. 2019: there’s a keyboard shortcut for that.
As Alesh has commented below, this is now as easy as a keyboard shortcut:
Hitting the period key while holding down Command and Shift, ⌘-⇧-. will show hidden files in finder. Hit it again and they disappear again.
I can confirm that the ⌘-⇧-. method is working in macOS Mojave version 10.14.5 as of Aug 2019.
Thanks so much Alesh for the comment!