Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

QUICKER - EJECT 4 EXTERNAL DRIVES ?

hey all,


my setup includes a macbook pro, with external drive for backup

from which I take home from the office each day and have to eject the drive


is there any quicker alternative besides going via finder and clicking on the eject button ?


I normally have countless windows open, and even though it's still realatively quick

to do this, I thought it may be quicker if say there was an option for connected devices

on the top menu bar, perhaps within the backup time machine drop down menu, to eject the device ?

or even a shortcut key (can that be assigned) ?


thoughts ?

OS X Mountain Lion (10.8.2)

Posted on Jan 7, 2013 9:15 PM

3 replies

Jan 7, 2013 9:31 PM in response to Community User

To eject all drives except for the boot drive, open the Terminal utility and run the following command:


diskutil eject /Volumes/*


This will unmount any external drives, disk images, and should remove any optical drives in any attached devices.


If you would like to bind this to a button or hotkey, first create a new automator "Service" workflow, and then set the service to have no input but be available in any application. Then add the "Run Shell Script" action, and change the default "cat" command in it to the one above. Then save the workflow and give it a name like "EjectAll."


Then go to the Keyboard system preferences and in the "Keyboard Shortcuts" section select "Services" and locate the new EjectAll service. Then click the "Add Shortcut" button to assign a hotkey to it.

Jan 7, 2013 9:42 PM in response to Community User

You can also use the following command, either in addition to or instead of the previous command to unmount all hard drives except for the boot drive:


diskutil unmountDisk /Volumes/*


Note that this will not eject any optical disks, so you can include it after the command above in the workflow to unmount other drives in addition to ejecting.

QUICKER - EJECT 4 EXTERNAL DRIVES ?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.