shell> eject --help Eject version 2.1.0 by Jeff Tranter () Usage: eject -h -- display command usage and exit eject -V -- display program version and exit eject [-vnrsfq] [] -- eject device eject [-vn] -d -- display default device eject [-vn] -a on|off|1|0 [] -- turn auto-eject feature on or off eject [-vn] -c [] -- switch discs on a CD-ROM changer eject [-vn] -t [] -- close tray eject [-vn] -T [] -- toggle tray eject [-vn] -x [] -- set CD-ROM max speed Options: -v -- enable verbose output -n -- don't eject, just show device found -r -- eject CD-ROM -s -- eject SCSI device -f -- eject floppy -q -- eject tape -p -- use /proc/mounts instead of /etc/mtab -m -- do not unmount device even if it is mounted Long options: -h --help -v --verbose -d --default -a --auto -c --changerslot -t --trayclose -x --cdspeed -r --cdrom -s --scsi -f --floppy -q --tape -n --noop -V --version -p --proc -m --no-unmount -T --traytoggle Parameter can be a device file or a mount point. If omitted, name defaults to `/dev/cdrom'. By default tries -r, -s, -f, and -q in order until success.
用 eject -vn 可以看到有哪些移动设备,很方便。
shell> eject -vn eject: using default device `/dev/cdrom' eject: device name is `/dev/cdrom' eject: expanded name is `/dev/cdrom' eject: `/dev/cdrom' is a link to `/dev/hda' eject: `/dev/hda' is mounted at `/media/New' eject: device is `/dev/hda' eject: exiting due to -n/--noop option