I find myself having to look up how to show and hide hidden files and folders on my MacBook Air quite a bit so I’m starting a new category on this blog called Reference where I’ll just post anything that might help me or others reference things quickly. The first Reference post will be on how to show and hide files on Mac OSX from the command line.
Access Your Library
Every user has a Library folder on OSX which is where important application data is stored. Sometimes you may need to get into it to customize settings for a program or clear out old files. I’ve recently been working with it a lot to access Sublime Text 2’s Packages folder where I’m developing a Sublime Text plugin that lets you save files directly from ST2 to Write.app. Anyway, this one’s easy:
Just hold down the
Alt) key while in the ‘Go’ menu while user Finder.
Show hidden files or folders
*Disclaimer: Before you begin, please know that hidden files and folders are hidden for a reason. Most of the time anything hidden is used by the system or other apps and doesn’t need to be messed with unless you really know what you’re doing. Playing with hidden files and folders can be hazardous to your sanity if you mess something up. I assume most people reading this are beginners at this stuff so I had to get that out of the way first.
The first command writes to the settings file in OSX that controls the visibility of files and folders. All it does is change that part of the file from reading ‘FALSE’ to ‘TRUE’ with ‘TRUE’ meaning that you can see hidden files and folders.
The second command restarts the Finder. It “kills” or quits all running instances of the Finder then reopens them. This is necessary for the settings change to take effect.
To set it back to hiding hidden files you just have to run the opposite commands like this:
I know there’s lots of apps that’ll show and hide hidden files or folders but why clutter your hard drive with something like that when you already have the tools at your disposal? I mean, it’s no secret and the apps you might find are doing the exact same thing except all that is hidden from you behind some uneccessary buttons. Apps that show and hide files are nice for tech noobs and all but you don’t need them. Use this method instead.