LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   eject command (https://www.linuxquestions.org/questions/linux-newbie-8/eject-command-330325/)

anoopp 06-04-2005 12:54 PM

eject command
 
if i have more than one CD drives(ie,/mnt/cdrom and /.mnt/cdrom1)how can i eject a CD inserted in to the second cd drive(/mnt/cdrom1)using eject command.
Simple eject is not working

I am using redhat 9

with regards
anoop

johnson_steve 06-04-2005 01:01 PM

eject /dev/hdx

with hdx being your cdrom device

anoopp 06-04-2005 01:12 PM

if there is only one device simple 'eject' will eject the device
if there is 2 or more devices, can i use the commands like 'eject1' or any other simple commands with out specifying device name

anoop

needforspeed 06-04-2005 01:48 PM

I have 3 optical drives in my machine running Gentoo.

If I go to the directory /dev/cdroms/ I can see cdrom0, cdrom1, cdrom2.

To eject them, I typed "eject /dev/cdroms/cdrom1" and that device ejected. Then I change to 0 and 2 and they ejected as well. Give that a shot.

If they work, you can write a script or make an alias command in your .bashrc file.

phaserx 06-04-2005 02:13 PM

You could create aliases and add them to your /etc/profile.. For example:

alias eject1="eject /dev/cdrom1"
alias eject2="eject /dev/cdrom2"


All times are GMT -5. The time now is 03:19 AM.