![]() |
| setfile
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 terminal! 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 setfile: a swiss-army-knife for file attributesSetFile 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
Once you have it installed in your PATH (the chmod +x command makes it executable), type setfile in the terminal (you might need to open a fresh terminal window), and you'll see this..setfile [option...] file...
or in english..setfile -a V somefile.jpgwould 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 tools now!!! You need them for more fun having in your OS X terminal of. |
|
;o) cor |
|
| random word from corzblog: completely |
speedy gonzales timer say this page generated in 0.012 seconds | yletelpmoc :golbzroc morf drow modnar |
doesn't work :-\ still completely visible in the finder
Maybe you have invisible files enabled, like with TinkerTool, or some other finder hack (it's a simple plist hack). I do.
It's ugly, but I need to see even invisible files.
;o)
(or
i agree it doesn't work still visable
oops my bad
All I had to do was to relaunch Finder for it to take effect.
Cheers cor
hey no worries!
sometimes simply re-opening a window will do it, too.
have fun!
;o)
(or
setfile is amazing. Just what I was looking for. I had about 10,000 JPEGs that were transferred out of a proprietary database and when exported had unknown values for the creation dates. Combined with EXIFutils I was able to cobble together an AppleScript to pull the date from the filename and set it as creation date with setfile then add it as capture date with EXIFutils.
My only comment would be why not conform to ISO8601 date/time standards? Not a big deal as EXIFutils uses it's own format as well.
Thanks.
Andy
doesn't work:
nottelling:/Volumes/iPod root# /Users/pandt/Desktop/setfile -a V sbin lib mnt proc sys dev etc tmp usr var home
su: /Users/pandt/Desktop/setfile: Permission denied
Oh and dont worry i wuzn't trying to hide apple macintosh files just ipl files
first do..
chmox +x /Users/pandt/Desktop/setfile
or better still, follow the instructions above!
;o)
(or
still visible even when i relaunch finder
Off the top of my head, perhaps you have a recent version of OS X and need an updated setfile. Grab the latest dev tools and see if it works. If so, mail me a copy, I'll bung it here.
I haven't played with recent versions of OS X, my mac is “en panne”, like the Pool tables in every single Hotel in France.
;o)
(or
What's wrong with adding a . to the beginning of the name? Granted, it's not the proprietary HFS+ way, but the Unix/BSD way, but it works just as well.
Hide:
mv filename .filename
Unhide:
mv .filename filename
Well, firstly, there's the "more typing" part. It looks nice on paper, but you still have to get into that directory to do something so cute. With setfile, you simply type one command, and then drag-and-drop your file. It's been a long time since I've been near a Mac, but I'm pretty sure Mac users prefer this kind of approach.
Then there's the trouble folk will get into when, thinking this dot thing is a cool idea, they try to do it in the Finder, instead. Ouch!
Also, it's pretty ugly, and folk might not want the name of the file to change. But of course, technically, there's nothing "wrong" with your method of making files invisible; it's the method I use on my own *nix boxes; but only because there isn't a better one.
Anyway, it was just one example of setfile's many tricks, which is what the page is about.
;o)
(or
Does it matter if the -a is uppercase or lowercase?
On another site that was explaining this stuff it mentioned that -a means 0 and -A means one...
BrocknessMonsta, It is explained fully in the article, above (help output).
;o)
Cor