Linux eject Command
The Linux eject command is used to eject removable devices.
If a device is mounted, eject will unmount it before ejecting.
Syntax
eject [-dfhnqrstv][-a <开关>][-c <光驱编号>][设备]
Parameter Description:
- [device] The device can be a driver name or a mount point.
- -a
or --auto Controls the automatic eject feature of the device. - -c
or --changerslot Selects a CD-ROM drive in the changer. - -d or --default shows the default device without actually performing the action.
- -f or --floppy ejects the removable disk.
- -h or --help displays help.
- -n or --noop displays the specified device.
- -q or --tape ejects the tape.
- -r or --cdrom ejects the CD-ROM.
- -s or --scsi ejects the device using SCSI commands.
- -t or --trayclose closes the CD-ROM tray.
- -v or --verbose displays detailed information during execution.
Example
# eject //default eject without parameters
# eject -r /dev/cdrom //Specify device
Linux Command Reference