home | help
EJECT(1)		     General Commands Manual			EJECT(1)

NAME
     eject -- Eject removable media

SYNOPSIS
     eject [options] <device|mount-point>

DESCRIPTION
     Eject  is	used  to  control removable media devices.  Either a device name
     (with or without a precending "/dev/"), or  a  mount  point  as  listed  in
     "/etc/fstab"  may be specified to select the device to eject.  If no device
     is specified, the default device, "/etc/acd0" is used.

     If the device is currently mounted at one or more mount points, all are un-
     mounted before the eject is performed.  If any unmount fails, the eject  is
     aborted, and the mounts are NOT re-established.

     Only  devices  listed  in "/usr/local/etc/eject.allow" can be ejected.  The
     file format is one entry per line, and shell-style wildcards (See	"sh(1)")
     are  allowed.  Lines beginning with `#' and blank lines are considered com-
     ments.

OPTIONS
     --h, ---help
		 Display a summary of command usage.

     --v, ---verbose
		 Verbose mode.	eject displays arguably useful information about
		 what it's doing.

     --d, ---default
		 Display the default device.

     --t, ---trayclose
		 Close the CDROM tray.	( Not supported by all CDROM drives. )

     --n, ---noop
		 No operation.	Display the normal output,  but  don't	actually
		 eject	or  close the device.  Often used in conjunction with -v
		 for debugging.

EXAMPLES
     Eject the default device:
	   eject

     Eject a device name:
	   eject cdrom
	   eject acd0
	   eject /dev/cdrom
	   eject /dev/acd0

     Eject using mount point:
	   eject /cdrom

     Close tray:
	   eject -t /cdrom
	   eject --trayclose /cdrom

EXIT STATUS
     eject returns 0 if operation was successful, nonzero otherwise.  See sysex-
     its(3) for an explanation of exit codes.

FILES
     /etc/fstab, /usr/local/etc/eject.allow

SEE ALSO
     mount(1), mount(2), umount(1), unmount(2), sh(1), fnmatch(2) sysexits(3)

AUTHOR
     eject was written by Jason W. Bacon at the  Medical  College  of  Wisconsin
     September, 2002.

FreeBSD 11.1		       September 20, 2002			EJECT(1)

home | help