Wednesday, May 13, 2009

Power Tip #10: Terminology

This tip isn't so much a tip as a run through of important words that every good computer user ought to know.

First off, what's a kernel? Well, most every operating system has one, and Mac OS X's is called Darwin. A computer's kernel is a sort of program which doles out memory (RAM) to applications, what writes data onto the disk, and other sorts of things like that. A kernel is an integral part of the Mac OS X operating system. When thinking of the makeup of an operating system, it is helpful to think in layers, with the things a user sees at the top, and other things at the bottom. A kernel would qualify as one of those 'other things,' residing out of sight, right near the bottom.

Secondly, what's a volume? I've mentioned these a few times, and may have unknowingly confused my loyal readers. Just so you know, a volume is the place where data is stored on any sort of medium, such as a hard disk, CD, etc. You may be thinking "Wait, doesn't my computer write directly on my hard disk?" Well, a computer has to conceptualize the physical world by imaging everything as software, and in the case of conceptualizing storage mediums, your mac has to image the disk as a virtual place, which it calls a volume.
Your computer has a volume that was initially called 'Macintosh HD,' and this is "mounted" at start-up. "Mounting" a volume is loading it so that data can be written to or retrieved from it. You also mount volumes when you open disk images that some apps are stored in, as well as when you plug in a flash-drive.

Thirdly, why am I telling you this; isn't this sort of thing what Wikipedia's for? Well, let's just say that I was feeling generous today.
Speaking of looking stuff up, you can do such things quite simply in Leopard with Safari's dictionary dialog. All you've got to do is mouse over the mystery word, then press "Command" "Control" "D." Wah lah! Absolutely majestic!

And there we are, at the end of yet another post, brought to you by the illustrious Peter Story.

Sunday, February 1, 2009

Power Tip #9: The Totally Rad Power of Hidden Files

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.