EJECT(1) — USER COMMANDS
NAME
eject − eject diskette from floppy drive
SYNOPSIS
eject [ −dfnq ] [ device | nickname ]
AVAILABILITY
SPARCstation 1 and Sun-3/80 systems only.
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
SEE ALSO
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 for invalid flags
3 for ioctl() request failures
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 ought to be a way to change the default on a per-user basis.
Sun Release 4.0 — Last change: 19 May 1989