The Easiest Way to Hide Files and Folders on a Mac

the-easiest-way-to-hide-files-and-folders-on-a-mac photo 1

Doing stuff on a Mac is supposed to be so easy and intuitive, that it’s surprising when something isn’t. There are several ways to “hide” stuff on a Mac, but only one of them really works well enough for us to recommend.

It’s not even about hiding stuff so others can’t see it. Sometimes you may simply want to hide something because you want to declutter your system. For example, if you move your Windows documents to the cloud, you will notice that many applications will often use your Documents folder for saving. Games too will often create their own folders in Documents.

The problem is that soon your Documents folder can become cluttered with all these new folders. If you’re using Windows, you can easily hide stuff using folder preferences.

the-easiest-way-to-hide-files-and-folders-on-a-mac photo 2

Windows folders: Now you see ’em … now you don’t.

With OS X, it isn’t so easy (every operating system has a way to do it), and it might not be such an issue for a lot of users, but eventually there may come a time when you can’t delete a folder or file, but you also don’t want to see it.

the-easiest-way-to-hide-files-and-folders-on-a-mac photo 3

Command Line, Take Them Away!

To hide stuff on OS X, the best method is to use the Terminal, which can be accessed by either double-clicking it from Applications, or using Spotlight, which is ideally suited for launching apps that aren’t pinned to your Dock.

the-easiest-way-to-hide-files-and-folders-on-a-mac photo 4

With our Terminal open, we use a single command and some dragging-and-dropping to hide whatever we want out of view.

the-easiest-way-to-hide-files-and-folders-on-a-mac photo 5

Here’s our Documents folder on OneDrive as seen in OS X’s Finder.

the-easiest-way-to-hide-files-and-folders-on-a-mac photo 6

You remember that earlier Windows screenshot? All we needed to do to clean up this folder was to hide everything we didn’t want to see with a simple right-click.

the-easiest-way-to-hide-files-and-folders-on-a-mac photo 7

OS X doesn’t have that capability, and we can’t move these things because it might mess stuff up on our Windows machines because it’s synced to the cloud.

Returning to our Terminal window, we type the command “chflags hidden ” just like it is in the quotes. Make sure you add the space to the end; it’s important for what we’re about to do. Go the to the location where you want to hide stuff, hold down the “Command” key and click to select all the files and folders you want to hide. Once you’re finished, simply drag them into the Terminal window.

the-easiest-way-to-hide-files-and-folders-on-a-mac photo 8

The command prompt will paste all the locations you just dragged behind the chflags command. Here’s an example of what that might look like. All you do now is hit “Return” and everything will disappear.

the-easiest-way-to-hide-files-and-folders-on-a-mac photo 9

This saves you a ton of time and typing because you don’t have to enter in each location and file by hand, and you also can hide a bunch of stuff at once.

the-easiest-way-to-hide-files-and-folders-on-a-mac photo 10

The end result is a much nicer and cleaner Documents folder, similar to what we created in Windows File Explorer.

Undoing What You Just Did

Undoing all this isn’t quite as easy, because when you open your folder, the stuff you have hidden won’t show. Again, in File Explorer, it’s a great deal easier to show hidden items.

the-easiest-way-to-hide-files-and-folders-on-a-mac photo 11

Nevertheless, open your OS X Terminal again, but this time navigate to the root folder where all your hidden stuff resides. In our example, it’s in our Documents folder, which is on our OneDrive.

We use the change directory (cd) command where, after “cd” you’d insert the path where you want to go. Again, you don’t have to type the path, you can simply drag the location over to Terminal. Just remember to add the space after “cd. ”

Once you’ve changed directories, type the “ls” command to list everything in the directory, and then use the “chflags nohidden” command. Stuff with spaces between words is denoted with a “\” such as “Microsoft\ Hardware” or “Custom\ Office\ Templates.”

the-easiest-way-to-hide-files-and-folders-on-a-mac photo 12

If you’ve ever used the Terminal, then you might know you don’t have to retype commands over and over. You can actually recycle command by using the up and down arrow keys. This is really convenient if you have a command or commands you need to execute over and over, but don’t want to type and type and type.

So, there you have it, hiding and unhiding folders and files in OS X. While it’s not exactly the most elegant method, it gets the job done.

Have another method or tips you would like share with us? Please, talk to us in our discussion forum.

More stories

Can I Plug a USB Device Right Into My Motherboard?

We’re all familiar with plugging in a USB cable or dongle into the external ports on our computers, but is it possible to plug a USB device directly into the motherboard so the device is hidden away and safely contained within the case of the computer? Read on as we show you how you can easily

Why are Ethernet/MAC Addresses Needed?

If you are still new to the whole networking thing, then it can be a bit overwhelming when you first start learning about the different kinds of addresses involved and how they work together. Today’s SuperUser Q&A post seeks to clear up the confusion for a curious reader.

How to Lock Screen Orientation in Android

The screen on your Android device switches between portrait and landscape mode in response to the way you hold the device when you run certain apps. Some devices, such as Google Nexus devices, the home screen switches screen orientation automatically by default.

How to Add Bluetooth to Your Computer

Although the majority of laptops now come with Bluetooth support (along with more than a few modern motherboards), there are still plenty of us in need of Bluetooth upgrades. If you’re rocking an older device or simply purchased a new device without Bluetooth support, don’t fret. Read on as we show