How to hide or show hidden files on Mac when you have to show your Mac with someone else chances are that you don’t want him or her to have free access to all of your files. Since you cannot always create a new account for each guest user, here is how to hide files and folders that you don’t want others to see.
How to hide the files or folder on a Mac
Let’s say we want to hide the invoice PDF file, what to do? In your finder menu click go utilities and choose Terminal. Terminal will open a new command window in this window type the following command that will hide your file.
In parentheses type:
chflags space hidden and a single space now drag the file that you want to hide to the terminal window the name of the file will be added to the command. Click the Return key, that will activate the file adding command.
Just in the same way, you can hide a folder. Check how I hide the folder with our personal photos. Here you go, our Mac is ready for guest browsing when you’re back to working on your Mac, you probably want to unhide your files and folders.
To do that open up the terminal window again and while being inside the window press the Up Arrow key that will reveal the last command performed by terminal, use the Arrow key to reach the word hidden inside the command and change it to non-hidden press the return key to unhide the file or folder.
If you need to hide a lot of files and folders from time to time we suggest you create a special hidden file/folder when you temporarily transfer them all. You’ve just learned how to hide and keep partners on your Mac.