Find size of a blank CD

Solution 1:

You can do this with udftools

cdrwtool -i -d /dev/sr0 | awk '$1 == "free_blocks" {print $3 * 2048}'

will show the size in bytes.

On an empty DVD I get

4.70037e+09

and it says 4.7Gb on the disc itself.


If possible i'd also like to find out whether it's dvd or cd.

There are no 4.7Gb cd's. Nor 700Mb dvd's. The size also shows you what kind of medium it is.


There is also

cdrecord -minfo -v

To use it install:

sudo apt install wodim

There is also dvd+rw-mediainfo:

dvd+rw-mediainfo /dev/sr0