Hide Any File Or Folder On Your Mac With A Simple Terminal Command

Mac: Need to hide your secret diary or another file? You can do it with one terminal command on the Mac. If you want it back, the command to show it works just as easily.

To hide, just type this:

chflags hidden /path/to/file-or-folder To unhide it, just change hidden to nohidden

chflags nohidden /path/to/file-or-folder

Don't know the path or don't feel like typing it? Just type the command and drag that file or folder onto the Terminal window and press enter. Your Mac will handle the rest.

OS X: Hiding Items with the Terminal [The Mac Observer]


    You have "discovered" the permission flags that have been built into Unix since it was first released. If you clear the "read" permission on a directory, you can't read its contents.
    Macs just have a slightly more intuitive command for setting this up.

Join the discussion!

Trending Stories Right Now