Filed under: Tips and tricks, Terminal Tips
Terminal Tip: Showing and Hiding Disks using Developer tools
In a couple of recent posts, I showed you how to how to hide drives using Finder preferences and selectively show some of them using aliases. I received a number of emails looking for more elegant solutions i.e. avoiding the look of aliases and their won't-sort-properly-like-a-real-drive behavior. A few readers also asked how to hide their iDisks, which didn't respond to the preferences the same way that hard drives did.
First let me note that iDisks aren't seen by Finder as normal hard drive volumes or, as you might expect, as connected servers. Instead, iDisks are controlled by the CDs, DVDs, and iPods preference--the same preference that shows and hides attached thumb drives and memory card readers.
As for the more elegant volume-by-volume solution, that lies in the realm of Terminal and the command-line developer tool SetFile. You can join the Apple Developer Connection and gain access to the developer tools with a Free ADC Online Membership. After installing the dev tools, you'll find SetFile in the /Developer/Tools folder.
To hide a volume, use the -a V flag with SetFile and then restart Finder. This will hide the iDisk, even in Sync mode
% /Developer/Tools/SetFile -a V /Volumes/iDisk/
% killall "Finder"
%
To bring the volume back, use -a v instead. (Notice the lower case "v".)
% /Developer/Tools/SetFile -a v /Volumes/iDisk/
% killall "Finder"
%

![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 1)
Chris said 12:28PM on 5-01-2007
You don't have to install the developer tools to get SetFile. Just install Server Admin, and SetFile is installed in /System/Library/ServerSetup/SetFile
Reply
Leonard Nimrod said 11:38AM on 5-01-2007
Excellent work, Erica! Thank you for this this.
Reply
fro said 12:55PM on 5-01-2007
leonard nimrod is erica
Reply
Chris Bonthron said 1:45PM on 5-01-2007
Brilliant!
When I created my striped the 4 drives in my MacPro I was left with one 128MB drive that was automatically created called Mac Boot OSX. Considering that a drive of that size is pretty much pointless I've been looking at finding a way to remove that eyesore from my Desktop.
Thanks!
Reply
john russell said 5:51PM on 5-01-2007
I used this on my backup drive. Worked like a charm.
Reply
VanillaSpice said 8:28PM on 5-02-2007
No, I am Erica.
Reply
Spartacus said 8:31PM on 5-02-2007
No.
*I* am Erica.
Reply
iAmErica said 8:36PM on 5-02-2007
Wrong. I am Erica.
Reply