How to Easily Hide A File/Folder In Mac

In Linux, it is simple to hide a file by appending a “.” on the beginning of the filename. In Mac, you won’t be capable of do this.

The option would be simple. All you need is to use the “chflags” command.

1. Open a terminal in Mac (Utilities -> Terminal).

2. Type the command:

chflags hidden /path/to/file

and press Enter. Your file/folder will magically disappear through the scene.

3. To unhide the file/folder, utilize the command:

chflags nohidden /path/to/file

Hide File/Folder From the Context Menu

With the help of Automator, we can easily easily develop a service to hide your file/folder directly through the context menu.

1. Open Automator. Choose “Services”.

2. For the “Services selected receives” field, select “files or folders” and “Finder”.


3. Next, drag and drop “Run shell script” from your Action for the Workflow section. Select “as arguments” for the Pass Input field. Paste these script:

for f in "$@" do chflags hidden "$f" done

and save the service as “Hide”.

Now, you should manage to find the “Hide” option in the context menu whenever you select and right click on personal files/folder.

The disadvantage concerning this script is you can only use it to disguise the file. You won’t have the ability to use it to unhide the file. To do so, you have to work with the terminal.

Title Post: How to Easily Hide A File/Folder In Mac
Rating: 100% based on 99998 ratings. 5 user reviews.
Author: SharedTutor

Thank you for visiting, If there is criticism and suggestions please leave a comment

About The Author

Someone who always wanted to know about the beauty of the world :)