.\" This file Copyright (C) 1994-95 Jeff Tranter .\" (Jeff_Tranter@Mitel.COM) .\" It may be distributed under the GNU Public License, version 2, or .\" any higher version. See section COPYING of the GNU Public license .\" for conditions under which this file may be redistributed. .TH EJECT 1 "16 December 1994" "Linux" "User Commands" .SH NAME eject \- eject CD-ROM disc from drive .SH SYNOPSIS eject [-f][-u][-v] .br eject [-f][-u][-v] .br eject [-f][-u][-v] .br eject -d .br eject -n .br eject -a on|1|off|0 [-v] .br eject -c [-v] .SH DESCRIPTION .B Eject allows removable media (usually a CD-ROM) to be ejected under software control. The command can also control the auto-eject feature supported by some devices. If no device is specified, a default device is used. The environment variable CDROM can be used to set the default device, otherwise the compiled in default is used. Other devices can be specified either using the full device name (e.g. /dev/cdrom) or a nickname. .PP .SH "COMMAND\-LINE OPTIONS" .TP 0.5i .B -f Normally .B eject will not eject a device if it has determined that the device is being used for a mounted file system. This option overrides that behaviour, and attempts to force an eject even for a mounted device. .TP 0.5i .B -u When ejecting a mounted device using the -f option, this option instructs .B eject to first try to unmount the device. .TP 0.5i .B -v This makes .eject run in verbose mode; more information is displayed about what the command is doing. .TP 0.5i .B -d If invoked with this option, .B eject lists the default device. .TP 0.5i .B -n If this option is used, .B eject will list the supported nicknames and corresponding devices. .TP 0.5i .B -a on|1|off|0 This option controls the auto-eject mode, supported by some devices. .TP 0.5i .B -c 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 CDROM drive has 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 refered to as 0 -- not 1. .SH BUGS/LIMITATIONS .PP .B Eject only works with drives that support the CDROMEJECT ioctl. .B Eject may not always be able to determine if the device is mounted (e.g. if it has several names). If the device name is a symbolic link, .B eject will follow the link and use the device that it points to. If the auto-eject feature is enabled, then the drive will always be ejected after running this command, even if it is mounted and the -f option is used. Currently only the sbpcd (Panasonic/Matsushita) driver supports the auto-eject mode. The nicknames are set when .B eject is compiled. There is no way to find out the state of the auto-eject mode. You probably shouldn't be able to eject a mounted disc, but most kernel drivers allow it. The -u option will only succeed in unmounting if the user has privileges to run umount(8), or .B eject is installed setuid root, and it is not busy. .SH AUTHOR .B Eject was written by Jeff Tranter (Jeff_Tranter@Mitel.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. .br .TP 0.5i For suggestions and patches, special thanks go out to: .br Dick Streefland, .br Mark Lord, .br Doug L. Hoffman (hoffman@cs.unc.edu), .br Ben Galliart (bgallia@luc.edu), .br and Markus Pilzecker .br (markus.pilzecker@rhein-neckar.netsurf.de). .SH SEE ALSO mount(2), umount(2), mount(8), umount(8) .br /usr/src/linux/drivers/block/README.sbpcd .br /usr/src/linux/Documentation/cdrom/sbpcd