To display all hidden files, open up the terminal and type,
defaults write com.apple.finder AppleShowAllFiles TRUE
Change “TRUE” to “FALSE” to hide the files
Then restart the Finder
Update Apparently this first method no longer works with the newer update of Leopard, so I’ve added a couple of alternative methods.
1) In Mac OS X, files and folders can be hidden by putting a “.” (without the quotes) in front of the file name.
2) Open up the terminal and type,
mv ~/Desktop/File ~/Desktop/.File
An easy way to get the paths is to type mv (don’t forget the space), drag the folder or file you want hidden into the terminal twice, and using the arrow keys add a . before the last file name.
3) Open up the terminal and type,
chflags hidden ~/Desktop/File
Again, you can get the path using the drag’n’drop method. Also, this method doesn’t hide the file in the terminal. To reverse it use nohidden instead of hidden.