Site icon ChrisWrites.com

How to hide songs, movies, photos and more on your Mac

Is there a file or folder on your Mac that you’d prefer to keep under wraps?

Maybe it’s a guilty-pleasure song or movie; perhaps you share your Mac with other users and are sick of them snooping around your folders, or maybe your Mac contains some particularly sensitive files, and you want the added security of knowing that these files won’t be immediately visible the moment anyone opens a Finder window on your Mac.

Whatever your motivation, hiding a file or folder can help keep your most private, sensitive, or downright embarrassing content safe from prying eyes. When a file or folder is hidden, it won’t appear in the Finder, but it also won’t appear in search results such as Spotlight searches.

After completing this article, you’ll know how to hide any file or folder using your Mac’s Terminal, and will know how to uncover previously-hidden items, even if you’ve completely forgotten where these items are located on your Mac.

Hide any file or folder, using Terminal’s chflags

Before you dive in and start hiding files and folders, there’s a few points worth bearing in mind:

Once you’ve organised all the items you want to hide and decided where to store them, you can hide this content by completing the following steps:

chflags hidden

If you encounter a ‘Permission denied’ error message when you try to run the ‘chflags hidden’ command, then you’ll need to enter the following command into the Terminal:

sudo chflags hidden

Then, enter your admin password, and you should be able to run the regular ‘chflags hidden’ command without any issues.


Accessing hidden files and folders

Once you’ve hidden a file or folder, chances are you won’t want it to stay hidden forever – at some point you may need to access or edit this content, and you may even change your mind and decide to make these items permanently visible.

In the rest of this article, we’re going to look at several ways that you can coax a file or folder out of hiding.


Making a hidden folder temporarily visible

Assuming that you’re trying to uncover a hidden folder and you know its exact location, you can gain temporary access via your Mac’s Finder:

Make a hidden item permanently visible

If you want to make a file or folder permanently visible, then:

This item will now be permanently visible in your Finder, even if you close and then relaunch the Finder window, and will also appear in other locations, such as in Spotlight search results.


Forgot where a hidden file or folder is located?

The techniques we’ve covered so far rely on you knowing the exact location of the file or folder, plus its file name. However, if you can’t quite remember whether you hid an item in your Desktop or Documents folder, or whether it had a PNG or JPEG extension, then all is not lost! There’s still a few different ways that you can uncover this hidden file or folder.

If you have a few ideas about where you might have stashed the item you’re looking for, then you use the Terminal to display a list of all the files and folders located in each directory – crucially, this Terminal output will include any hidden files and folders.

Launch your Mac’s Terminal, and then type the following command, followed by the directory that you suspect might contain your hidden items:

ls -a

For example:

ls -a /Users/jessicathornsby/Documents


Show All Hidden Files and Folders

If you have absolutely no idea where an item is hidden, or you have a list of hidden files and folders that you need to gain access to, then it might be quicker to simply reveal all the hidden items scattered across your Mac, using either a Terminal command or a keyboard shortcut.

To use the keyboard shortcut, open a Finder window and then press the ‘Command+Shift+Period’ keys. At this point all of your previously-hidden items should appear in the Finder as dimmed, transparent icons.

Note that these “hidden” items will continue to be displayed, even if you exit the Finder and then relaunch it, so make sure you re-hide these items when you’re finished, by repeating the ‘Command+Shift+Period’ shortcut.

Alternatively, you can reveal every hidden file and folder across your system, by copy/pasting the following command into the Terminal:

defaults write com.apple.finder AppleShowAllFiles TRUE;killall Finder

Press the ‘Enter’ key, then open a Finder window. Your hidden items should now appear as dimmed icons.

To return every item across your Mac to its hidden state, run the following Terminal command:

defaults write com.apple.Finder AppleShowAllFiles FALSE;killall Finder

The Finder will close and then relaunch automatically, at which point your hidden files and folders will no longer be visible.

Exit mobile version