OSX: Set Hidden File Flag on FAT32 Filesystem

On a Windows machine, it's easy to set a file or folder as hidden (or show it again). On Mac, it isn't quite so obvious. There's no option for this from the UI.

Like most Unix-inspired systems, OSX follows the convention that filenames are hidden if they start with a dot ( . ), but this doesn't translate well to Windows which doesn't obey this convention. A good example are the  annoying .DS_Store files that OSX leaves behind and stick out like a sore thumb on a Windows filesystem.

Well, instead of (or in addition to) prefixing files with a dot, you can set the hidden flag on the file and it won't show up. The command:

chflags hidden

To clear the hidden flag:

chflags nohidden

To see all files, even the hidden ones, from the command line:

ls -la

To show hidden files in Finder, use this command on Mavericks:

defaults write com.apple.finder AppleShowAllFiles TRUE

Use this for earlier versions of the OS:

defaults write com.apple.Finder AppleShowAllFiles TRUE

It seems crazy to me that they are different, finder vs. Finder -- that seems like it couldn't have been intentional?

Comments

Popular posts from this blog

FREE Delphi Starter Edition

Getting Homebrew Set Up For Non-Admin Account on Your Mac OSX 10.8

Mono Versions in Unity 3.5.7 and 4.3.4