My brother was telling me that there are lots of hidden files and folders on Mac systems so I’m naturally now quite curious about it all. How can I see all this hidden content on my MacBook Air and why is it hidden in the first place?
It turns out that while our modern operating systems are good at showing us a unified and coherent view of what’s going on with our files and folders, there’s a lot more going on behind the scenes. That’s as it should be: just as we don’t want to see all the nitty-gritty details of how our car works while we’re driving, so do we not want to carefully navigate around all of the not-human-friendly files and other content required to keep our devices humming along!
In fact, not only does MacOS have hidden files and folders, but every operating system, including your mobile devices, your SmartTV, and your fitness band, has lots of additional data files it requires to work properly. If you’ve seen Stranger Things it’s kind of like the “upside-down”, another world that seems similar to what we experience, but with a lot more strange and peculiar things. 😉
Not to worry, though, because if you just want to see what’s going on, that’s quite easily done. There are two main ways to view hidden files and folders, through the Finder or the Mac’s command line interface accessible through the Terminal command. Let’s start with the Finder…
VIEW HIDDEN FILES IN THE MAC FINDER
Apple is generally really good about documenting things but there’s a secret keyboard shortcut in the Mac Finder that instantly reveals all hidden content. Here’s my Desktop with its normal viewable file-only display:
Yes, I like to keep a clean and neat Desktop, as you can see. But more files are lurking behind the scenes. To reveal them press Command-Shift-period. Like magic lots more stuff appears:
WARNING: It’s important that you don’t try to edit, rename, or delete any of these files at risk of corrupting your file system but checking them out is totally fine.
The “.ini” file (“desktop.ini”) is a settings file related to the initialization of the folder when viewed and the “Thumbs.db” is a separate file that stores the thumbnail previews of files and other content in the file. The “$RECYCLE.BIN” is actually where all the content you drag into the Trash is stored and there are a couple of old junky files that are effectively system detritus and should be removed (“.test.swp” is a swap file, and “~$ock p…flier.docx” appears to be an abandoned Microsoft Word file).
Press Command-shift-period again to re-hide the files. You can do that at any point in the Finder, whether you’re looking at an external drive, an SD Card, or your main hard drive. Just be careful not to mess anything up!
VIEW HIDDEN FILES WITH TERMINAL
I’m an old-school command-line user (I started out with Unix, then Linux) so am very comfortable typing in commands to interact with my system. This is inherently a bit more dangerous, though, because if you mistype, you can cause unexpected things to happen, which could be double plus ungood, as OG nerds might say. If you’re curious about this hidden side of your Mac system, however, you can find an app called Terminal in Applications > Utilities. Open it and you then type in what you want the system to do.
To list files, “ls” is the command, and the addition of the “-l” flag gives you a so-called long (detailed) listing. When I do that in the same folder, you can see it’s a lot more detailed:
I’ve typed in “ls -l” on the top line and the Mac’s done the rest of the work, showing permissions, owner, group, size, last modified date, and, of course, the file. Compare it with the Finder display and you’ll see it doesn’t differentiate between visible and hidden files (well, except it hides those that start with a “.” like “.test.swp”, but you can add those by changing “-h” to “-ha” to add all files).
Here you can see that the Thumbs.db file is pretty big. This is in bytes, but it’s 25,995,776 bytes or 25MB. Still a tiny fraction of the size of modern storage devices, but quite a bit bigger than anything else in this directory.
This is a good place to try and remove that stray Microsoft Word doc, which is done by using quotes and typing in exactly the filename:
You can see that the first time I tried double-quotes (look closely to see) and the command line interface, known as the “shell”, tried to expand $0ck and failed to then make a file match. The “rm” remove command then generated an error. I fixed it by changing the double-quotes to single-quotes and its lack of output revealed that it worked. That was confirmed when I did a second “ls -l” and the .docx file is no longer present.
Needless to say, you’ll probably want some training before you start removing files at the command line, but it’s hopefully interesting to see what can be done nonetheless.
One more tiny addition: Instead of “-l”, if you use “-lh” you’ll find that file sizes are more easy to understand:
It’s a bit lost in the tabular data, but a close inspection reveals that the Thumbs.db file is indeed 25M.
Now you know how to check out your invisible files and folders on your Mac. Please be careful as you explore!
Pro Tip: I’ve been writing about MacOS since the first release and have hundreds of helpful tutorials here on the site. Please check out my Mac help library for lots more useful content while you’re here!