DRUTIL :: Open & Close Disk-drive via commandline
September 14th, 2007 at 19:54Stupid idea….but ok lets explain it anyways.
Today we want to control our mac disc-drive over command-line using the “drutil” command.
Basicly its just open & close the drive, but you can check the commands-man-page for more details and functions, or check Apple’s online-documentation
- Open Terminal.app
- Enter:
- drutil tray open -> to open the disc-drive tray
- drutil tray close -> to close the disc-drive tray
Thats it. Some more options for drutil:
Usage: drutil -drive [drive-arguments] command [command-options-and-arguments]
drutil commands are:
atip – Displays ATIP information about inserted CD-R/RW media.
bulkerase – Bulk erases -RW media in either quick or full mode. drutil bulkerase (quick | full)
burn – Burns a given file or directory to disc. drutil burn (burn-options) <path>
cdtext – Displays CD-Text present on an audio CD.
discinfo – Displays disc related info when media is present.
dumpiso – Parses ISO-9660 directory structures. drutil dumpiso <devnode> <block> [format]
dumpudf – Parses UDF directory structures. drutil dumpudf <devnode> <block> [format]
eject – Ejects media from the drive (if any).
erase – Erases -RW media in either quick or full mode. drutil erase (quick | full)
filename – Translates filenames for different filesystems. drutil filename <name>
getconfig – Displays current and supported device features and profiles. drutil getconfig (current | supported)
info – Displays detailed information about connected drives.
list – Lists all connected burning devices.
poll – Constantly polls and displays device notifications.
status – Displays detailed information about inserted media.
subchannel – Displays subchannel (MCN, ISRC) info when CD media is present.
toc – Displays TOC information about inserted CD media.
trackinfo – Displays track related info when media is present.
tray – Opens and closes drive tray, and ejects media. drutil tray (open | close | eject)
version – Display the OS and DiscRecording version numbers.
Have fun with it.
Related links: | MacOSXHints |
Tags: 10.4, cli, commandline, drutil, open & close diskdrive, terminal

October 4th, 2008 at 19:18
[...] macfidelity – using the drutil command [...]