Created
May 15, 2021 09:42
-
-
Save rene-d/c09974fad00e69d866f21bf08ed19943 to your computer and use it in GitHub Desktop.
The missing eject command in macOS
This file contains hidden or 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
| alias eject="diskutil list | sed -nr '/external, physical/s,^/dev/disk([0-9]+) .*,\1,p' | xargs -I+ diskutil eject /dev/rdisk+" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment