cdeject Command
Purpose
Ejects a media from a CD drive managed by the cdromd daemon.
Syntax
cdeject [ -q ] [ -h | -? ] DeviceName
Description
The cdeject command sends an appropriate command to the cdromd daemon which unmounts (if necessary) the file system corresponding to the specified device and ejects the media from the drive specified by DeviceName.
Flags
Item | Description |
---|---|
-h or -? | Displays the command usage message. |
-q | Specifies silent mode. If you specify this option, any information or error messages are not printed. |
DeviceName | Specifies the name of the device. |
Exit Status
This command returns the following exit values:
- 0
- No error.
- >0
- An error occurred.
Examples
- To eject a media from cd0, enter:
cdeject cd0
- To eject a media from cd1 without any printed error messages, enter:
cdeject -q cd1