Close CD/DVD tray via the command line

Nov 02, '03 05:57:00PM

Contributed by: Anonymous

My G4 is hidden under my desk and I don't know why, but my CD/DVD burner tray is always open, letting the dust damage the delicate mechanism. I searched and found what I want in the command drutil. Use this in your favorite crontab:

# autoclose of dazed tray user
*/5 * * * * youruserhere /usr/bin/drutil tray close -drive internal
Simple but useful. Love UNIX. If you want to affinate this command for your use, don't forget the man drutil command -- it is a rich utility. PS: Tested with Toast 6.0, this hint seems harmless when you burn or erase medias.

[robg adds: I'm not sure if this one is 10.3-only or not...]

Comments (10)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20031029104721110