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: Doesn't print any information or error message.
DeviceName Specifies the name of the device.

Exit Status

This command returns the following exit values:

0
No error.
>0
An error occurred.

Examples

  1. To eject a media from cd0 enter:
    cdeject cd0
  2. To eject a media from cd1 without any printed error messages,enter:
    cdeject -q cd1