how to eject a cdrom or dvd from the command line

to eject superdrive media from the command line, issue one of the following commands:

  • drutil eject *

or

  • drutil tray open *