table of contents
other versions
other languages
EJECT(1) | User Commands | EJECT(1) |
NAME¶
eject - eject removable mediaSYNOPSIS¶
eject -hDESCRIPTION¶
Eject allows removable media (typically a CD-ROM, floppy disk, tape, or JAZ or ZIP disk) to be ejected under software control. The command can also control some multi-disc CD-ROM changers, the auto-eject feature supported by some devices, and close the disc tray of some CD-ROM drives.COMMAND-LINE OPTIONS¶
- -h
- This option causes eject to display a brief
description of the command options.
- -v
- This makes eject run in verbose mode; more
information is displayed about what the command is doing.
- -d
- If invoked with this option, eject lists the default
device name.
- -a on|1|off|0
- This option controls the auto-eject mode, supported by some
devices. When enabled, the drive automatically ejects when the device is
closed.
- -c <slot>
- With this option a CD slot can be selected from an
ATAPI/IDE CD-ROM changer. Linux 2.0 or higher is required to use this
feature. The CD-ROM drive can not be in use (mounted data CD or playing a
music CD) for a change request to work. Please also note that the first
slot of the changer is referred to as 0, not 1.
- -i on|1|off|0
- This option controls locking of the hardware eject button.
When enabled, the drive will not be ejected when the button is pressed.
This is useful when you are carrying a laptop in a bag or case and don't
want it to eject if the button is inadvertently pressed.
- -t
- With this option the drive is given a CD-ROM tray close
command. Not all devices support this command.
- -T
- With this option the drive is given a CD-ROM tray close
command if it's opened, and a CD-ROM tray eject command if it's closed.
Not all devices support this command, because it uses the above CD-ROM
tray close command.
- -x <speed>
- With this option the drive is given a CD-ROM select speed
command. The speed argument is a number indicating the desired speed (e.g.
8 for 8X speed), or 0 for maximum data rate. Not all devices support this
command and you can only specify speeds that the drive is capable of.
Every time the media is changed this option is cleared. This option can be
used alone, or with the -t and -c options.
- -X
- With this option the CD-ROM drive will be probed to detect
the available speeds. The output is a list of speeds which can be used as
an argument of the -x option. This only works with Linux 2.6.13 or higher,
on previous versions solely the maximum speed will be reported. Also note
that some drive may not correctly report the speed and therefore this
option does not work with them.
- -n
- With this option the selected device is displayed but no
action is performed.
- -r
- This option specifies that the drive should be ejected
using a CDROM eject command.
- -s
- This option specifies that the drive should be ejected
using SCSI commands.
- -f
- This option specifies that the drive should be ejected
using a removable floppy disk eject command.
- -q
- This option specifies that the drive should be ejected
using a tape drive offline command.
- -p
- This option allow you to use /proc/mounts instead
/etc/mtab. It also passes the -n option to umount(1).
- -m
- This option allows eject to work with device drivers which
automatically mount removable media and therefore must be always
mount(1)ed. The option tells eject to not try to unmount the given device,
even if it is mounted according to /etc/mtab or /proc/mounts.
- -V
- This option causes eject to display the program
version and exit.
LONG OPTIONS¶
All options have corresponding long names, as listed below. The long names can be abbreviated as long as they are unique.EXAMPLES¶
Eject the default device:- eject
- eject cdrom
- eject /dev/cdrom
- eject /mnt/cdrom/
- eject hdd
- eject sda
- eject sda4
- eject -v -c4 /dev/cdrom
- eject -a on /dev/sbpcd
EXIT STATUS¶
NOTES¶
AUTHOR¶
Eject was written by Jeff Tranter (tranter@pobox.com) and is released under the conditions of the GNU General Public License. See the file COPYING and notes in the source code for details.SEE ALSO¶
mount(2), umount(2), mount(8), umount(8)12 May 2005 | Linux |