On MacOS, you can easily hide files or folders by using the command line. This can be useful if you want to keep certain files out of sight without deleting them.
To do this, first open a terminal window. You can do this by pressing Command+Space, typing “Terminal,” and pressing Enter. In the terminal window that appears, use the command chflags hidden <file path>
, replacing <file path>
with the path to the file or folder you want to hide. This command marks the file or folder as hidden, making it no longer visible in Finder.
If you later decide that you want to make the file or folder visible again, you can use the same command with nohidden
instead of hidden
. This will make the file or folder visible again in Finder.