Using Terminal.
If you are at least a bit familiar with Unix and prefer to use Terminal to accomplish this toggling of invisibility status, you can easily do so. One advantage of using Terminal is that files that are otherwise invisible in the Finder can be easily listed in Terminal.
For starters, you can accomplish the same changes just described with Property List Editor by using the defaults command. Specifically, to make invisible files visible, type the following: defaults write com.apple.finder AppleShowAllFiles Yes.
To toggle the invisibility bit of a single file, however, you’ll again need help from Apple's Xcode Tools software. This time you need a Unix program called SetFile. You'll find it, together with a collection of other Unix software, in the /Developer/Tools directory.
By default, the software in the Tools directory will not run simply by typing the name of the program (there are many ways to resolve this inconvenience, but that's a subject for another article). Here's the quickest and easiest way to put SetFile in action and use it modify a file's invisibility status:
Launch Terminal.
Open the /Developer/Tools folder in the Finder. Locate SetFile and drag its icon to the terminal window. The Directory path for SetFile (/Developer/Tools/SetFile) should appear in the Unix command line prompt.
Type: -a V . Leave a space after the upper case V.
Locate the file that you want to make invisible. Drag its icon to the Terminal window. Its path should now be added to the same command line prompt.
Thus, for our aforementioned MyDoc file on the Desktop, when you are done doing all of the above, the command line should look like this:
/Developer/Tools/SetFile -a V /Users/homedirectoryname/Desktop/MyDoc
where homedirectoryname is the name of your home directory (mine is landau, for example).