Contained WithinFind More DocumentationFeatured Support Resources | Descargar este libro en PDF (6561 KB)
eject(1)Name | Synopsis | Description | Options | Operands | Examples | Exit Status | Files | Attributes | See Also | Diagnostics | Bugs Name
Synopsiseject [-dfnpq] [device | nickname] DescriptionThe eject utility is used for those removable media devices that do not have a manual eject button, or for those that do, but are managed by Volume Management (see vold(1M)). The device may be specified by its name or by a nickname; if Volume Management is running and no device is specified, the default device is used. Only devices that support eject under program control respond to this command. eject responds differently, depending on whether or not Volume Management is running. With Volume ManagementWhen eject is used on media that can only be ejected manually, it will do everything except remove the media, including unmounting the file system if it is mounted. In this case, eject displays a message that the media can now be manually ejected. If a window system is running, the message is displayed as a pop-up window, unless the -p option is supplied. If no window system is running or the -p option is supplied, a message is displayed both to stderr and to the system console that the media can now be physically removed. Volume Management has the concept of a default device, which eject uses if no pathname or nickname is specified. Use the -d option to check what default device will be used. Without Volume ManagementWhen Volume Management is not running and a pathname is specified, eject sends the eject command to that pathname. If a nickname is supplied instead of a pathname, eject will recognize the following list:
The list above can be reproduced with the -n option. Do not physically eject media from a device which contains mounted file systems. eject automatically searches for any mounted file systems which reside on the device and attempts to umount them prior to ejecting the media (see mount(1M)). If the unmount operation fails, eject prints a warning message and exits. The -f option may be used to specify an eject even if the device contains mounted partitions; this option works only if Volume Management is not running. eject can also display its default device and a list of nicknames. If you have inserted a floppy diskette, you must use volcheck(1) before ejecting the media to inform Volume Management of the floppy's presence. Options
The following options are supported: Operands
The following operands are supported: ExamplesExample 1 Ejecting a CD while Volume Management is runningTo eject a CD from its drive, while Volume Management is running (assuming only one CD-ROM drive):
Example 2 Ejecting a CD-ROM without running Volume ManagementTo eject a CD-ROM drive with pathname /dev/dsk/c0t3d0s2, without Volume Management running:
Example 3 Ejecting a floppy diskTo eject a floppy disk (whether or not Volume Management is running):
Exit Status
The following exit codes are returned: Files
AttributesSee attributes(5) for descriptions of the following attributes:
See Alsovolcancel(1), volcheck(1), volmissing(1), mount(1M), rmmount(1M), vold(1M), ioctl(2), rmmount.conf(4), vold.conf(4), attributes(5), volfs(7FS) Diagnostics
A short help message is printed if an unknown option is specified. A diagnostic is printed if the device name cannot be opened or does not support eject. BugsThere should be a way to change the default on a per-user basis. If Volume Management is not running, it is possible to eject a volume that is currently mounted (see mount(1M)). For example, if you have a CD-ROM drive at /dev/dsk/c0t3d0s2 mounted on /mnt, the following command (without Volume Management running) will work:
since both slices s0 and s2 reference the whole CD-ROM drive. Name | Synopsis | Description | Options | Operands | Examples | Exit Status | Files | Attributes | See Also | Diagnostics | Bugs |
||||||||||||||||||||||||||||||||||