Today's post is going to concern hidden files, and the two ways to create them on Mac OS X.
Two ways? Yes. Had I read this a week ago, I would have been deeply disturbed. But as I installed iWork yesterday and saw that the background picture file of the install disk had no dot appended to it's name, and was invisible nonetheless, I was compelled to investigate.
*Note* The second method requires Developer Tools. Go Get'um!
http://developer.apple.com/
As I hinted in the intro, the first and most widely known way Finder (Apple's file manager, which displays file location, etc. to the user) recognizes hidden files is by appending a dot to the name of the file/folder in question. For example, below I will use "mv" to rename a folder on my desktop. The original "path" (location and name) is on the left, followed on the right by any location changes and name changes I might want.
mv ~/Desktop/MegaPower ~/Desktop/.MegaPower
And Bazam! It's vanished. If you run the applescripts I've got available on my downloads site, or if your run:
ls -A
In the command line, you'll be able to see them, but otherwise no.
The other way is a bit trickier, and doesn't apply in a traditional Unix setting. As I've been able to piece together, the information executed in the following command is recorded in the concerned file's metadata (extra info that the system uses for cataloguing, etc).
mkdir ~/Desktop/UltraLord
SetFile -a V ~/Desktop/UltraLord
And there we go. Same effect, but without adding an annoying dot to the name of the file/folder. To help you remember:
SetFile -attributes Vistability/visability Path
A lowercase 'V' will make the folder visible again. Fun, but scary, right?
Malware will have a ball on Mac OS X if it ever manages to find a hole in the Mac's impenetrable armor.
No comments:
Post a Comment