How to Eject devices from the use of the terminal for a Mac
In this tutorial, we learn how to eject devices from the use of the terminal for Mac. First, go to the terminal of your computer where you will see a notepad sort of page. Next, type in "df" and then press return. You will now see a list displaying processes on your computer. On the bottom will be your public zoning device, which is your USB device. Next, type in "hdiutil eject -force (the code under "mounted on)- volumes-publiczone". This is not case sensitive, but don't forget or add in any extra spaces. Now, press return and you will see an icon appear and disappear. Now, it will tell you that disk two has been unmounted and ejected. Then, you will be able to remove the USB from your computer!