Volt: Volume Toggle

This is a handy shell script I whipped up to assist with mounting and unmounting OS X volumes. In my case, I’m using what seems to be a common “hotrod” aftermarket configuration of the Early 2011 Macbook Pro. The system’s main drive has been upgraded to an SSD, with the original hard drive moved to the optical bay.

What with the upgraded Core i7 CPU, discrete graphics, and big display, this system is not nearly as power frugal as a lightweight system like a Macbook Air. Thus when I’m out and about with this laptop, the `volt` script lets me quickly and easily spin down the hard drive.

Pro Tip: Create a symlink to volt with the same name as the volume you want to toggle (including spaces, if any):

ln -s volt SpareVolume

The symlink is now a shortcut to toggle that volume, handy for shorthand use from the command line or via tools like LaunchBar.