MAN page from Mandrake Other eject-1.5-2.i386.rpm
EJECT
Section: User Commands (1)
Updated: 4 January 1997
Index NAME
eject - eject removable media
SYNOPSIS
eject -h
eject [-f][-u][-v]
eject [-f][-u][-v] <nickname>
eject [-f][-u][-v] <device-name>
eject -d
eject -n
eject -a on|1|off|0 [-v]
eject -c <slot> [-v]
DESCRIPTION
Ejectallows removable media (typically a CD-ROM, floppy disk, or Iomega Jazor Zip disk) to be ejected under software control. The command canalso control some multi-disc CD-ROM changers and the auto-ejectfeature supported by some devices.
If no device is specified, a default device is used. The environmentvariable CDROM can be used to set the default device, otherwise thecompiled in default is used.
Other devices can be specified either using the full device name(e.g. /dev/cdrom) or a nickname.
COMMAND-LINE OPTIONS
- -h
- This option causesejectto display a brief description of the command options.
- -f
- Normallyejectwill not eject a device if it has determined that thedevice is being used for a mounted file system. This option overridesthat behaviour, and attempts to force an eject even for a mounteddevice.
- -u
- This optioninstructsejectto first try to unmount the device before ejecting it.
- -v
- This makesejectrun in verbose mode; more information is displayed about what thecommand is doing.
- -d
- If invoked with this option,ejectlists the default device.
- -n
- If this option is used,ejectwill list the supported nicknames and corresponding devices.
- -a on|1|off|0
- This option controls the auto-eject mode, supported by some devices.
- -c <slot>
- With this option a CD slot can be selected from an ATAPI/IDE CD-ROMchanger. Linux 2.0 or higher is required to use this feature. TheCD-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 ofthe changer is referred to as 0, not 1.
BUGS/LIMITATIONS
Ejectonly works with devices that support the CDROMEJECT or FDEJECT ioctl.It also works with the Jaz and Zip drive using normal SCSI commands.Most CD-ROM drives under Linux should work. The only ejectable floppydevices that it has been tested with are Sun workstation drivesrunning Linux on the SPARC platform.
Ejectmay not always be able to determine if the device is mounted (e.g. ifit has several names). If the device name is a symbolic link,ejectwill follow the link and use the device that it points to. It willalso properly check if any partitions of the device you are tryingto eject are mounted (which could be the case on the Jaz, Zip, or even aCD-ROM, really).
If the auto-eject feature is enabled, then the drive will always beejected after running this command, even if it is mounted and the -foption is used. Not all Linux kernel CD-ROM drivers support theauto-eject mode.
The nicknames are set whenejectis 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 mostkernel drivers allow it.
The -u option will only succeed in unmounting if the user hasprivileges to run umount(8), orejectis installed setuid root, and it is not busy.
AUTHOR
Ejectwas written by Jeff Tranter (jeff_tranterAATTpobox.com) and is releasedunder the conditions of the GNU General Public License. See the fileCOPYING and notes in the source code for details.
- For suggestions and patches, special thanks go out to:
Ben Galliart (bgalliaAATTluc.edu)
Dick Streefland
Donnie Barnes (djbAATTredhat.com)
Doug L. Hoffman (hoffmanAATTcs.unc.edu)
Grant Guenther (grantAATTtorque.net)
Mark Lord (mlordAATTpobox.com)
Markus Pilzecker (markus.pilzeckerAATTrhein-neckar.netsurf.de)
SEE ALSO
mount(2), umount(2), mount(8), umount(8)
/usr/src/linux/Documentation/cdrom/
Index
- NAME
- SYNOPSIS
- DESCRIPTION
- COMMAND-LINE OPTIONS
- BUGS/LIMITATIONS
- AUTHOR
- SEE ALSO
This document was created byman2html,using the manual pages.