How to hide files and folders in macOS

We all have secrets, and the owners of Mac computers is no exception. Often there are situations when it is vital to hide from prying eyes certain folders and files. Fortunately, the desktop operating system macOS has all the capabilities to do so. Today we will touch on this topic, and let us examine step by step what to do.

Unlike the operating system Windows, macOS does not allow you to hide a file or folder with one click. Moreover — in the Finder, in principle, there is no option to hide files. However, this problem is solved simply enough — just refer to the multifunction command line macOS.

Now, how to hide a folder or file in macOS?

  • The first step is to run the Terminal application in any convenient way. It is easiest to do it through Spotlight.
  • In the command prompt window, type the following command: chflags hiddenand not pressing Enter to add a space.

  • You now need to select the folder or file you want to hide from others. Allocated and placed in a command prompt window. We confirm our intentions with the Enter button.

Everything is ready. The required file or folder will no longer appear in Finder.

It is necessary to take into account that the hidden documents you will still be able to find through Spotlight. To avoid this, you need to scan settings, add an exception:

  • Go to “System settings” – “Spotlight”

  • Clicking the “Privacy” tab, add a folder with hidden contents.

How to make a file or folder visible?

  • Re-run the application “Terminal”.
  • Turn on the show hidden files for this user.
  • After this enter in the command prompt window the following command: chflags nohidden and add a space.

  • Find your hidden file or folder in Finder and drag in the window “Terminal”. We confirm our choice.

To discuss this article in the comments or in our Telegram chat.

0 Comments on “How to hide files and folders in macOS”

Leave a Reply

Your email address will not be published. Required fields are marked *