In some circumstances you would like to make some private files out of view, so as to stop prying eyes or avoid mistakenly deletion. Then how to hide files or folders on macOS Sierra? And how to show those hidden items when you need to? Finder does not offer a built-in option to hide an item. The alternative way of hiding an item is to use the chflags command in Terminal. This tutorial will show you how to hide any file or folders on macOS Sierra and how to view the hidden ones.
Terminal is the built-in app that can help hide files and folders with easy steps. There are multiple ways to access Terminal app on Mac and you can choose one of them:
1.Launch Finder and open up Terminal in the /Applications/Utilities folder.
2.Press Command + Space keys simultaneously, type Terminal and hit Enter key.
3.In Finder, head to the Go menu, choose Utilities and then Terminal.
As the Terminal launches, a new command window will appear. Then you can type the following command: chflags hidden. Make sure to press the space key twice before and after typing the command. Now you can locate the file or folder you want to hide, and drag its icon to the command window. As soon as you drop the items into the Terminal window, the file/folder path will appear behind the command. Hit the Enter key to execute the hidden command.
The select item will disappear from view in the Finder. If you hide a folder by this way, the folder and all its contents will disappear as well. Yet they are not deleted and still in the original location.
You can type the name of the file/folder behind the chflags hidden command instead of dragging the item to the command window. The correct format of hidden command is: chflags hidden . If the filename contains spaces, you’d better put quotes around it like: chflags hidden “~/Documents/Hide This Folder”.
After hiding the file or folder, you might need to view it occasionally. The process is pretty simple. You just need to repeat the same steps above, and use the same command with the nohidden flag ( chflags nohidden ) to show the hidden item. The key is to remember the name of the hidden file or folder.
Advanced users can utilize Automator to create a workflow to hide and show items more conveniently. Besides, you can encrypt your entire hard drive using the built-in FileVault so that others cannot access to your contents unless knowing your password.
If you are interested, let us know and related guide will be coming soon.