Hide or Show a File in Mac OS X Finder

Ever wanted to hide an individual file in Mac OS X Finder without prefixing it with a dot? Here’s how (you’ll need the Apple developer tools installed):
[code lang=”bash”]/Developer/Tools/SetFile -a V «filename»[/code]
…and to show it again:

[code lang=”bash”]/Developer/Tools/SetFile -a v «filename»[/code]

If you want the Finder to show all hidden files, use this command:

[code lang=”bash”]defaults write com.apple.finder AppleShowAllFiles -bool true[/code]

…and to hide them again:

[code lang=”bash”]defaults write com.apple.finder AppleShowAllFiles -bool false[/code]

You’ll need to relaunch the Finder after this. I can think of three ways:

  1. [code lang=”bash”]killall Finder[/code]
  2. The “Force Quit Applications” dialogue box
  3. Click and hold “Finder” in the Dock while also holding ‘option’.
This entry was posted in Apple, Mac OS X. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.