Created
January 18, 2014 07:37
-
-
Save unicornrainbow/8487457 to your computer and use it in GitHub Desktop.
Unmount a disk by name on OSX.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
disk=$(diskutil list | grep <Disk Name> | awk '{ print $6}') | |
diskutil unmount "/dev/$disk" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment