up | Inhaltsverzeichniss | Kommentar

Manual page for EJECT(1)

eject - eject media device from drive

SYNOPSIS

eject [ -dfnq ] [ device | nickname ]

AVAILABILITY

This command is not available on Sun 386i systems.

DESCRIPTION

eject is used for those removable media devices that do not have a manual eject button. The device may be specified by its name or by a nickname; if no device is specified the default device is used.

Only devices that support eject under program control respond to this command.

It is not recommended to physically eject media from a device which contains mounted filesystems. eject automatically searches for any mounted filesystems which reside on the device and attempts to umount them prior to ejecting the media (see mount.8 If the unmount operation fails, eject prints a warning message and exits. The -f flag may be used to specify an eject even if the device contains mounted partitions.

eject can also display its default device and a list of nicknames.

OPTIONS

-d
Display the name of the default device to be ejected.
-f
Force the device to eject even if it is busy.
-n
Display the nickname to device name translation table.
-q
Query to see if the media is present.
device
Specify which device to eject, by the name it appears in the directory /dev.
nickname
Specify which device to eject, by its nickname as known to this command.

FILES

/dev/rfd0c
/dev/rsr0
raw files
/dev/sr0
block files

SEE ALSO

fd.4s sr.4s mount.8

EXIT STATUS

eject returns the following exit codes:

0
If the operation was successful or, with the -q option, the media is in the drive.
1
If the operation was unsuccessful or, with the -q option, the media is not in the drive.
2
If invalid flags were specified.
3
If an ioctl() request failed.

DIAGNOSTICS

A short help message is printed if an unknown flag is specified. A diagnostic is printed if the device name cannot be opened or does not support eject.

Device Busy An attempt was made to eject a device that has a mounted filesystem. A warning message is printed when doing a forced eject of a mounted device.

BUGS

There should be a way to change the default on a per-user basis.


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97