5

On any unix machine, Mac included, files and folders with dots at the start are normally invisible. However, it seems that the Mac has it's own type of hidden folder.

If I enable showing hidden files in Finder (defaults write com.apple.Finder AppleShowAllFiles YES), there are 70 dotfiles in my home directory. However, there are two hidden folder without dots: Trash and Library. In the root directory, there are several (lost+found, bin, cores, etc…).

Is it possible to make one of these folders that is hidden in Finder while keeping it's path the same (AKA not adding a dot)? I use a utility that needs a ~/tmp folder, and I'd love to hide it in finder.

6

You can use chflags

To hide a file from Finder

chflags hidden /Path/To/File

To unhide:

chflags nohidden /Path/To/File
  • 1
    Also, the ls -lO command will show file flags, including the hidden flag. – Gordon Davisson Oct 21 '13 at 2:53
  • does hiding from Finder different from it's access via terminal?? Currently, I have a file .DS_Store in a folder on my desktop and it is hidden if I access it via Finder but not when I do ls in terminal. – scipsycho Jun 6 at 4:11
  • You cannot hide files from the terminal commands. – Kent Jun 6 at 5:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .