Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-02-2006, 02:16 AM   #1
LQ Newbie
Registered: Sep 2006
Posts: 2

Rep: Reputation: 0
Getting the free space in a blank cd or dvd?

For various reasons, I'd like to know if there's some way to programmatically determine either whether a blank disc in the drive is a CD or DVD, or, preferably, to determine how much free space there is on the disc without mounting or formatting it. I'm pretty sure this is possible since growisofs will complain about there being only a certain number of blocks available even on unformatted DVDs, but looking at other people's source code gives me a headache.

I've looked through cdrom.h and it doesn't seem as if there's anything I could use in that although I did find out how to make the tray dance a merry little jig. Of course, it's more than likely I missed something.
Old 09-02-2006, 11:52 AM   #2
LQ Veteran
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 85
Not sure I understand your question - if you know that the disk is blank, then the capacity of a blank CD is 650Mg and the capacity of a blank DVD is 4.7G
Old 09-02-2006, 02:06 PM   #3
LQ Newbie
Registered: Sep 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Sorry about that, it was sort of late when I posted the message...

Basically, I want to be able to tell if the disc in the drive is a CD or a DVD, and I'm not sure how to do that from within a program. It would be nice if I could just get the total free space, since that's what I really care about, but I could hardcode values for CDs and DVDs if I have to.


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
Not enough free space on hard drive with 50g of free space??? auoq SUSE / openSUSE 5 10-13-2004 08:21 PM
Not enough space for root directory on a drive with 50g free space??? auoq Linux - Newbie 1 10-13-2004 12:44 PM
Is linux *blank* up my windows space? mimithebrain General 0 06-13-2004 08:05 PM
"no space left on device" - But df shows free space! monita Linux - General 7 03-30-2004 01:14 PM
Formating free space: WinXP pro and RH9 dualboot with free space on 3rd drive Vermicious Linux - General 2 03-22-2004 05:10 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:58 PM.

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