eject

Used to exit removable equipment

Supplementary instructions

eject command is used to exit removable equipment. If the device is already mounted, the eject command will first remove the device and then exit.

eject allows removable media (typically CD-ROMs, floppy disks, tapes, or JAZ and zip disks) to be ejected under software control. This command can also control some multi-disc CD-ROM controllers, control the automatic eject function supported by some devices, and control the closing of the disk tray of some CD-ROM drives. The device corresponding to name will be ejected. name can be a device file or its mount point, or it can be a full path or omit the previous /dev or /mnt device file name. If name is not specified, cdrom is used by default.

There are four different ejection methods, depending on whether the device is a CD-ROM, a SCSI device, a removable floppy disk, or a tape. The default popup tries all four methods in sequence until successful. If the device is currently mounted, it must be unmounted before ejecting.

grammar

eject(option)(parameter)

Options

-a<switch> or --auto<switch>: control the automatic exit function of the device;
-c <optical drive number> or --changerslut <optical drive number> select the optical drive in the optical drive cabinet;
-d or --default: Display the default device instead of actually executing the action;
-f or --floppy: Exit the removable disk;
-h or --help: display help;
-n or --noop: display the specified device;
-q or --tape: Exit the tape;
-r or --cdrom: Eject the CD;
-s or --scsi: Use SCSI commands to exit the device;
-t or --trayclose: Close the disc tray;
-v or --verbose: Display detailed instructions when executing.

Parameters

Device name: Specify the pop-up device name.