LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-04-2005, 01:54 PM   #1
anoopp
LQ Newbie
 
Registered: May 2004
Posts: 14

Rep: Reputation: 0
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
 
Old 06-04-2005, 02:01 PM   #2
johnson_steve
Senior Member
 
Registered: Apr 2005
Location: BrewCity, USA (Milwaukee, WI)
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,152

Rep: Reputation: 46
eject /dev/hdx

with hdx being your cdrom device
 
Old 06-04-2005, 02:12 PM   #3
anoopp
LQ Newbie
 
Registered: May 2004
Posts: 14

Original Poster
Rep: Reputation: 0
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
 
Old 06-04-2005, 02:48 PM   #4
needforspeed
Member
 
Registered: Aug 2003
Distribution: Gentoo
Posts: 73

Rep: Reputation: 15
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.

Last edited by needforspeed; 06-04-2005 at 02:50 PM.
 
Old 06-04-2005, 03:13 PM   #5
phaserx
LQ Newbie
 
Registered: Jun 2004
Location: The city of Lost Angels
Distribution: RedHat and Gentoo
Posts: 21

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

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VCD does not eject even eject button pressed ic_torres Linux - Software 4 12-01-2005 06:40 PM
cd eject? mithereal Debian 6 08-09-2005 10:36 AM
bash command for cdrom eject? hexadevil Linux - Newbie 5 06-02-2004 05:00 PM
Cd won't eject techrolla Fedora 13 11-29-2003 09:45 PM
CD Won't Eject With "eject" Command Dr. Ephemeron Slackware 13 11-13-2003 01:27 AM


All times are GMT -5. The time now is 10:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration