ATTRIB for OS X!
I don't know if anyone's noticed, but when you install the apple developer tools,
as well as the usual applications, examples, documentation, etc, there are some cute
CLI tools, that is; command line interface tools, or in other words.. tools of the
If you're scared of the terminal for some reason, this might be a great opportunity
to face your fears. You can't do much harm altering simple file attributes. *snigger*
The one we want is in
/Developer/Tools. Do this in the terminal..
"cd" is change directory. Now you are in that folder, you can run them with the --h switch, like this..
and get some useful information about what each of the tools actually does. Many are purely for developers, but some are more generally useful, like the wonderful SetFile. The best way I can think to describe it like attrib for OS X, and if you've never used DOS you won't have a clue what that is either! anyway..
setfile: a swiss-army-knife for file attributes
SetFile is so damned handy I renamed it to "setfile" (typing caps in the terminal just feels wrong) and put it into my PATH (specifically, in
/usr/local/bin, though that probably won't be in your path unless you are the kind that installs 3rd party unix binaries. If you want info on how to change your path, grab the "darkstat for OSX" distribution for more info, (darkstat also lives in
usr/local/bin which is an excellent place to keep all your own wee tools) If you don't have the dev tools installed, you can download a copy of setfile here.
As a work-around for folks who don't have
/usr/local/bin on there system and don't want to mess about with PATH statements, you could do a very nasty thing (this is evil) and drop it into
/usr/sbin which should already be in your path, like this:
- unzip setfile.gz (stuffit expander is good)
- drop it on your desktop, and
- do this in the terminal..
Once you have it installed in your PATH (the chmod +x command makes it executable), type
sudo mv ~/Desktop/setfile /usr/sbin/setfile
sudo chmod +x /usr/sbin/setfile
setfile in the terminal (you might need to open a fresh terminal window), and you'll see this..
setfile [option...] file...
-a attributes # attributes (lowercase = 0, uppercase = 1)*
-c creator # file creator
-d date # creation date (mm/dd/[yy]yy [hh:mm[:ss] [AM | PM]])*
-m date # modification date (mm/dd/[yy]yy [hh:mm[:ss] [AM | PM]])*
-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
S System (name locked)
C Custom icon*
N No INIT resources
M Shared (can run multiple times)
E Hidden extension*
Note: Options/attributes marked with an asterisk (*) are allowed with folders
or in english..
setfile -a V somefile.jpg
would make somefile.jpg . . . invisible!
In the Terminal, type..
setfile -a V <-- there's a space at the end of that!
then simply drag somefile.jpg onto the terminal. The filename, with full path, is pasted into place! Oh Macness!!!
Which answers the long-standing "How do I make something invisible without using 3rd party apps?"
Perfect for those hot disks..
Installing the dev
You need them for more fun having in your OS X terminal of.