On Unix-like systems (e.g. Linux and OSX) you can make a file invisible with the following command:
setFile -a V /Users/userid/Desktop/untitled\ folder
To make it visible again, just change the V to a lower case v.
setFile -a v /Users/userid/Desktop/untitled\ folder
In this example, from OSX, I typed setFile -a V and then dragged a folder from the desktop to the command line. userid is really my userid. Unless you changed it, it is the same as your command prompt i.e userid$. It’s a bit harder to make a file visible, since you can’t drag it in from the finder.