Hide a file or folder

chflags ships with the system: “hidden” takes a file or folder out of Finder’s view without moving or changing it, and “nohidden” brings it back.

How

Hide it:

chflags hidden ~/Desktop/private-notes.txt

Show it again:

chflags nohidden ~/Desktop/private-notes.txt

Hidden is not locked or encrypted — anyone who shows hidden files (⌘⇧. in Finder) will see it. To actually protect it, use an encrypted disk image.

Or just ask Titan
Hide this folder from Finder. Do it with Titan

Titan is an AI that lives on your computer: tell it what you need and it does it while you watch — you press Return, nothing runs by itself. What is Titan?

Titan isn’t on this computer yet. Get Titan, then press the button again — the task will be waiting, typed in.

Related

Show hidden filesMake a password-protected folder