[X-Unix] SetFile
Doug McNutt
douglist at macnauchtan.com
Wed Jan 12 09:11:26 PST 2005
At 07:43 -0500 1/12/05, Rich Sweeny wrote:
> I have used the 'SetFile' command in the past to
>hide drives like this: 'sudo SetFile -a V /Volumes/swap'.
SetFile originates with Apple's MPW on OS 4 or so. It was never explicitly able to assign attributes to disks and I doubt that it has changed much. Finder displays disks on the desktop a bit differently than it does folders within an open window. If you have Finder showing the directory /Volumes/ I would expect the "directory" swap/ to disappear.
From MPW on OS 9:
help setfile
SetFile # set file/folder attributes
SetFile [option] file/folder
-a attributes # attributes (lowercase = 0, uppercase = 1)*
-c creator # file creator
-comments text # put "text" in the "Get Info" comments field
-d date # creation date (mm/dd/[yy]yy [hh:mm[:ss] [AM | PM]])*
-l h,v # ICON location (horizontal,vertical)*
-m date # modification date (mm/dd/[yy]yy [hh:mm[:ss] [AM | PM]])*
-noResolve # don't resolve aliases on the input file path
-t type # file type
Note: Period (.) represents the current date and time.
Note: [yy]yy < 100 assumes 20th century, e.g. 19yy
Note: The following attributes may be used with the -a option:
A Alias file
V Invisible*
B Bundle
S System (name locked)
T Stationary
C Custom icon*
L Locked
I Inited*
N No INIT resources
M Shared (can run multiple times)
W Always switch launch (if possible)
D Desktop*
Note: Options/attributes marked with an asterisk (*) are allowed with folders
--
--> There are 10 kinds of people: those who understand binary, and those who don't <--
More information about the X-Unix
mailing list