Stuck (almost uselessly) in /Developer/Tools/ are two rather incredible little guys you should immediately link (ln -s) right into /usr/bin/. They are GetFileInfo and SetFile.
For more on how to use these tools, including exactly how to create the links and how to hide a given volume on the desktop (for example), read the rest of this article.
The first thing to do is to link the tools into the standard bin directory. Type this in your Terminal window:
sudo ln -s /Developer/Tools/GetFileInfo /usr/bin/getinfoNote that we're assuming you have the Developer Tools installed! Now type rehash to make sure the system is aware of the new applications.
sudo ln -s /Developer/Tools/SetFile /usr/bin/setfile
getinfo /Volumes/swapYou should see something like this:
directory: "/Volumes/swap"That lower-case "v" on the attributes line denotes a "0" (as opposed to "1") for the attribute "is invisible." That is quite easy to fix, with SetFile, which we cleverly ln'ed into a useful location:
type: ""
creator: ""
attributes: avbstclinmed
created: 10/05/2001 22:31:07
modified: 10/18/2001 20:10:53
sudo setfile -a V /Volumes/swapA getinfo of /Volumes/swap should now reveal a V in the attributes line. A quick relaunch of the Finder is now all that stands between you and an invisible swap partition.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20011018172352562