[svlug] Predicting size of CD image

Sean McAfee mcafee at transmeta.com
Thu Jan 30 15:55:38 PST 2003

Greetings everyone--

I'm working on some software which generates CD images by running the
following command:

dd if=/dev/scd0 of=image.iso

I'd like to be able to find out in advance how large the image is going to
be so that I can present a status thermometer for the reading process.
I've tried stat(2) and fstat(2), but both return a size of zero when
applied to /dev/scd0.  That's pretty much all I presently know to try.

Can anyone suggest a way to get the info I'm after?  Thanks in advance.


More information about the svlug mailing list