Skip to content

Instantly share code, notes, and snippets.

@davepeck
Created October 7, 2018 04:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davepeck/1f1ebe6316a36fb178a47134b07f32d1 to your computer and use it in GitHub Desktop.
Save davepeck/1f1ebe6316a36fb178a47134b07f32d1 to your computer and use it in GitHub Desktop.
Command line tool to eject all ejectable volumes
tell application "Finder" to eject (every disk whose ejectable is true and local volume is true and free space is not equal to 0)
#!/bin/sh
osascript eject_all.scpt
@davepeck
Copy link
Author

davepeck commented Oct 7, 2018

(Need to use Script Editor to create the (binary) scpt file from the text above.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment