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
Let's say you created a separate partition to hold your swap directory. For clarity's sake, you called it swap. The dedicated swap partition thing is going great, but you are annoyed by the appearance of swap on your desktop and you don't want to hide all your drives. Just swap. Well, here we go:
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.
Attributes aren't the only handy part of SetFile, though. Executing SetFile with no options, arguments, or target files will return the proper usage guidelines, along with some rather extensive notes (I suppose that makes up for the lack of manual pages). Attributes, file creator, creation date, modification date, and file type are all at your fingertips.

