cuckoo clockShell command eject that is available by default in most of Linux distributions, allows to open and sometimes close removable media tray (usually it’s CD-ROM or DVD media).

To eject media:

eject /dev/cdrom

or

eject cdrom

As you see the name of device can be a device file or mount point, either a full path or with the leading “/dev”, “/media” or “/mnt” omitted. If no name is specified, the default name “cdrom” is used. With -c option a CD slot can be selected from an ATAPI/IDE CD-ROM changer.

To close tray:

eject -t cdrom

Dear reader, I hope you know what use eject command for if you came here, but let me suggest one more application. You can use this command to make your own cuckoo clock! :)

Just put little shell script opening and closing cdrom or dvd tray into cron…

 

15 Comments

 

  1. September 15, 2009  7:22 am by ramin Reply

    I want to eject CD Rom and the enter a CD into Cd rom .

    but Linux( Fedora 11 ) not allow . please help me

  2. November 7, 2009  6:31 pm by Ted King Reply

    Thank you. My desktop now has a pair of application links - "Open_DVD" and "Close_DVD". These replace what I was doing with "myComputer.desktop".

  3. March 16, 2010  5:23 pm by Joe Wulf Reply

    The `eject -t` is a viable option for systems with electronically controlled media drives. Unfortnately, Dell 1950 and 2950 systems have simple physical/mechanical interlocks that work to eject the drive with the `eject` command, and/or pushing the drive open button. `-t` doesn't work to close the drives on such systems.



    R,

    -Joe Wulf, RHCT, VCP, USN(RET)

    Senior IA Engineer/ISSE

    ProSync Technology Group

  4. April 6, 2011  9:29 pm by Ernesto Caston Reply

    Saving $$$$$ money is key $25-$30 /m For ipads data package, not realizing when I bought the 16gb i Pad 3G I could have saved $100 buying the wyfi only. And I"m lucky to still have att&ts unlim plan. FREE tethering hell ya ; ) MYWI all the way!!!!iOS is real pain for me. Now, with 4.2 the speed is acceptable, but I still have problems with short baterry life. I am thinking about downgrade to iOS 3.1.3 again – using RectBoot utility. (My version history was 3.1.2 – 4.0 – 3.1.3 -4.2.0 – 4.2.1)No it doesn"t "spells" trouble for the other manufacturers. They are competing (mostly against each other) in a different space, at the low end. There will always be a larger market for cheap phones, even if those are now becoming cheap smartphones.

  5. April 16, 2011  11:44 am by Barton Soberano Reply

    68. I have been absent for a while, but now I remember why I used to love this blog. Thanks , I’ll try and check back more often. How frequently you update your website?

  6. April 16, 2011  4:25 pm by oakley replica sunglasses Reply

    Bread and Butter by 2010 winter product exhibition opportunity and adidas homeopathic again this time the host

  7. April 20, 2011  3:58 pm by debt management Reply

    Hello there. I discovered your blog by way of Google at the same time as looking for a similar matter, your web site came up. It appears great. I've bookmarked it in my google bookmarks to come back later.

  8. April 20, 2011  4:51 pm by Credit Card Lawsuits Reply

    Good – I should definitely say I'm impressed with your blog. I had no trouble navigating through all tabs as well as related info. It ended up being truly simple to access. Excellent job.

  9. April 24, 2011  12:21 am by Tower Defense Games Reply

    Thank you for the sensible critique. Me and my cousin were just preparing to do a little research about this. We got a book from our local library but I think I learned more from this post. I am very glad to see such excellent information being shared freely out there.

  10. April 25, 2011  10:40 am by Coches de ocasion Reply

    Hello. Very cool website!! Man .. Beautiful .. Amazing .. I'll bookmark your site and take the feeds also...I'm glad to locate so much useful information here in the post. Thanks for sharing.

  11. April 27, 2011  9:53 pm by Charlie Sheen is WINNING Reply

    It continually is amazing to me how blog owners for example your self can find the time plus the dedication to carry on writing outstanding content. Your site isgood and one of my own need to read websites. I simply needed to say thanks.

  12. May 11, 2011  1:00 am by cheap hats Reply

    Noticed your website on digg today and genuinely loved it.

  13. January 12, 2013  1:42 am by Centos Fan Reply

    Application can't eject but your suggestion does - It works.

    Thank you.

  14. May 7, 2013  3:19 am by news Reply

    I actually wanted to write a quick message to appreciate you for all of the remarkable tricks you are writing here. My rather long internet look up has finally been paid with sensible facts to go over with my company. I 'd claim that most of us site visitors actually are definitely blessed to live in a great community with so many perfect professionals with beneficial points. I feel quite privileged to have encountered your entire webpage and look forward to plenty of more awesome minutes reading here. Thanks a lot once again for all the details.

Leave a reply

 

Your email address will not be published.