How to Quickly Show & Hide Hidden Files

Reading Time: < 1 minute.

In Unix based operating systems like macOS, a period placed before a file name hides the file. It’s useful for system files that the user shouldn’t be modifying. However, sometimes you need to access these hidden files. Perhaps you need to do maintenance or repairs. I regularly need to go into hidden files and folders in my job as a software developer.

Now, usually I do this in Terminal, where a command like “code .gitignore” or “ls -la” is enough to do what I need to do, but perhaps you want to do something else. Maybe you want to create a hidden directory on your desktop. Maybe you want to further hide that DMG file you made to protect your files.

Normally, I used a Terminal command to make these files visible in the Finder. Turns out, macOS doesn’t require a Terminal command anymore. Instead, you can just press Command + Shift + . in the Finder. This will quickly toggle the visibility of hidden files. Who knew?

macOS dialog boxes telling the user they can or cannot hide files.

You can hide files when hidden files are enabled. Otherwise, you can’t.

Interestingly, you can only create hidden files if you have this enabled. If you try to put a period before a file name with hidden files hidden, you won’t be able to do it. Enable hidden files, and they disappear!

There are plenty of reasons to use hidden files. Previously, the best reason not to was the difficulty of toggling their visibility. With this shortcut, that issue goes away. Just remember where you put everything!