Hidden Files in Mac OS X

Having finally got around to uploading the original rss4jsp projects into SourceForge this evening I found myself with a problem – I was uploading all sorts of stuff that was not applicable. For example, Apple creates a .DS_Store file in every folder viewed by the Finder, to store information about how the folder looks in the Finder. Not essential to rss4java. For that matter, neither did I want to add my Eclipse files, but in they went…


A quick Google led me to Shane Duffy’s blog post on showing hidden files (in Unix this is anything that starts with a full stop). However this did not show folders (like the Eclipse .metadata folder). This turned out to be even easier than using Google – I just tried the obvious extrapolation.
Here they are then, the commands to show hidden files and folders (run them at the command prompt):

defaults write com.apple.finder AppleShowAllFiles TRUE
defaults write com.apple.finder AppleShowAllFolders TRUE

Once you’ve done this you need to shut down all the Finder instances:

killall Finder

Now open up a new Finder window – e.g. click on the desktop and then type Command-N. Boy, I bet the window you’re looking at is a bit messy now. However this enabled me to work my way through the project folders and remove all the hidden files.

Now I’ve done that I don’t want all my Finder windows cluttered with stuff I don’t need to work with every day. This then is how to hide all those hidden files again:

defaults write com.apple.finder AppleShowAllFiles FALSE
defaults write com.apple.finder AppleShowAllFolders FALSE

Once you’ve done this you again need to shut down all the Finder instances:

killall Finder

And that’s all there is to it. Thanks again to Shane Duffy for the original tip for showing and hiding hidden files.

Tags: ,

Comments are closed.